flattening and cleaning up various configurations and executables

This commit is contained in:
Wryn (yage) Wagner 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 #!/bin/zsh
source ${0:a:h}/common source ${0:a:h}/xorg.zsh
xrandr --output HDMI-0 --mode 3840x2160; sleep 1 xrandr --output HDMI-0 --mode 3840x2160; sleep 1
@ -16,7 +16,7 @@ sleep 2;
xrandr --output DP-2 --mode 3840x2160 --rate 120; xrandr --output DP-2 --mode 3840x2160 --rate 120;
$DOTWRYN/bin/set-background random $DOTWRYN/bin/set-background random
PLAY_SFX login $DOTWRYN/bin/play-sound login
xset dpms 0 0 0 && xset s noblank && xset s off \ xset dpms 0 0 0 && xset s noblank && xset s off \
&& notify-send 'DPMS' 'disabled screen blank' && notify-send 'DPMS' 'disabled screen blank'

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,5 +1,9 @@
#!/bin/zsh #!/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' INSIDE_VER='001020'
RING_VER='004040' RING_VER='004040'
@ -26,4 +30,5 @@ i3lock \
--line-color=$LINE \ --line-color=$LINE \
--time-color=$TIME --date-color=$DATE \ --time-color=$TIME --date-color=$DATE \
--keyhl-color=$KEYDOWN --bshl-color=$KEYREMOVE \ --keyhl-color=$KEYDOWN --bshl-color=$KEYREMOVE \
|| notify-send 'i3lock-color' 'something went wrong; unable to lock' \
; ;

View File

@ -1,22 +1,32 @@
#!/bin/zsh #!/bin/zsh
source "$HOME/.config/wryn/env.zsh" source "$HOME/.config/wryn/env.zsh"
PLAY() { which canberra-gtk-play >/dev/null 2>&1 || {
eval "$MEDIA_ENGINE" "$SFX_PATH/$1" notify-send 'canberra-gtk-play' "unable to play '$1'; is canberra-gtk-play installed?"
true exit 1
} }
PLAY() { canberra-gtk-play -f "$SFX_PATH/$1"; }
SFX_FILE=''
case $1 in case $1 in
volume ) PLAY yaru-message.oga ;; volume ) SFX_FILE=yaru-message.oga ;;
mute ) PLAY smooth-dialog-warning.oga ;; mute ) SFX_FILE=smooth-dialog-warning.oga ;;
backlight ) PLAY yaru-audio-volume-change.oga ;; backlight ) SFX_FILE=yaru-audio-volume-change.oga ;;
login ) PLAY yaru-desktop-login.oga ;; login ) SFX_FILE=yaru-desktop-login.oga ;;
logout ) PLAY smooth-desktop-login.oga ;; logout ) SFX_FILE=smooth-desktop-login.oga ;;
notify ) PLAY yaru-complete.oga ;; notify ) SFX_FILE=yaru-complete.oga ;;
undock ) PLAY yaru-desktop-login.oga ;; undock ) SFX_FILE=yaru-desktop-login.oga ;;
homedock ) PLAY homedock.oga ;; homedock ) SFX_FILE=homedock.oga ;;
gamedock ) PLAY gamedock.oga ;; gamedock ) SFX_FILE=gamedock.oga ;;
* )
[ -f "$SFX_PATH/$1" ] && PLAY $1 || ls $SFX_PATH * ) SFX_FILE="$1"
;; ;;
esac 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 case $COMMAND in
up ) up )
pactl set-$DEVICE-volume $DEFAULT_DEVICE +10% pactl set-$DEVICE-volume $DEFAULT_DEVICE +10%
PLAY_SFX volume $DOTWRYN/bin/play-sound volume
;; ;;
down ) down )
pactl set-$DEVICE-volume $DEFAULT_DEVICE -10% pactl set-$DEVICE-volume $DEFAULT_DEVICE -10%
PLAY_SFX volume $DOTWRYN/bin/play-sound volume
;; ;;
mute ) mute )
pactl set-$DEVICE-mute $DEFAULT_DEVICE toggle 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)" notify-send "default $DEVICE" "$(amixer sget Master | grep -q '\[on\]' && echo unmuted || echo muted)"
;; ;;
* ) ERROR "Unsupported command '$COMMAND'" ;; * ) ERROR "Unsupported command '$COMMAND'" ;;

View File

@ -1,5 +1,5 @@
#!/bin/zsh #!/bin/zsh
source ${0:a:h}/common source ${0:a:h}/xorg.zsh
xrandr \ xrandr \
--output DP-3-1 \ --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;) & (pkill compton; sleep 0.5; compton;) &
$DOTWRYN/bin/set-background random $DOTWRYN/bin/set-background random
PLAY_SFX gamedock $DOTWRYN/bin/play-sound gamedock

View File

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

View File

@ -1,5 +1,5 @@
#!/bin/zsh #!/bin/zsh
source ${0:a:h}/common source ${0:a:h}/xorg.zsh
xrandr \ xrandr \
--output eDP-1 \ --output eDP-1 \
@ -18,4 +18,4 @@ xset +dpms && xset s blank && xset s on \
(pkill compton; sleep 0.5; compton;) & (pkill compton; sleep 0.5; compton;) &
$DOTWRYN/bin/set-background random $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 ;; umbreon ) DEFAULT=undock ;;
esac esac
LAYOUT="${0:a:h}/$_HOSTNAME/$DEFAULT" LAYOUT="$DOTWRYN/bin/$_HOSTNAME/$DEFAULT"
[ -f $LAYOUT ] && { [ -f $LAYOUT ] && {
until xrandr -q >/dev/null 2>&1; do sleep .1; done until xrandr -q >/dev/null 2>&1; do sleep .1; done

View File

@ -1,36 +0,0 @@
#
# scwrypts dot-files config
#
TERMINFO_PATH="$DOTWRYN/config/terminfo"
SAFE_SYMLINKS=0
# lines which begin with '#' are ignored
SYMLINKS="
# --------------------------------------------------------------------------
# fully qualified path ~/.config/THE-REST
# --------------------------------------------------------------------------
$DOTWRYN/config/../bin/i3/utils i3/utils
$DOTWRYN/config/../colorschemes/kitty.main kitty/theme.conf
$DOTWRYN/config/bat.conf bat/config
$DOTWRYN/config/code-activator.conf code-activator-zsh/settings.zsh
$DOTWRYN/config/compton.conf compton/compton.conf
$DOTWRYN/config/git.conf git/config
$DOTWRYN/config/i3.conf i3/config
$DOTWRYN/config/i3status.conf i3status/config
$DOTWRYN/config/kitty.conf kitty/kitty.conf
$DOTWRYN/config/mssqlcli.conf mssqlci/config
$DOTWRYN/config/pgcli.conf pgcli/config
$DOTWRYN/config/pylint.conf pylintrc
$DOTWRYN/config/ripgrep.conf ripgrep/config
$DOTWRYN/config/scwrypts.conf scwrypts/config
$DOTWRYN/config/scwrypts.dotfile.conf scwrypts/config.dotfile.zsh
$DOTWRYN/config/scwrypts.local.env scwrypts/env/local
$DOTWRYN/config/scwrypts.vundle.zsh ../.vim/bundle/build.zsh
$DOTWRYN/config/tmux.conf tmux/tmux.conf
$DOTWRYN/config/xcompose.conf X11/xcompose
$DOTWRYN/config/xconfig.conf X11/xconfig
$DOTWRYN/config/xinitrc X11/xinitrc
$DOTWRYN/bin/scwrypts ../.local/bin/scwrypts
$DOTWRYN/bin/vim ../.local/bin/vim
"

View File

@ -1,10 +0,0 @@
#!/bin/zsh
export AWS_ACCOUNT=088935110352
export AWS_PROFILE=yage
export AWS_REGION=us-east-2
export AWS__EFS__LOCAL_MOUNT_POINT=/mnt/efs/yage
export AWS__S3__MEDIA_BUCKET=
export AWS__S3__MEDIA_TARGETS=
export REDIS_AUTH=
export REDIS_HOST=
export REDIS_PORT=

View File

@ -0,0 +1,39 @@
#
# scwrypts dot-files config
#
TERMINFO_PATH="$DOTWRYN/config/terminfo"
SAFE_SYMLINKS=0
# lines which begin with '#' are ignored
SYMLINKS="
# --------------------------------------------------------------------------
# fully qualified path ~/.config/THE-REST
# --------------------------------------------------------------------------
$DOTWRYN/bin/i3-utils i3/utils
$DOTWRYN/colorschemes/kitty.main kitty/theme.conf
$DOTWRYN/config/bat.conf bat/config
$DOTWRYN/config/code-activator.conf code-activator-zsh/settings.zsh
$DOTWRYN/config/compton.conf compton/compton.conf
$DOTWRYN/config/git.conf git/config
$DOTWRYN/config/i3.conf i3/config
$DOTWRYN/config/i3status.conf i3status/config
$DOTWRYN/config/kitty.conf kitty/kitty.conf
$DOTWRYN/config/mssqlcli.conf mssqlci/config
$DOTWRYN/config/pgcli.conf pgcli/config
$DOTWRYN/config/pylint.conf pylintrc
$DOTWRYN/config/ripgrep.conf ripgrep/config
$DOTWRYN/config/scwrypts/config scwrypts/config
$DOTWRYN/config/scwrypts/dotfiles.zsh scwrypts/dotfiles.zsh
$DOTWRYN/config/scwrypts/env/local scwrypts/env/local
$DOTWRYN/config/scwrypts/env/local.altaria scwrypts/env/local.altaria
$DOTWRYN/config/scwrypts/env/local.butterfree scwrypts/env/local.butterfree
$DOTWRYN/config/scwrypts/env/local.umbreon scwrypts/env/local.umbreon
$DOTWRYN/config/scwrypts/vundle.zsh scwrypts/vundle.zsh
$DOTWRYN/config/tmux.conf tmux/tmux.conf
$DOTWRYN/config/xcompose.conf X11/xcompose
$DOTWRYN/config/xconfig.conf X11/xconfig
$DOTWRYN/config/xinitrc X11/xinitrc
$DOTWRYN/bin/scwrypts ../.local/bin/scwrypts
$DOTWRYN/bin/vim ../.local/bin/vim
"

24
config/scwrypts/env/local vendored Normal file
View File

@ -0,0 +1,24 @@
#!/bin/zsh
# standard AWS environment variables used by awscli and other tools
export AWS_ACCOUNT=088935110352
export AWS_PROFILE=yage
export AWS_REGION=us-east-2
# fully-qualified path to mount the EFS drive
export AWS__EFS__LOCAL_MOUNT_POINT=/mnt/efs/yage
# s3 bucket name and filesystem targets for media backups
export AWS__S3__MEDIA_BUCKET=yage
export AWS__S3__MEDIA_TARGETS=($S3_SYNC_MEDIA)
# custom i3 configuration settings
export I3__BORDER_PIXEL_SIZE=
export I3__DMENU_FONT_SIZE=
export I3__GLOBAL_FONT_SIZE=
export I3__MODEL_CONFIG=$DOTWRYN/config/i3.conf
# redis connection credentials
export REDIS_AUTH=
export REDIS_HOST=
export REDIS_PORT=

24
config/scwrypts/env/local.altaria vendored Normal file
View File

@ -0,0 +1,24 @@
#!/bin/zsh
# standard AWS environment variables used by awscli and other tools
export AWS_ACCOUNT=088935110352 # inherited from local
export AWS_PROFILE=yage # inherited from local
export AWS_REGION=us-east-2 # inherited from local
# fully-qualified path to mount the EFS drive
export AWS__EFS__LOCAL_MOUNT_POINT=/mnt/efs/yage # inherited from local
# s3 bucket name and filesystem targets for media backups
export AWS__S3__MEDIA_BUCKET=yage # inherited from local
export AWS__S3__MEDIA_TARGETS=($S3_SYNC_MEDIA) # inherited from local
# custom i3 configuration settings
export I3__BORDER_PIXEL_SIZE=
export I3__DMENU_FONT_SIZE=
export I3__GLOBAL_FONT_SIZE=
export I3__MODEL_CONFIG=$DOTWRYN/config/i3.conf # inherited from local
# redis connection credentials
export REDIS_AUTH=
export REDIS_HOST=
export REDIS_PORT=

24
config/scwrypts/env/local.butterfree vendored Normal file
View File

@ -0,0 +1,24 @@
#!/bin/zsh
# standard AWS environment variables used by awscli and other tools
export AWS_ACCOUNT=088935110352 # inherited from local
export AWS_PROFILE=yage # inherited from local
export AWS_REGION=us-east-2 # inherited from local
# fully-qualified path to mount the EFS drive
export AWS__EFS__LOCAL_MOUNT_POINT=/mnt/efs/yage # inherited from local
# s3 bucket name and filesystem targets for media backups
export AWS__S3__MEDIA_BUCKET=yage # inherited from local
export AWS__S3__MEDIA_TARGETS=($S3_SYNC_MEDIA) # inherited from local
# custom i3 configuration settings
export I3__BORDER_PIXEL_SIZE=
export I3__DMENU_FONT_SIZE=
export I3__GLOBAL_FONT_SIZE=
export I3__MODEL_CONFIG=$DOTWRYN/config/i3.conf # inherited from local
# redis connection credentials
export REDIS_AUTH=
export REDIS_HOST=
export REDIS_PORT=

24
config/scwrypts/env/local.umbreon vendored Normal file
View File

@ -0,0 +1,24 @@
#!/bin/zsh
# standard AWS environment variables used by awscli and other tools
export AWS_ACCOUNT=088935110352 # inherited from local
export AWS_PROFILE=yage # inherited from local
export AWS_REGION=us-east-2 # inherited from local
# fully-qualified path to mount the EFS drive
export AWS__EFS__LOCAL_MOUNT_POINT=/mnt/efs/yage # inherited from local
# s3 bucket name and filesystem targets for media backups
export AWS__S3__MEDIA_BUCKET=yage # inherited from local
export AWS__S3__MEDIA_TARGETS=($S3_SYNC_MEDIA) # inherited from local
# custom i3 configuration settings
export I3__BORDER_PIXEL_SIZE=
export I3__DMENU_FONT_SIZE=
export I3__GLOBAL_FONT_SIZE=
export I3__MODEL_CONFIG=$DOTWRYN/config/i3.conf # inherited from local
# redis connection credentials
export REDIS_AUTH=
export REDIS_HOST=
export REDIS_PORT=

View File

@ -6,7 +6,7 @@ export PATH="$DOTWRYN/bin/xorg/$(hostnamectl --static):$PATH"
for SCRIPT in $(find /etc/x11/xinit/xinitrc.d); do source $SCRIPT; done for SCRIPT in $(find /etc/x11/xinit/xinitrc.d); do source $SCRIPT; done
command -v dex && dex -a command -v dex && dex -a
$DOTWRYN/bin/xorg/activate-default & $DOTWRYN/bin/xorg-activate-default &
cd cd
exec i3 exec i3

View File

@ -25,7 +25,7 @@ source "$DOTWRYN_PATH/zsh/plugins/scwrypts/zsh/utils/utils.module.zsh" || exit 3
SCWRYPTS() { SCWRYPTS() {
CI=1 \ CI=1 \
CONFIG__USER_SETTINGS="$DOTWRYN_PATH/config/scwrypts.dotfile.conf" \ CONFIG__USER_SETTINGS="$DOTWRYN_PATH/config/scwrypts/dotfiles.conf" \
DOTWRYN=$DOTWRYN_PATH \ DOTWRYN=$DOTWRYN_PATH \
"$DOTWRYN_PATH/zsh/plugins/scwrypts/scwrypts" -n $1 -- ${@:2} "$DOTWRYN_PATH/zsh/plugins/scwrypts/scwrypts" -n $1 -- ${@:2}
} }