dotwryn/bin/i3-utils

44 lines
1.4 KiB
Plaintext
Raw Normal View History

2022-08-23 03:27:20 +00:00
#!/bin/zsh
source "$HOME/.config/wryn/env.zsh"
case $1 in
2023-06-27 22:53:59 +00:00
#next ) scwrypts desktop/media -- next ;;
#prev ) scwrypts desktop/media -- prev ;;
#play ) scwrypts desktop/media -- play ;;
2022-08-23 03:27:20 +00:00
2023-06-27 22:53:59 +00:00
volumeup ) scwrypts desktop/pulseaudio -- sink up ;;
volumedown ) scwrypts desktop/pulseaudio -- sink down ;;
volumemute ) scwrypts desktop/pulseaudio -- sink mute ;;
micmute ) scwrypts desktop/pulseaudio -- source mute ;;
2022-08-23 03:27:20 +00:00
2023-06-27 22:53:59 +00:00
backlightup ) scwrypts desktop/backlight -- up ;;
backlightdown ) scwrypts desktop/backlight -- down ;;
2022-08-23 03:27:20 +00:00
2023-06-27 22:53:59 +00:00
lock ) scwrypts desktop/i3/lock -- ;;
2022-08-23 03:27:20 +00:00
2023-06-27 22:53:59 +00:00
bgrandomize ) scwrypts desktop/i3/set-background -- random ;;
2022-08-23 03:27:20 +00:00
2023-06-27 22:53:59 +00:00
alternateterm ) scwrypts desktop/kitty-alternate-theme -- ;;
2022-08-23 03:27:20 +00:00
2023-06-27 22:53:59 +00:00
logout ) scwrypts desktop/i3/logout -- ;;
2022-08-23 03:27:20 +00:00
launch )
local PROGRAM
local ARGS=()
case $2 in
2022-09-11 01:45:44 +00:00
messages ) PROGRAM=android-messages-desktop ;;
2022-08-23 03:27:20 +00:00
voice ) PROGRAM=google-voice-desktop ;;
ytmusic ) PROGRAM=youtubemusic-nativefier ;;
2023-06-27 22:53:59 +00:00
1pass ) PROGRAM=1password ARGS+=(-c 1Password) ;;
discord ) PROGRAM=discord ARGS+=(-a --has-statusbar-icon) ;;
obs ) PROGRAM=obs ARGS+=(-c '^obs' -n -l --has-statusbar-icon) ;;
2022-08-23 03:27:20 +00:00
pavuctrl ) PROGRAM=pavucontrol ARGS+=(-s 0.5 -c '^Pavucontrol') ;;
2023-06-27 22:53:59 +00:00
scrcpy ) PROGRAM=scrcpy ARGS+=(-n -l) ;;
spotify ) PROGRAM=spotify ARGS+=(-c Spotify) ;;
2022-08-23 03:27:20 +00:00
* ) PROGRAM=$2 ;;
esac
2023-06-27 22:53:59 +00:00
scwrypts i3/launch-or-show -- $PROGRAM ${ARGS[@]}
2022-08-23 03:27:20 +00:00
;;
esac