diff options
| author | Mike Vink <ivi@vinkies.net> | 2025-06-30 19:47:04 +0200 |
|---|---|---|
| committer | Mike Vink <ivi@vinkies.net> | 2025-06-30 19:47:04 +0200 |
| commit | e52c488b31ac5cdebcc2ee770026d49e52a40fe4 (patch) | |
| tree | 5dd075965f28eacd0090b0f6179ef5dfb3453355 | |
| parent | 49c4a121cc6ca89a79eb55149719edd5ae08dffe (diff) | |
bunch of cool things
| -rw-r--r-- | .config/dunst/dunstrc | 2 | ||||
| -rw-r--r-- | .config/kak/kakrc | 14 | ||||
| -rw-r--r-- | .config/khal/config | 10 | ||||
| -rw-r--r-- | .config/lf/lfrc | 9 | ||||
| -rw-r--r-- | .config/ncmpcpp/config | 2 | ||||
| -rw-r--r-- | .config/shell/profile | 6 | ||||
| -rw-r--r-- | .config/x11/xprofile | 4 | ||||
| -rwxr-xr-x | .local/bin/rk | 2 | ||||
| -rwxr-xr-x | .local/bin/sb-clock | 2 | ||||
| -rwxr-xr-x | .local/bin/sb-pomodoro | 15 | ||||
| -rwxr-xr-x | .local/bin/shortcuts | 5 | ||||
| -rwxr-xr-x | .local/bin/vis-clipboard | 2 |
12 files changed, 47 insertions, 26 deletions
diff --git a/.config/dunst/dunstrc b/.config/dunst/dunstrc index f78e4d8..eb11282 100644 --- a/.config/dunst/dunstrc +++ b/.config/dunst/dunstrc @@ -2,7 +2,7 @@ monitor = 0 follow = keyboard width = 370 - height = (0,350) + height = (0,550) offset = (0,19) padding = 2 horizontal_padding = 2 diff --git a/.config/kak/kakrc b/.config/kak/kakrc index 7966d70..eceb4f3 100644 --- a/.config/kak/kakrc +++ b/.config/kak/kakrc @@ -109,3 +109,17 @@ alias global bf buffer-first alias global bl buffer-last alias global bo buffer-only alias global bo! buffer-only-force +define-command -override el %{ + execute-keys %sh{ + printf "%s" "<esc>:e ${kak_buffile%/*}/" + } +} +map global user e "<esc>:el<ret>" +define-command -override -params 1 C %{ + execute-keys %sh{ + printf "%s" "<esc>:cd " + printenv "${@}" + printf "%s" "<ret>" + } +} +map global user c "<esc>:C " diff --git a/.config/khal/config b/.config/khal/config index 28b3b46..fd091c8 100644 --- a/.config/khal/config +++ b/.config/khal/config @@ -1,11 +1,7 @@ [default] default_calendar = home [calendars] - [[home]] - path = ~/Sync/pim/home - color = dark green + [[calendars]] + type = discover + path = ~/calendars/* priority = 20 - [[work]] - path = ~/Sync/pim/work - color = dark cyan - priority = 30 diff --git a/.config/lf/lfrc b/.config/lf/lfrc index 449a0c2..0c9296f 100644 --- a/.config/lf/lfrc +++ b/.config/lf/lfrc @@ -125,7 +125,7 @@ cmd bulkrename ${{ echo "$fs" > "$tmpfile_old" echo "$fs" > "$tmpfile_new" - $EDITOR "$tmpfile_new" + ${BLOCKING_EDITOR:-kak} "$tmpfile_new" [ "$(wc -l < "$tmpfile_old")" -eq "$(wc -l < "$tmpfile_new")" ] || { rm -f "$tmpfile_old" "$tmpfile_new"; exit 1; } @@ -160,7 +160,7 @@ map gh map g top map D delete map E extract -map C copyto +# map C copyto map M moveto map <c-n> push :mkdir<space>""<left> map <c-r> reload @@ -172,7 +172,8 @@ map o &mimeopen "$f" map O $mimeopen --ask "$f" map A :rename; cmd-end # at the very end -map c push A<c-u> # new rename +# map c push A<c-u> # new rename +map c push &:cd!<enter> map I :rename; cmd-home # at the very beginning map i :rename # before extension map a :rename; cmd-right # after extension @@ -187,3 +188,5 @@ map V push :!nvim<space> map W $setsid -f $TERMINAL >/dev/null 2>&1 map Y $printf "%s" "$fx" | xclip -selection clipboard + +source "~/.config/lf/shortcutrc" diff --git a/.config/ncmpcpp/config b/.config/ncmpcpp/config index 1e2a8b0..c1c913e 100644 --- a/.config/ncmpcpp/config +++ b/.config/ncmpcpp/config @@ -22,7 +22,7 @@ media_library_albums_split_by_date = no startup_screen = "media_library" display_volume_level = no ignore_leading_the = yes -external_editor = nvim +external_editor = kak use_console_editor = yes empty_tag_color = magenta main_window_color = white diff --git a/.config/shell/profile b/.config/shell/profile index 479fb76..27abe34 100644 --- a/.config/shell/profile +++ b/.config/shell/profile @@ -15,8 +15,14 @@ then d="/run/user/$(id -u)" fi fi +# Starts a gpg-agents and configures it as ssh-agent. +eval $(gpg-agent --daemon 2>/dev/null) +export GPG_TTY="$(tty)" +export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) + export TERMINAL="st" export EDITOR="kak-desktop" +export BLOCKING_EDITOR="kak" export GIT_EDITOR="kak" export BROWSER="firefox" diff --git a/.config/x11/xprofile b/.config/x11/xprofile index b32d1cb..45bf02e 100644 --- a/.config/x11/xprofile +++ b/.config/x11/xprofile @@ -17,10 +17,6 @@ done >/dev/null 2>&1 pidof -sx "redshift" || redshift -l -8.703101934543335:115.17989920854698 -b 1.0:0.8 & pidof -sx "unclutter" || unclutter -noevents & -# Starts a gpg-agents and configures it as ssh-agent. -export GPG_TTY="$(tty)" -export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) -gpgconf --launch gpg-agent & gpg-connect-agent updatestartuptty /bye > /dev/null & # Ensure that xrdb has finished running before moving on to start the WM/DE. diff --git a/.local/bin/rk b/.local/bin/rk index 63b05cd..d2b072d 100755 --- a/.local/bin/rk +++ b/.local/bin/rk @@ -1,3 +1,3 @@ #!/bin/sh rg --vimgrep "$@" | - c s -e 'db! *grep*; rename-buffer *grep*; set-option window filetype grep; evaluate-commands -try-client %opt{toolsclient} %{ buffer *grep*; set-option window filetype grep }' + c "${KAKOUNE_SESSION:-s}" -e 'db! *grep*; rename-buffer *grep*; set-option window filetype grep; evaluate-commands -try-client %opt{toolsclient} %{ buffer *grep*; set-option window filetype grep }' diff --git a/.local/bin/sb-clock b/.local/bin/sb-clock index e7dc172..b4b9aec 100755 --- a/.local/bin/sb-clock +++ b/.local/bin/sb-clock @@ -20,7 +20,7 @@ esac case $BLOCK_BUTTON in 1) notify-send "This Month" "$(cal --color=always | sed "s/..7m/<b><span color=\"cyan\">/;s|..0m|</span></b>|")" && { - msg="$(khal list now 14d -f "{calendar-color} {start-time} {title} {status} {description} + msg="$(khal list now 14d -f "{calendar-color} {start-time} {title} {status} {title} " | sed "s/..7m/<b><span color=\"cyan\">/;s|..0m|</span></b>|")" [ -n "$msg" ] && notify-send -t 100000 "$msg" } diff --git a/.local/bin/sb-pomodoro b/.local/bin/sb-pomodoro index 1eb222a..5f3a870 100755 --- a/.local/bin/sb-pomodoro +++ b/.local/bin/sb-pomodoro @@ -4,14 +4,18 @@ # When clicked, brings up `newsboat`. case $BLOCK_BUTTON in - 1) setsid -f pomodoro start >/dev/null ;; - 2) setsid -f pomodoro finish >/dev/null ;; + 1) setsid -f pomodoro start >/dev/null ; pkill -RTMIN+26 dwmblocks ;; + 2) + setsid -f pomodoro finish >/dev/null + sh -c 'pomodoro break >/dev/null; notify-send -t 100000 "Breaktime over" "Fight against time compression. Build psychic depth. Remember."' & + pkill -RTMIN+26 dwmblocks + ;; 3) notify-send "🍅 Pomodoro module" "\- Shows current pomodoro status - Shows ⏱ if a Pomodoro is running - Left click starts a new Pomodoro - Middle click finishes a Pomodoro early -- Shift click opens ~/.pomodoro in editor" ;; - 6) "$TERMINAL" -e "$EDITOR" "$HOME/.pomodoro" ;; +- Shift click opens ~/.pomodoro in editor" ; pkill -RTMIN+26 dwmblocks ;; + 6) "$TERMINAL" -e "lf" "$HOME/.pomodoro" ;; esac if ! status=$(pomodoro status); then @@ -25,7 +29,8 @@ if [ -z "$status" ]; then msg="$daily_completed/$daily_total🍅" if [ "$daily_completed" -ne "0" ]; then seconds_since_last_started="$(( $(date +%s -u) - $(tail -n1 ~/.pomodoro/history | cut -f1 -d' ' | xargs -I{} date -d"{}" +%s -u) ))" - seconds_since_last="$(( "$seconds_since_last_started" - 60*$(tail -n1 ~/.pomodoro/history | cut -f2 -d' ' | cut -f2 -d'=')))" + duration="$(tail -n1 ~/.pomodoro/history | cut -f2 -d' ' | cut -f2 -d'=')" + seconds_since_last="$(( "$seconds_since_last_started" - 60*${duration:-0} ))" if [ "$seconds_since_last" -lt 0 ]; then seconds_since_last=0 fi diff --git a/.local/bin/shortcuts b/.local/bin/shortcuts index 4d53bc5..692e95d 100755 --- a/.local/bin/shortcuts +++ b/.local/bin/shortcuts @@ -22,12 +22,13 @@ printf "alias " > "$shell_shortcuts" eval "echo \"$(cat "$bmdirs"; for i in "$bmdirs_dir"/*; do cat $i; done)\"" | \ awk "!/^\s*#/ && !/^\s*\$/ {gsub(\"\\\s*#.*$\",\"\"); printf(\"%s=\42cd %s && ls -A\42 \\\\\n\",\$1,\$2) >> \"$shell_shortcuts\" ; - printf(\"[ -n \42%s\42 ] && export %s=\42%s\42 \n\",\$1,\$1,\$2) >> \"$shell_env_shortcuts\" }" + printf(\"[ -n \42%s\42 ] && export %s=\42%s\42 \n\",\$1,\$1,\$2) >> \"$shell_env_shortcuts\" ; + printf(\"map C%s cd \42%s\42 \n\",\$1,\$2) >> \"$lf_shortcuts\" ; }" # " printf(\"hash -d %s=%s \n\",\$1,\$2) >> \"$zsh_named_dirs\" ; # printf(\"abbr %s \42cd %s; and ls -A\42\n\",\$1,\$2) >> \"$fish_shortcuts\" ; # printf(\"map g%s :cd %s<CR>\nmap t%s <tab>:cd %s<CR><tab>\nmap M%s <tab>:cd %s<CR><tab>:mo<CR>\nmap Y%s <tab>:cd %s<CR><tab>:co<CR> \n\",\$1,\$2, \$1, \$2, \$1, \$2, \$1, \$2) >> \"$vifm_shortcuts\" ; # printf(\"config.bind(';%s', \42set downloads.location.directory %s ;; hint links download\42) \n\",\$1,\$2) >> \"$qute_shortcuts\" ; -# printf(\"map C%s cd \42%s\42 \n\",\$1,\$2) >> \"$lf_shortcuts\" ; + # printf(\"cmap ;%s %s\n\",\$1,\$2) >> \"$vim_shortcuts\" " # Format the `files` file in the correct syntax and sent it to both configs. diff --git a/.local/bin/vis-clipboard b/.local/bin/vis-clipboard index 4642761..d948832 100755 --- a/.local/bin/vis-clipboard +++ b/.local/bin/vis-clipboard @@ -22,7 +22,7 @@ Options: } vc_determine_command() { - if command -v osc >/dev/null 2>&1; then + if command -v osc >/dev/null 2>&1 && [ -t 1 ]; then echo 'osc' return 0 fi |
