diff options
author | lonkaars <loek@pipeframe.xyz> | 2024-03-08 18:29:41 +0100 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2024-03-08 18:29:41 +0100 |
commit | dce8fe36eb7f550f648cb83ab890ce638ca819d0 (patch) | |
tree | 474071a3975d205f71f2303d3dc6c08a9d7e229c /.config/mode/reload.d | |
parent | d11179e429f69340bafad5a66edbb6f89b78b5b7 (diff) |
clean up + modularize `mode` source code
Diffstat (limited to '.config/mode/reload.d')
-rwxr-xr-x | .config/mode/reload.d/dunst | 4 | ||||
-rwxr-xr-x | .config/mode/reload.d/fcitx5 | 3 | ||||
-rwxr-xr-x | .config/mode/reload.d/gtk | 10 | ||||
-rwxr-xr-x | .config/mode/reload.d/nvim | 5 | ||||
-rwxr-xr-x | .config/mode/reload.d/polybar | 3 | ||||
-rwxr-xr-x | .config/mode/reload.d/term | 30 | ||||
-rwxr-xr-x | .config/mode/reload.d/wall | 3 |
7 files changed, 58 insertions, 0 deletions
diff --git a/.config/mode/reload.d/dunst b/.config/mode/reload.d/dunst new file mode 100755 index 0000000..3c09a31 --- /dev/null +++ b/.config/mode/reload.d/dunst @@ -0,0 +1,4 @@ +#!/bin/sh +killall dunst +fork dunst + diff --git a/.config/mode/reload.d/fcitx5 b/.config/mode/reload.d/fcitx5 new file mode 100755 index 0000000..cd27698 --- /dev/null +++ b/.config/mode/reload.d/fcitx5 @@ -0,0 +1,3 @@ +#!/bin/sh +fork fcitx5 -rd + diff --git a/.config/mode/reload.d/gtk b/.config/mode/reload.d/gtk new file mode 100755 index 0000000..178f895 --- /dev/null +++ b/.config/mode/reload.d/gtk @@ -0,0 +1,10 @@ +#!/bin/sh +# this is max jank but xfsettingsd does other things besides live gtk theme +# reloading, and i don't like having it running constantly because it fucks +# up fcitx5 and xbindkeys +( + fork xfsettingsd + sleep 1 + killall xfsettingsd +) + diff --git a/.config/mode/reload.d/nvim b/.config/mode/reload.d/nvim new file mode 100755 index 0000000..84ae847 --- /dev/null +++ b/.config/mode/reload.d/nvim @@ -0,0 +1,5 @@ +#!/bin/sh +nvr --serverlist | while read -r nvim_socket ; do + fork nvr --nostart --servername "$nvim_socket" -c 'source $XDG_CONFIG_HOME/nvim/mode.vim' +done + diff --git a/.config/mode/reload.d/polybar b/.config/mode/reload.d/polybar new file mode 100755 index 0000000..af39394 --- /dev/null +++ b/.config/mode/reload.d/polybar @@ -0,0 +1,3 @@ +#!/bin/sh +polybar-msg cmd restart > /dev/null + diff --git a/.config/mode/reload.d/term b/.config/mode/reload.d/term new file mode 100755 index 0000000..5f02463 --- /dev/null +++ b/.config/mode/reload.d/term @@ -0,0 +1,30 @@ +#!/bin/sh +escape_msgs="$(cat << EOF | tr -d '\n' +\033]11;$bg\007 +\033]10;$fg\007 +\033]12;$fg\007 +\033]14;$bg\007 +\033]13;$fg\007 +\033]17;$color8\007 +\033]708;$bg\007 +\033]4;0;$color0\007 +\033]4;1;$color1\007 +\033]4;2;$color2\007 +\033]4;3;$color3\007 +\033]4;4;$color4\007 +\033]4;5;$color5\007 +\033]4;6;$color6\007 +\033]4;7;$color7\007 +\033]4;8;$color8\007 +\033]4;9;$color9\007 +\033]4;10;$color10\007 +\033]4;11;$color11\007 +\033]4;12;$color12\007 +\033]4;13;$color13\007 +\033]4;14;$color14\007 +\033]4;15;$color15\007 +EOF +)" + +find /dev/pts -exec sh -c "printf \"$escape_msgs\" > {}" \; 2> /dev/null + diff --git a/.config/mode/reload.d/wall b/.config/mode/reload.d/wall new file mode 100755 index 0000000..f6c2e41 --- /dev/null +++ b/.config/mode/reload.d/wall @@ -0,0 +1,3 @@ +#!/bin/sh +rwall + |