diff options
author | Ensa <@> | 2020-05-01 17:39:45 -0700 |
---|---|---|
committer | Ensa <@> | 2020-05-01 17:39:45 -0700 |
commit | 2b52ba86897ed947976d560fc1a1eb1a8499c451 (patch) | |
tree | d1a0d2d82a7907d308b99bbd3fc827cfad20f981 /config | |
parent | c4632455cff4a5097a3a35ad9d0531388776d028 (diff) | |
download | cfg-2b52ba86897ed947976d560fc1a1eb1a8499c451.tar.gz |
cwm added, general updates, etc
bother made the WM detection and X startup file detection more robust comm-sel replaced 6cord with cordless made the default case do nothing so it's less annoying lh removed ipc-server garbage changed the audio group to allow for streaming audio to mpv (this works with livestream audio files) mbsync-cron moved config file to $XDG_CONFIG_HOME/mbsync/mbsyncrc made error exits actually error (helps with crontab -n) renamed old popmail touch file to something more nominally appropriate same with notify-send --app-name cwmrc reading it, DEPENDENCIES.md, and `man cwmrc` will more than explain everything in here. except the commented binds, these are behaviours cwm does not have. completions.ksh self-explanatory. read it. diraliases added ~bin for user binaries dir added ~ksh for ksh config dir added ~pass for password database kshrc added safeguards for ensuring used directories exist switched lfcd source to a test and source prompt.ksh better sep symbols git branch occupies less space lfrc added auto-upload to ttm.sh, bound to t init.vim switched colourscheme to zellner removed syntastic checker specifiers, now uses aggregate checks. syntastic_c_compiler set to cc, symlink your preferred compiler to ~bin/cc switched ectags to ctags enabled folds shrc ALTSCR: terminal you want to use for programs that already have scrollback. set to "$TERMINAL" if you don't have one. fiddled with LESS, hopefully better now $TODO is the file todo(1) uses. ENV: file ksh sources on startup. 6cord.toml removed because it's abandoned now. colors-wal-dwm.h removed because i don't use dwm anymore. dunstrc, zathurarc now uses cozette font
Diffstat (limited to 'config')
-rw-r--r-- | config/cwmrc | 148 | ||||
-rw-r--r-- | config/ksh/completions.ksh | 44 | ||||
-rw-r--r-- | config/ksh/diraliases | 4 | ||||
-rw-r--r-- | config/ksh/kshrc | 8 | ||||
-rw-r--r-- | config/ksh/prompt.ksh | 6 | ||||
-rw-r--r-- | config/lf/lfrc | 9 | ||||
-rw-r--r-- | config/nvim/init.vim | 13 | ||||
-rw-r--r-- | config/shrc | 11 | ||||
-rw-r--r-- | config/wal/templates/6cord.toml | 14 | ||||
-rw-r--r-- | config/wal/templates/colors-wal-dwm.h | 13 | ||||
-rw-r--r-- | config/wal/templates/dunstrc | 2 | ||||
-rw-r--r-- | config/wal/templates/zathurarc | 2 |
12 files changed, 231 insertions, 43 deletions
diff --git a/config/cwmrc b/config/cwmrc new file mode 100644 index 0000000..34ff841 --- /dev/null +++ b/config/cwmrc @@ -0,0 +1,148 @@ +#gap for status bar +gap 13 0 0 0 +#enable sticky groups +sticky yes +#autogroup rules +autogroup 1 St +autogroup 3 mail +autogroup 4 comm +autogroup 5 music +autogroup 5 mpv +autogroup 8 tabbed +autogroup 9 pass +#aesthetics +fontname "Cozette:pixelsize=11" +borderwidth 1 +color activeborder "#6b996b" +color inactiveborder "#4c4635" +color groupborder "#3c7b7f" +color ungroupborder "#cc3214" +color menubg "#14130e" +color menufg "#b7a980" +color font "#3d6266" +color selfont "#72694f" +#binds +#don't want any default keys +unbind-key all +unbind-mouse all +#program list +command term st +command lock slock +#program spawning +#bind-key 4-d dmenu_run +bind-key 4-d menu-exec +bind-key 4S-d menu-cmd +bind-key 4C-d menu-window-hidden +bind-key 4-Return terminal +#bind-key 4S-Return "sh -c \"$TERMINAL -c popup" +bind-key 4-e "sh -c \"$ALTSCR -t nvim -e env TERM=stterm-16color $EDITOR\"" +#bind-key 4S-e "sh -c \"$TERMINAL -t nvim -c popup -e env TERM=stterm-16color $EDITOR" +bind-key 4-w "sh -c \"$BROWSER $HOMEPAGE\"" +bind-key 4S-c "sh -c \"$COMM\"" +bind-key 4-a "sh -c \"$TERMINAL -c pass -e kpcli --kdb=$XDG_DATA_HOME/KeePass/database.kdbx\"" +bind-key 4-s "sh -c \"lh `xclip -o`\"" +bind-key 4S-s "sh -c \"lh `xclip -sel clip -o`\"" +bind-key 4-m "sh -c \"$ALTSCR -c musictui -e $MUSIC\"" +bind-key 4-c "sh -c \"$ALTSCR -c mail -e $MAILER\"" +bind-key 4-n "sh -c \"$ALTSCR -e $RSS\"" +bind-key 4-r "sh -c \"$ALTSCR -e $FILE\"" +bind-key 4S-r "sh -c \"$READER\"" +bind-key 4-p "sh -c \"$SCR $(xdg-user-dir PICTURES)/screenshot-$(date +%Y-%m-%d_%T).png\"" +bind-key 4S-p "sh -c \"$SCR -s $(xdg-user-dir PICTURES)/screenshot-$(date +%Y-%m-%d_%T).png\"" +bind-key 4S-comma "mpc -q prev" +bind-key 4S-period "mpc -q next" +bind-key 4-apostrophe "mpc -q single" +bind-key 4-comma "mpc -q repeat" +bind-key 4-period "mpc -q toggle" +bind-key 4C-period "mpc -q volume +5" +bind-key 4C-comma "mpc -q volume -5" +bind-key 4CS-period "mpc -q volume +15" +bind-key 4CS-comma "mpc -q volume -15" +bind-key 4-equal "sndioctl -q output.level=+0.05" +bind-key 4-minus "sndioctl -q output.level=-0.05" +bind-key 4S-plus "sndioctl -q output.level=+0.15" +bind-key 4S-minus "sndioctl -q output.level=-0.15" +bind-key 4S-m "sndioctl -q output.mute=!" +bind-key 4C-equal "xbacklight -inc 5" +bind-key 4C-minus "xbacklight -dec 5" +bind-key 4CS-equal "xbacklight -inc 15" +bind-key 4CS-minus "xbacklight -dec 15" +bind-key 4-x lock +bind-key 4S-x "sh -c \"prompt 'shutdown computer?' 'doas shutdown -p now'\"" +bind-key 4S-BackSpace "sh -c \"prompt 'reboot computer?' 'doas shutdown -r now'\"" +bind-key 4-b "sh -c \"pkill oxbar||oxbar -F $XDG_CONFIG_HOME/oxbar.conf\"" +#window nav +bind-key 4-j window-cycle +bind-key 4-k window-rcycle +#bind-key 4-i incnmaster {.i = +1 } +#bind-key 4-o incnmaster {.i = -1 } +#bind-key 4-h setmfact {.f = -0.05} +#bind-key 4-l setmfact {.f = +0.05} +#window moving +bind-key 4S-h window-move-left +bind-key 4S-j window-move-down +bind-key 4S-k window-move-up +bind-key 4S-l window-move-right +bind-key 4SM-h window-move-left-big +bind-key 4SM-j window-move-down-big +bind-key 4SM-k window-move-up-big +bind-key 4SM-l window-move-right-big +#window resize +bind-key 4C-h window-resize-left +bind-key 4C-j window-resize-down +bind-key 4C-k window-resize-up +bind-key 4C-l window-resize-right +bind-key 4CM-h window-resize-left-big +bind-key 4CM-j window-resize-down-big +bind-key 4CM-k window-resize-up-big +bind-key 4CM-l window-resize-right-big +#bind-key 4-space zoom +bind-key 4-Tab group-cycle +bind-key 4S-Tab group-rcycle +#window killing +bind-key 4-q window-close +bind-key 4S-q "sh -c \"kill -9 `xdotool getwindowfocus getwindowpid`\"" +#layouts +bind-key 4-f window-maximize +bind-key 4S-f window-fullscreen +bind-key 4-t window-vtile +bind-key 4S-t window-vmaximize +bind-key 4-y window-htile +bind-key 4S-y window-hmaximize +#bind-key 4S-space togglefloating +#special window modification +bind-key 4-0 group-toggle-all +bind-key 4S-0 window-stick +bind-key 4C-0 window-hide +#exits +bind-key 4-F2 restart +bind-key 4S-Escape quit +#group designation/nav +bind-key 4-g window-group +bind-key 4-1 group-only-1 +bind-key 4S-1 window-movetogroup-1 +bind-key 4C-1 group-toggle-1 +bind-key 4-2 group-only-2 +bind-key 4S-2 window-movetogroup-2 +bind-key 4C-2 group-toggle-2 +bind-key 4-3 group-only-3 +bind-key 4S-3 window-movetogroup-3 +bind-key 4C-3 group-toggle-3 +bind-key 4-4 group-only-4 +bind-key 4S-4 window-movetogroup-4 +bind-key 4C-4 group-toggle-4 +bind-key 4-5 group-only-5 +bind-key 4S-5 window-movetogroup-5 +bind-key 4C-5 group-toggle-5 +bind-key 4-6 group-only-6 +bind-key 4S-6 window-movetogroup-6 +bind-key 4C-6 group-toggle-6 +bind-key 4-7 group-only-7 +bind-key 4S-7 window-movetogroup-7 +bind-key 4C-7 group-toggle-7 +bind-key 4-8 group-only-8 +bind-key 4S-8 window-movetogroup-8 +bind-key 4C-8 group-toggle-8 +bind-key 4-9 group-only-9 +bind-key 4S-9 window-movetogroup-9 +bind-key 4C-9 group-toggle-9 diff --git a/config/ksh/completions.ksh b/config/ksh/completions.ksh new file mode 100644 index 0000000..d241be8 --- /dev/null +++ b/config/ksh/completions.ksh @@ -0,0 +1,44 @@ +#!/bin/ksh + +COMPLETIONFILES="$XDG_CACHE_HOME/ksh/precompletions" +if ! [[ -d $COMPLETIONFILES ]]; then + mkdir -p $COMPLETIONFILES; +fi +#pkg_* completions {{{1 +if ! [[ -e $COMPLETIONFILES/packages ]]; then + update_completion_packages +fi + +#set -A complete_pa -- $(<$COMPLETIONFILES/packages) +set -A complete_pd -- $(ls -1 /var/db/pkg) +#set -A complete_pi -- $complete_pa + +# }}} + +#man completions {{{2 +if ! [[ -e $COMPLETIONFILES/manpages ]]; then + update_completion_manpages +fi + +#set -A complete_man -- $(<$COMPLETIONFILES/manpages) + + +# }}} + +# pip completions {{{3 + +set -A complete_pip_1 -- install download uninstall freeze list show check config search wheel hash help +set -A complete_pip_2 -- --user +set -A complete_pip_3 -- --upgrade + +# pass completions +update_complete_pass() { + pass_list=$(pass ls) + set -A complete_pass_1 -- init passphrase add import show export ls + set -A complete_pass_2 -- $pass_list +} +update_complete_pass +pass_export() { pass export "$1" && update_complete_pass; } +pass_show() { pass show "$1" && update_complete_pass; } + +# }}} diff --git a/config/ksh/diraliases b/config/ksh/diraliases index f4546a5..99f710d 100644 --- a/config/ksh/diraliases +++ b/config/ksh/diraliases @@ -7,4 +7,6 @@ alias -d "src=$HOME/src"\ "data=$XDG_DATA_HOME"\ "write=$HOME/doc/writing"\ "crit=$HOME/doc/writing/critique"\ - "bin=$HOME/.local/bin" + "bin=$HOME/.local/bin"\ + "ksh=$HOME/.config/ksh"\ + "pass=$HOME/.local/share/pass" diff --git a/config/ksh/kshrc b/config/ksh/kshrc index bd8f48b..36350d0 100644 --- a/config/ksh/kshrc +++ b/config/ksh/kshrc @@ -7,9 +7,15 @@ fi FPATH=$XDG_CONFIG_HOME/ksh/functions HISTFILE=$XDG_DATA_HOME/ksh/histfile +if ! [[ -d $HISTFILE ]]; then + mkdir -p $HISTFILE; +fi HISTSIZE=5000 HISTCONTROL="ignoredups" TMPDIR=$XDG_CACHE_HOME/ksh +if ! [[ -d $TMPDIR ]]; then + mkdir -p $TMPDIR; +fi # shortcut for cloning GITHUB="https://github.com" # make pfetch show what i want @@ -24,7 +30,7 @@ fi set -o vi #load ksh external configs -. $XDG_CONFIG_HOME/lf/lfcd.sh +[[ -f "$XDG_CONFIG_HOME/lf/lfcd.sh" ]] && . "$XDG_CONFIG_HOME/lf/lfcd.sh" [[ -f "$KSHCONFIG/diraliases" ]] && . "$KSHCONFIG/diraliases" [[ -f "$XDG_CONFIG_HOME/aliasrc" ]] && . "$XDG_CONFIG_HOME/aliasrc" [[ -f "$KSHCONFIG/completions.ksh" ]] && . "$KSHCONFIG/completions.ksh" diff --git a/config/ksh/prompt.ksh b/config/ksh/prompt.ksh index e5dfaf5..c56d441 100644 --- a/config/ksh/prompt.ksh +++ b/config/ksh/prompt.ksh @@ -1,6 +1,6 @@ #!/bin/ksh -SEP="" -RSEP="" +SEP="" +RSEP="" #_PS1='\[\033['; #_END='m\]'; #_CLEAR=0; _FG_BLACK=30; _BG_BLACK=40 @@ -14,7 +14,7 @@ RSEP="" vcs() { if git status >/dev/null 2>&1; then _GIT_BRANCH="$(git branch|grep -F '*'|sed 's/* //')" - printf ' %s\n' "$_GIT_BRANCH" + printf ' %s' "$_GIT_BRANCH" fi } PS1='\[\033[7;32m\]$?\[\033[0;32;45m\]$SEP\[\033[0;7;35m\]\A$RSEP\[\033[0;1;31m\]\u\[\033[0;32m\]@\[\033[1;34m\]\h\[\033[7;36m\]$SEP\[\033[7m\]\w$RSEP\[\033[0;32m\]$(vcs)\n\[\033[0;32m\]\$\[\033[0m\] ' diff --git a/config/lf/lfrc b/config/lf/lfrc index e5e58cd..138c470 100644 --- a/config/lf/lfrc +++ b/config/lf/lfrc @@ -9,6 +9,14 @@ cmd open ${{ opener $f }} +cmd ttmsh ${{ + TTMURL="curl -F 'file=@-' https://ttm.sh < $f" + if [ -n "$TTMURL" ]; then + echo "$TTMURL"|tee "$HOME/ttmsh"|xclip -r + done + notify-send 'successfully uploaded to ttm!' 'link copied to selection, backup is in $HOME/ttmsh' +}} + cmd rename %[ -e $1 ] && printf "file exists" || mv $f $1 # binds @@ -19,3 +27,4 @@ map <enter> shell map R reload map x $$f map X !$f +map t ttmsh diff --git a/config/nvim/init.vim b/config/nvim/init.vim index 0632b5d..64e6dfe 100644 --- a/config/nvim/init.vim +++ b/config/nvim/init.vim @@ -34,7 +34,7 @@ call plug#end() " end of vim-plug related lines -colo delek +colo zellner " productivity binds @@ -79,9 +79,8 @@ let g:syntastic_auto_loc_list = 1 let g:syntastic_check_on_open = 1 let g:syntastic_check_on_wq = 0 -let g:syntastic_c_checkers = ["cppcheck"] -let g:syntastic_cpp_checkers = ["cppcheck"] -let g:syntastic_sh_checkers = ["shellcheck", "sh"] +let g:syntastic_aggregate_errors = 1 +let g:syntastic_c_compiler = "cc" " lightline config set noshowmode @@ -98,11 +97,11 @@ set path+=** cno w!! exe 'sil! w !doas tee % >/dev/null' <bar> e! nno <space> :noh<return><space> " add a ctags shortcut like a shitty goblin -com! MakeTags !ectags -R . -" make make work when im learning c -autocmd BufRead $HOME/src/me/c-practice/*.c set makeprg=pcc\ -ansi\ % +com! MakeTags !ctags ./* " calcurse notes should be treated as markdown autocmd BufRead,BufNewFile /tmp/calcurse* set filetype=markdown autocmd BufRead,BufNewFile ~/.local/share/calcurse/notes/* set filetype=markdown " ksh should work autocmd FileType ksh let g:is_kornshell = 1 +" good folds +set foldmethod=marker diff --git a/config/shrc b/config/shrc index bc5162e..3529cb1 100644 --- a/config/shrc +++ b/config/shrc @@ -10,20 +10,27 @@ export EDITOR="nvim" export FILE="lf" export PAGER="less" export TERMINAL="st" +export ALTSCR="st-altscreen" export BROWSER="firefox" export COMM="comm-sel" export READER="zathura" export MAILER="neomutt" export MUSIC="ncmpcpp" export RSS="newsboat" -export ISH="ksh" export SCR="maim" export LOCK="slock" -export LESS='-iMRS -x2' +#less args +export LESS='-iFMRX~ -x2' +#locale info export LANGUAGE="en" export LANG="POSIX.UTF-8" export LC_ALL="POSIX.UTF-8" +#lscolor export CLICOLOR=1 +#todo(1) +export TODO="$HOME/doc/todo" +#ksh +export ENV="$XDG_CONFIG_HOME/ksh/kshrc" #cleanup paths export GTK2_RC_FILES="$XDG_CONFIG_HOME/gtk-2.0/gtkrc-2.0" diff --git a/config/wal/templates/6cord.toml b/config/wal/templates/6cord.toml deleted file mode 100644 index 52b5321..0000000 --- a/config/wal/templates/6cord.toml +++ /dev/null @@ -1,14 +0,0 @@ -# comment to get vim to recognize the ft -token = "" -[ properties ] - true-color = false - default-name-color = "{color7}" - mention-color = "{color5}" - mention-self-color = "{color14}" - compact-mode = false - syntax-highlight-colorscheme = "native" - show-emoji-urls = false - shorten-url = false - command-prefix = "[${{CHANNEL}}] " - default-status = "" - diff --git a/config/wal/templates/colors-wal-dwm.h b/config/wal/templates/colors-wal-dwm.h deleted file mode 100644 index eeea645..0000000 --- a/config/wal/templates/colors-wal-dwm.h +++ /dev/null @@ -1,13 +0,0 @@ -static const char norm_fg[] = "{color4}"; -static const char norm_bg[] = "{color0}"; -static const char norm_border[] = "{color8}"; - -static const char sel_fg[] = "{color1}"; -static const char sel_bg[] = "{color0}"; -static const char sel_border[] = "{color9}"; - -static const char *colors[][3] = {{ - /* fg bg border */ - [SchemeNorm] = {{ norm_fg, norm_bg, norm_border }}, // unfocused wins - [SchemeSel] = {{ sel_fg, sel_bg, sel_border }}, // the focused win -}}; diff --git a/config/wal/templates/dunstrc b/config/wal/templates/dunstrc index 61972d6..39a9a5e 100644 --- a/config/wal/templates/dunstrc +++ b/config/wal/templates/dunstrc @@ -24,7 +24,7 @@ idle_threshold = 120 ### Text ### - font = Terminus Medium 8 + font = Cozette Medium 8 line_height = 0 markup = full diff --git a/config/wal/templates/zathurarc b/config/wal/templates/zathurarc index ebb74ca..558b341 100644 --- a/config/wal/templates/zathurarc +++ b/config/wal/templates/zathurarc @@ -32,4 +32,4 @@ set render-loading-fg "{color15}" set window-title-home-tilde true set statusbar-basename true set selection-clipboard clipboard -set font "SauceCodePro Nerd Font Mono 10" +set font "Cozette 10" |