diff options
author | Anthony Wang | 2024-11-22 22:27:20 -0500 |
---|---|---|
committer | Anthony Wang | 2024-11-22 22:27:20 -0500 |
commit | 39e70197454023cd01b559c8f9c1af81028dc6f2 (patch) | |
tree | aa520dbc28e1faff1b3df986430cf1fea7d65a0b /fish | |
parent | a4fa177b3f84d8c1cb8b77e08475d973bcee8032 (diff) |
Replace autostart .desktop files with systemd services and fish functions
Diffstat (limited to 'fish')
-rw-r--r-- | fish/functions/backup.fish | 5 | ||||
-rw-r--r-- | fish/functions/switchvirtualkeyboard.fish | 16 |
2 files changed, 18 insertions, 3 deletions
diff --git a/fish/functions/backup.fish b/fish/functions/backup.fish index 4d1cadd..d0dd48f 100644 --- a/fish/functions/backup.fish +++ b/fish/functions/backup.fish @@ -1,11 +1,10 @@ function backup if not set -q HOSTNAME - set HOSTNAME (hostnamectl hostname) + set HOSTNAME (hostnamectl hostname) end - + cd ~/Documents/Backups/$HOSTNAME cp ~/.local/share/fish/fish_history . cp ~/.mozilla/firefox/*.default-release/places.sqlite . cp ~/.thunderbird/*.default-release/Mail/Feeds/feeds.json . - cd - end diff --git a/fish/functions/switchvirtualkeyboard.fish b/fish/functions/switchvirtualkeyboard.fish new file mode 100644 index 0000000..5700bf7 --- /dev/null +++ b/fish/functions/switchvirtualkeyboard.fish @@ -0,0 +1,16 @@ +function setvirtualkeyboard + echo "Starting $argv[1]" + kwriteconfig6 --file kwinrc --group Wayland --key InputMethod "$argv[1]" + busctl --user emit /kwinrc org.kde.kconfig.notify ConfigChanged "a{saay}" 1 Wayland 1 11 73 110 112 117 116 77 101 116 104 111 100 +end + +function switchvirtualkeyboard + busctl --user monitor --match "type='signal',interface='org.kde.KWin.TabletModeManager',member='tabletModeChanged'" | \ + while read -l line + if string match -q "*true*" $line + setvirtualkeyboard /usr/share/applications/com.github.maliit.keyboard.desktop + else if string match -q "*false*" $line + setvirtualkeyboard /usr/share/applications/fcitx5-wayland-launcher.desktop + end + end +end |