flattening and cleaning up various configurations and executables

This commit is contained in:
2022-08-22 16:40:57 -06:00
parent e0594ebfb7
commit 26571b5dfc
32 changed files with 189 additions and 85 deletions

View File

@ -1,5 +1,5 @@
#!/bin/zsh
source ${0:a:h}/common
source ${0:a:h}/xorg.zsh
xrandr --output HDMI-0 --mode 3840x2160; sleep 1
@ -16,7 +16,7 @@ sleep 2;
xrandr --output DP-2 --mode 3840x2160 --rate 120;
$DOTWRYN/bin/set-background random
PLAY_SFX login
$DOTWRYN/bin/play-sound login
xset dpms 0 0 0 && xset s noblank && xset s off \
&& notify-send 'DPMS' 'disabled screen blank'

View File

@ -1,5 +1,5 @@
#!/bin/zsh
source ${0:a:h}/common
source ${0:a:h}/xorg.zsh
xrandr --output HDMI-0 --mode 3840x2160; sleep 1
@ -18,7 +18,7 @@ xrandr \
(pkill compton; sleep 1; compton;) &
$DOTWRYN/bin/set-background purple.jpg
PLAY_SFX login
$DOTWRYN/bin/play-sound login
xset dpms 0 0 0 && xset s noblank && xset s off \
&& notify-send 'DPMS' 'disabled screen blank'

View File

@ -16,4 +16,4 @@ case $1 in
;;
esac
PLAY_SFX backlight
$DOTWRYN/bin/play-sound backlight

View File

@ -1,5 +1,5 @@
#!/bin/zsh
source ${0:a:h}/common
source ${0:a:h}/xorg.zsh
[ ! $PRIMARY_MONITOR ] && {
NOTIFY 'Unable to detect primary monitor'
return

View File

@ -1,5 +1,5 @@
#!/bin/zsh
source ${0:a:h}/common
source ${0:a:h}/xorg.zsh
[ ! $EXTERNAL_MONITOR ] && {
NOTIFY 'No external monitor connected!'
return

View File

@ -1,5 +1,5 @@
#!/bin/zsh
source ${0:a:h}/common
source ${0:a:h}/xorg.zsh
[ ! $EXTERNAL_MONITOR ] && {
NOTIFY 'No external monitor connected!'
return

View File

@ -1,5 +1,5 @@
#!/bin/zsh
source ${0:a:h}/common
source ${0:a:h}/xorg.zsh
xrandr \
--output eDP1 \
--primary \

View File

@ -1,5 +1,5 @@
#!/bin/zsh
source ${0:a:h}/common
source ${0:a:h}/xorg.zsh
[ ! $NATIVE_MONITOR ] && {
NOTIFY "Must specify NATIVE_MONITOR"
return

View File

@ -1,5 +1,5 @@
#!/bin/zsh
source ${0:a:h}/common
source ${0:a:h}/xorg.zsh
LEFT=$(GET_ALL_EXTERNAL_MONITORS | grep 'DP.-1')
RIGHT=$(GET_ALL_EXTERNAL_MONITORS | grep 'DP.-2')

View File

@ -46,7 +46,7 @@ DISCONNECT_OTHER() {
sleep 1
$DOTWRYN/bin/set-background random
[ $SFX ] && ( PLAY_SFX $SFX ) &
[ $SFX ] && ( $DOTWRYN/bin/play-sound $SFX ) &
return 0
}

View File

@ -1,5 +1,9 @@
#!/bin/zsh
# requires i3lock-color
which i3lock >/dev/null 2>&1 || {
notify-send 'i3lock-color' 'could not find installation of i3lock'
}
# note: requires i3lock-color
INSIDE_VER='001020'
RING_VER='004040'
@ -26,4 +30,5 @@ i3lock \
--line-color=$LINE \
--time-color=$TIME --date-color=$DATE \
--keyhl-color=$KEYDOWN --bshl-color=$KEYREMOVE \
|| notify-send 'i3lock-color' 'something went wrong; unable to lock' \
;

View File

@ -1,22 +1,32 @@
#!/bin/zsh
source "$HOME/.config/wryn/env.zsh"
PLAY() {
eval "$MEDIA_ENGINE" "$SFX_PATH/$1"
true
which canberra-gtk-play >/dev/null 2>&1 || {
notify-send 'canberra-gtk-play' "unable to play '$1'; is canberra-gtk-play installed?"
exit 1
}
PLAY() { canberra-gtk-play -f "$SFX_PATH/$1"; }
SFX_FILE=''
case $1 in
volume ) PLAY yaru-message.oga ;;
mute ) PLAY smooth-dialog-warning.oga ;;
backlight ) PLAY yaru-audio-volume-change.oga ;;
login ) PLAY yaru-desktop-login.oga ;;
logout ) PLAY smooth-desktop-login.oga ;;
notify ) PLAY yaru-complete.oga ;;
undock ) PLAY yaru-desktop-login.oga ;;
homedock ) PLAY homedock.oga ;;
gamedock ) PLAY gamedock.oga ;;
* )
[ -f "$SFX_PATH/$1" ] && PLAY $1 || ls $SFX_PATH
volume ) SFX_FILE=yaru-message.oga ;;
mute ) SFX_FILE=smooth-dialog-warning.oga ;;
backlight ) SFX_FILE=yaru-audio-volume-change.oga ;;
login ) SFX_FILE=yaru-desktop-login.oga ;;
logout ) SFX_FILE=smooth-desktop-login.oga ;;
notify ) SFX_FILE=yaru-complete.oga ;;
undock ) SFX_FILE=yaru-desktop-login.oga ;;
homedock ) SFX_FILE=homedock.oga ;;
gamedock ) SFX_FILE=gamedock.oga ;;
* ) SFX_FILE="$1"
;;
esac
[ ! -f "$SFX_PATH/$SFX_FILE" ] && {
notify-send 'canberra-gtk-play' "no such sfx file or alias '$1'" \
exit 2
}
canberra-gtk-play -f "$SFX_PATH/$SFX_FILE" \
|| notify-send 'canberra-gtk-play' "unable to play '$1'"

View File

@ -27,15 +27,15 @@ DEFAULT_DEVICE="@DEFAULT_$(echo $DEVICE | tr '[:lower:]' '[:upper:]')@"
case $COMMAND in
up )
pactl set-$DEVICE-volume $DEFAULT_DEVICE +10%
PLAY_SFX volume
$DOTWRYN/bin/play-sound volume
;;
down )
pactl set-$DEVICE-volume $DEFAULT_DEVICE -10%
PLAY_SFX volume
$DOTWRYN/bin/play-sound volume
;;
mute )
pactl set-$DEVICE-mute $DEFAULT_DEVICE toggle
PLAY_SFX mute
$DOTWRYN/bin/play-sound mute
notify-send "default $DEVICE" "$(amixer sget Master | grep -q '\[on\]' && echo unmuted || echo muted)"
;;
* ) ERROR "Unsupported command '$COMMAND'" ;;

View File

@ -1,5 +1,5 @@
#!/bin/zsh
source ${0:a:h}/common
source ${0:a:h}/xorg.zsh
xrandr \
--output DP-3-1 \
@ -18,4 +18,4 @@ xset dpms 0 0 0 && xset s noblank && xset s off \
(pkill compton; sleep 0.5; compton;) &
$DOTWRYN/bin/set-background random
PLAY_SFX gamedock
$DOTWRYN/bin/play-sound gamedock

View File

@ -1,5 +1,5 @@
#!/bin/zsh
source ${0:a:h}/common
source ${0:a:h}/xorg.zsh
xrandr \
--output eDP-1 \
@ -17,4 +17,4 @@ xset dpms 0 0 0 && xset s noblank && xset s off \
&& notify-send 'DPMS' 'disabled screen blank'
$DOTWRYN/bin/set-background random
PLAY_SFX gamedock
$DOTWRYN/bin/play-sound gamedock

View File

@ -1,5 +1,5 @@
#!/bin/zsh
source ${0:a:h}/common
source ${0:a:h}/xorg.zsh
xrandr \
--output eDP-1 \
@ -18,4 +18,4 @@ xset +dpms && xset s blank && xset s on \
(pkill compton; sleep 0.5; compton;) &
$DOTWRYN/bin/set-background random
PLAY_SFX gamedock
$DOTWRYN/bin/play-sound gamedock

View File

@ -7,7 +7,7 @@ case $_HOSTNAME in
umbreon ) DEFAULT=undock ;;
esac
LAYOUT="${0:a:h}/$_HOSTNAME/$DEFAULT"
LAYOUT="$DOTWRYN/bin/$_HOSTNAME/$DEFAULT"
[ -f $LAYOUT ] && {
until xrandr -q >/dev/null 2>&1; do sleep .1; done