diff options
Diffstat (limited to '.local/share/mode/reload.d')
-rw-r--r-- | .local/share/mode/reload.d/brave | 11 | ||||
-rwxr-xr-x | .local/share/mode/reload.d/dunst | 4 | ||||
-rwxr-xr-x | .local/share/mode/reload.d/fcitx5 | 3 | ||||
-rwxr-xr-x | .local/share/mode/reload.d/gtk | 10 | ||||
-rwxr-xr-x | .local/share/mode/reload.d/nvim | 5 | ||||
-rwxr-xr-x | .local/share/mode/reload.d/polybar | 3 | ||||
-rwxr-xr-x | .local/share/mode/reload.d/term | 30 | ||||
-rwxr-xr-x | .local/share/mode/reload.d/wall | 3 |
8 files changed, 69 insertions, 0 deletions
diff --git a/.local/share/mode/reload.d/brave b/.local/share/mode/reload.d/brave new file mode 100644 index 0000000..62fb08c --- /dev/null +++ b/.local/share/mode/reload.d/brave @@ -0,0 +1,11 @@ +#!/bin/sh + + +# - navigate to brave://settings +# - run `chrome.send("setBraveThemeType", [THEME_ENUM])` in js console +# values 1: dark +# 2: light +# - navigate to brave://extensions +# - run `chrome.send("setBraveThemeType", [THEME_ENUM])` in js console +# - run `chrome.developerPrivate.loadUnpacked()` (TODO: how to handle inputting file path non-interactively) +# TODO: how to use chromedriver from script (preferably without nodejs+npm or python3+pip dependencies?) diff --git a/.local/share/mode/reload.d/dunst b/.local/share/mode/reload.d/dunst new file mode 100755 index 0000000..3c09a31 --- /dev/null +++ b/.local/share/mode/reload.d/dunst @@ -0,0 +1,4 @@ +#!/bin/sh +killall dunst +fork dunst + diff --git a/.local/share/mode/reload.d/fcitx5 b/.local/share/mode/reload.d/fcitx5 new file mode 100755 index 0000000..cd27698 --- /dev/null +++ b/.local/share/mode/reload.d/fcitx5 @@ -0,0 +1,3 @@ +#!/bin/sh +fork fcitx5 -rd + diff --git a/.local/share/mode/reload.d/gtk b/.local/share/mode/reload.d/gtk new file mode 100755 index 0000000..178f895 --- /dev/null +++ b/.local/share/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/.local/share/mode/reload.d/nvim b/.local/share/mode/reload.d/nvim new file mode 100755 index 0000000..84ae847 --- /dev/null +++ b/.local/share/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/.local/share/mode/reload.d/polybar b/.local/share/mode/reload.d/polybar new file mode 100755 index 0000000..af39394 --- /dev/null +++ b/.local/share/mode/reload.d/polybar @@ -0,0 +1,3 @@ +#!/bin/sh +polybar-msg cmd restart > /dev/null + diff --git a/.local/share/mode/reload.d/term b/.local/share/mode/reload.d/term new file mode 100755 index 0000000..5f02463 --- /dev/null +++ b/.local/share/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/.local/share/mode/reload.d/wall b/.local/share/mode/reload.d/wall new file mode 100755 index 0000000..f6c2e41 --- /dev/null +++ b/.local/share/mode/reload.d/wall @@ -0,0 +1,3 @@ +#!/bin/sh +rwall + |