config: improve helpers

This commit is contained in:
xeruf 2021-10-12 08:43:04 +02:00
parent b73a5d7e37
commit c39ee5d7b8
5 changed files with 25 additions and 4 deletions

View File

@ -439,6 +439,10 @@
{ {
"data": "Stretch", "data": "Stretch",
"enabled": true "enabled": true
},
{
"data": "Journal your day",
"enabled": "expr $(date +%H) \/ 2 - $(jrnl -from '20 hours ago' | wc -l)"
} }
], ],
"showBreaksAsRegularWindows": false, "showBreaksAsRegularWindows": false,
@ -447,4 +451,4 @@
"pauseBreaksShortcut": "", "pauseBreaksShortcut": "",
"resumeBreaksShortcut": "", "resumeBreaksShortcut": "",
"screen": "primary" "screen": "primary"
} }

View File

@ -49,6 +49,8 @@
;; ...Or *all* packages (NOT RECOMMENDED; will likely break things) ;; ...Or *all* packages (NOT RECOMMENDED; will likely break things)
;(unpin! t) ;(unpin! t)
(package! emms)
(unpin! org-journal) (unpin! org-journal)
(package! evil-args) ; motions in args (package! evil-args) ; motions in args

View File

@ -79,7 +79,7 @@
[alias] [alias]
fzf = !fzf --preview='git diff HEAD --color=always -- {}' --tiebreak=end,index --multi fzf = !fzf --preview='git diff HEAD --color=always -- {}' --tiebreak=end,index --multi
fzs = !cut -z -c2- | git fzf --read0 -d' ' --nth=2.. --bind='alt-enter:execute(nvim {2..})' --preview='test {1} != \\? && git diff --color -- HEAD {2..} | $(git config interactive.diffFilter) || find {2..} -type f | xargs -I% diff --recursive --color=always -u /dev/null %' | cut -c3- fzs = !cut -z -c2- | git fzf --read0 -d' ' --nth=2.. --bind='alt-enter:execute(nvim {2..})' --preview='test {1} != \\? && git diff --color HEAD -- {2..} | $(git config interactive.diffFilter) || find {2..} -type f | xargs -I% diff --recursive --color=always -u /dev/null %' | cut -c3-
# GET INFO # GET INFO
s = !git stl && git stb s = !git stl && git stb

14
.config/ncmpc/keys Normal file
View File

@ -0,0 +1,14 @@
## Key bindings for ncmpc (generated by ncmpc)
## Select currently playing song
key select-playing = Ctrl-P
## Help screen
key screen-help = '1', F1
## Play/Enter directory
key play = Ctrl-M, 'l'
## Go to parent directory
key go-parent-directory = 34, 'h'

View File

@ -7,8 +7,9 @@ y() {
test "$#" -eq 0 && yadm s || yadm "$@" test "$#" -eq 0 && yadm s || yadm "$@"
} }
yc() { yc() {
echo "config/$1:" >/tmp/yc-msg folder=${1:-${PWD/$XDG_CONFIG_HOME\/}}
yadm commit -v --template /tmp/yc-msg ${@:2} -- "$XDG_CONFIG_HOME/$1" echo "config/$folder:" >/tmp/yc-msg
yadm commit -v --template /tmp/yc-msg ${@:2} -- "$XDG_CONFIG_HOME/$folder"
} }
alias sysyadm="sudo yadm -Y /etc/yadm" alias sysyadm="sudo yadm -Y /etc/yadm"