Compare commits

...

3 commits

Author SHA1 Message Date
Sir 2nd Stage Boss Garbagetruck
041afcbee3 3 things for running in sway. For i3, change? 2021-01-31 03:00:29 +02:00
Sir 2nd Stage Boss Garbagetruck
5dedfd1262 Sort fonts and a script to run foot (for sway) using it. 2021-01-31 03:00:09 +02:00
Sir 2nd Stage Boss Garbagetruck
23f4721ece Changes for some items.
- emacs config for fonts wasn't working without custom, for some
 reason.
2021-01-31 02:58:47 +02:00
10 changed files with 222 additions and 75 deletions

6
bemenu-run-mine Executable file
View file

@ -0,0 +1,6 @@
#!/bin/sh
BEMENU_BACKEND=wayland bemenu-run \
-m -1 \
--fn 'Berkelium 64 16' \
$@

55
emacs-custom.el Normal file
View file

@ -0,0 +1,55 @@
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(ansi-color-faces-vector
[default default default italic underline success warning error])
'(ansi-color-names-vector
(vector "#c5c8c6" "#cc6666" "#b5bd68" "#f0c674" "#81a2be" "#b294bb" "#8abeb7" "#373b41"))
'(ansi-term-color-vector
[unspecified "#000000" "#ff6c60" "#a8ff60" "#ffffb6" "#96cbfe" "#ff73fd" "#96cbfe" "#b5b3aa"])
'(custom-safe-themes
'("8db4b03b9ae654d4a57804286eb3e332725c84d7cdab38463cb6b97d5762ad26" "50ff65ab3c92ce4758cc6cd10ebb3d6150a0e2da15b751d7fbee3d68bba35a94" "d5b121d69e48e0f2a84c8e4580f0ba230423391a78fcb4001ccb35d02494d79e" "5cd0afd0ca01648e1fff95a7a7f8abec925bd654915153fb39ee8e72a8b56a1f" default))
'(fci-rule-color "#373b41")
'(flycheck-color-mode-line-face-to-color 'mode-line-buffer-id)
'(frame-background-mode 'dark)
'(linum-format "%3i")
'(nrepl-message-colors
'("#336c6c" "#205070" "#0f2050" "#806080" "#401440" "#6c1f1c" "#6b400c" "#23733c"))
'(package-selected-packages
'(roguel-ike helm-unicode unicode-fonts color-theme-sanityinc-tomorrow color-theme-solarized distinguished-theme alect-themes bubbleberry-theme go-snippets company-go cyberpunk-theme dad-joke darkane-theme darkmine-theme helm-themes markdown-mode anti-zenburn-theme helm-tramp magit use-package powerline paradox helm))
'(paradox-github-token t)
'(pdf-view-midnight-colors '("#232333" . "#c7c7c7"))
'(powerline-color1 "#3d3d68")
'(powerline-color2 "#292945")
'(tool-bar-mode nil)
'(vc-annotate-background "#d4d4d4")
'(vc-annotate-color-map
'((20 . "#437c7c")
(40 . "#336c6c")
(60 . "#205070")
(80 . "#2f4070")
(100 . "#1f3060")
(120 . "#0f2050")
(140 . "#a080a0")
(160 . "#806080")
(180 . "#704d70")
(200 . "#603a60")
(220 . "#502750")
(240 . "#401440")
(260 . "#6c1f1c")
(280 . "#935f5c")
(300 . "#834744")
(320 . "#732f2c")
(340 . "#6b400c")
(360 . "#23733c")))
'(vc-annotate-very-old-color "#23733c")
'(warning-suppress-types '((use-package))))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(default ((t (:inherit nil :extend nil :stipple nil :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 164 :width normal :family "FantasqueSansMono NF"))))
'(fixed-pitch ((t (:family "Iosevka")))))

View file

@ -12,6 +12,9 @@
(package-install 'gnu-elpa-keyring-update)
(package-install 'use-package))
(setq custom-file "~/.emacs.d/custom.el")
(load custom-file)
(use-package diminish
:ensure t)
@ -219,65 +222,6 @@
;; kill the damned gnu screen
(setq inhibit-startup-screen t)
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(ansi-color-faces-vector
[default default default italic underline success warning error])
'(ansi-color-names-vector
(vector "#c5c8c6" "#cc6666" "#b5bd68" "#f0c674" "#81a2be" "#b294bb" "#8abeb7" "#373b41"))
'(ansi-term-color-vector
[unspecified "#000000" "#ff6c60" "#a8ff60" "#ffffb6" "#96cbfe" "#ff73fd" "#96cbfe" "#b5b3aa"])
'(custom-safe-themes
(quote
("8db4b03b9ae654d4a57804286eb3e332725c84d7cdab38463cb6b97d5762ad26" "50ff65ab3c92ce4758cc6cd10ebb3d6150a0e2da15b751d7fbee3d68bba35a94" "d5b121d69e48e0f2a84c8e4580f0ba230423391a78fcb4001ccb35d02494d79e" "5cd0afd0ca01648e1fff95a7a7f8abec925bd654915153fb39ee8e72a8b56a1f" default)))
'(fci-rule-color "#373b41")
'(flycheck-color-mode-line-face-to-color (quote mode-line-buffer-id))
'(frame-background-mode (quote dark))
'(linum-format "%3i")
'(nrepl-message-colors
(quote
("#336c6c" "#205070" "#0f2050" "#806080" "#401440" "#6c1f1c" "#6b400c" "#23733c")))
'(package-selected-packages
(quote
(roguel-ike helm-unicode unicode-fonts color-theme-sanityinc-tomorrow color-theme-solarized distinguished-theme alect-themes bubbleberry-theme go-snippets company-go cyberpunk-theme dad-joke darkane-theme darkmine-theme helm-themes markdown-mode anti-zenburn-theme helm-tramp magit use-package powerline paradox helm)))
'(paradox-github-token t)
'(pdf-view-midnight-colors (quote ("#232333" . "#c7c7c7")))
'(powerline-color1 "#3d3d68")
'(powerline-color2 "#292945")
'(tool-bar-mode nil)
'(vc-annotate-background "#d4d4d4")
'(vc-annotate-color-map
(quote
((20 . "#437c7c")
(40 . "#336c6c")
(60 . "#205070")
(80 . "#2f4070")
(100 . "#1f3060")
(120 . "#0f2050")
(140 . "#a080a0")
(160 . "#806080")
(180 . "#704d70")
(200 . "#603a60")
(220 . "#502750")
(240 . "#401440")
(260 . "#6c1f1c")
(280 . "#935f5c")
(300 . "#834744")
(320 . "#732f2c")
(340 . "#6b400c")
(360 . "#23733c"))))
'(vc-annotate-very-old-color "#23733c"))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(default ((t (:inherit nil :stipple nil :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 142 :width normal :foundry "unci" :family "MonofurForPowerline Nerd Font"))))
'(fixed-pitch ((t (:family "Iosevka")))))
(if window-system
; (load-theme 'anti-zenburn t)

99
fontsbyuse.py Executable file
View file

@ -0,0 +1,99 @@
#!/usr/bin/env python3
# coding:utf-8
"""
Author: Sir Garbagetruck --<truck>
Purpose: Sort fonts by use
Created: 2020/07/24
"""
import argparse
import subprocess
import os
import json
def newfontlist():
"""generate a new fontlist with all zero uses of current fonts"""
fonts = subprocess.Popen(
["fc-list", ":spacing=mono"], stdout=subprocess.PIPE)
fontscut = subprocess.Popen(
["cut", "-d:", "-f2"], stdin=fonts.stdout, stdout=subprocess.PIPE)
fontsort = subprocess.Popen(
["sort"], stdin=fontscut.stdout, stdout=subprocess.PIPE)
fontuniq = subprocess.Popen(
["uniq"], stdin=fontsort.stdout, stdout=subprocess.PIPE)
fonts.stdout.close()
fontscut.stdout.close()
fontsort.stdout.close()
fontlist = fontuniq.communicate()[0].decode().split('\n')
newlist = []
for i in fontlist:
newlist.append([0, i.lstrip()])
return newlist
def jsonpretty(thing):
"""prettify a thing as json to stdout"""
return json.dumps(thing, check_circular=True, indent=4, sort_keys=True)
def writelist(fontlist, outfile):
with open(outfile, 'w+') as fh:
fh.write(jsonpretty(fontlist))
def readfile(filename):
thefile = os.path.expanduser(filename)
with open(thefile) as fh:
fontlist = json.loads(fh.read())
return fontlist
def increment_font(fontlist, fontname):
"""increment the named font by one use"""
newlist = []
for i in fontlist:
if i[1] == fontname:
newlist.append([i[0] + 1, i[1]])
else:
newlist.append(i)
return newlist
def main(args):
"""open json, or create new, and spit out the sorted list."""
if args.output is not None:
outfile = os.path.expanduser(args.output)
else:
outfile = os.path.expanduser(args.filename)
if args.renew is not None:
print("this is not written yet")
exit(1)
if args.increment is not None:
fontlist = readfile(args.filename)
fontlist = increment_font(fontlist, args.increment)
writelist(fontlist, outfile)
exit(0)
if args.new:
fontlist = newfontlist()
writelist(fontlist, outfile)
else:
fontlist = readfile(args.filename)
sortedlist = sorted(fontlist, key=lambda font: font[0], reverse=True)
for i in sortedlist:
print(i[1])
if __name__ == '__main__':
ap = argparse.ArgumentParser()
ap.add_argument('-f', '--filename',
help='json "use" file to load',
default='~/.config/fonts.json')
ap.add_argument('--new', help='create new (all zero) json file',
action='store_true', default=False)
ap.add_argument('--renew', help='load old json and add any new fonts')
ap.add_argument('-o', '--output', help='write to this output json file')
ap.add_argument('-i', '--increment', help="increment named font by 1")
main(ap.parse_args())

View file

@ -1,12 +1,11 @@
#!/bin/sh
URL=`dmenu -fn 'mOsOul for Powerline-10' -nb navy -nf chartreuse -sb black -sf orange -p "Url>" -l 8 < ~/bin/urllist`
URL=$(mybemenu < ~/bin/urllist)
if [ $URL ]; then
if [ "$URL" = "clipboard" ]; then
URL=`xclip -o`
URL=$(wl-paste)
fi
export http_proxy=192.168.42.5:8118
tabbed -r2 surf -e -a@Aa -BDfg $URL
badwolf ${URL}
fi

6
mybemenu Executable file
View file

@ -0,0 +1,6 @@
#!/bin/sh
FONT=$(for i in 'Giana' 'Athene' 'Torrance' 'Fairfax HD' 'Pet Me 128 2Y' 'Curtain Call,Curtain Call';
do echo $i; done | sort --sort=random | head -1 )
bemenu -i -p Menu -P '->' -l 8 -m -1 --fn "${FONT} 16" $@

5
randswaybg.sh Executable file
View file

@ -0,0 +1,5 @@
#!/bin/sh
for DISPLAY in $(swaymsg -t get_outputs -r | grep name | cut -d \" -f 4); do
PIC=$(find ~/pix | shuf | head -n 1)
swaybg --output "${DISPLAY}" -i "${PIC}" -m fill &
done

14
sortedmonofontpick.sh Executable file
View file

@ -0,0 +1,14 @@
#!/bin/zsh
MENU=mybemenu
#PICKST=$(ls ~/bin/st* | ${MENU} )
#PICKFOOT=
#F=$(fc-list :spacing=mono| cut -d: -f2 | sort | uniq | rofi -dmenu -i)
F=$(python ~/bin/fontsbyuse.py | ${MENU})
if [[ ${F} ]]; then
S=$(seq 24 -4 8 |sed -e '1 s/^/20\n/' | ${MENU})
C=$(ls ~/.config/foot/ | grep -v \~ | sort --sort=random | ${MENU})
#dmenu -l 8 -fn 'Px437_ATI_SmallW_6x8 NF:style=Book:pixelsize=16:antialias=true'`
python ~/bin/fontsbyuse.py -i "${F}"
foot -c ~/.config/foot/${C} -f "${F}-${S},Symbola-${S},Noto Color Emoji-${S}"
fi
#echo foot -c ~/.config/foot/${C} -f \"${F}-${S},Symbola-${S},Noto Color Emoji-${S}\"

14
urllist
View file

@ -1,9 +1,9 @@
https://startpage.com
https://duckduckgo.com
http://gitlabrador.amigadns.com
https://search.fuckoffgoogle.net
https://mistertee.amigadns.com
http://gitea.amigadns.net:3000/
https://brutaldon.online
https://raining.amigadns.com/
https://github.com
http://eurasia.nu
https://rockpapershotgun.com
https://my.safaribooksonline.com
http://192.168.42.2/mopidy
clipboard
http://192.168.42.10/

29
zshrc
View file

@ -1,3 +1,10 @@
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
[[ $TERM == "dumb" ]] && unsetopt zle && PS1='$ ' && return
echo "Loading zgen..."
@ -19,11 +26,14 @@ if [[ ${TERM} == st* ]]; then
export TERM=xterm-256color
fi
fi
if [[ ${TERM} == foot ]]; then
export TERM=xterm-256color
fi
unsetopt beep
bindkey -e
export LESS="-X -R -F"
alias http='python -m http.server'
export PATH=$HOME/bin:/usr/local/bin:$PATH
export PAGER=most
export EDITOR=mg
@ -64,12 +74,9 @@ fi
if [[ ${TERM} == linux ]]; then
prompt pure
else
# . ~/bin/powerlevel_vars
prompt powerlevel10k
fi
#alias t=todo.sh
unalias rm
unalias mv
unalias cp
@ -79,4 +86,16 @@ unalias cp
setopt NO_SHARE_HISTORY
setopt HIST_EXPIRE_DUPS_FIRST
cyan pyenv
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
if command -v pyenv 1>/dev/null 2>&1; then
eval "$(pyenv init -)"
fi
yellow All Done!
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh