added a desktop layout and updated ssh to use one library function for login/execute

This commit is contained in:
Wryn (yage) Wagner 2023-09-05 10:45:07 -06:00
parent ff6cf514d4
commit 26a34d1c84
3 changed files with 37 additions and 14 deletions

27
bin/altaria/dual-screen-game Executable file
View File

@ -0,0 +1,27 @@
#!/bin/zsh
source ${0:a:h}/xorg.zsh
OUTPUT_PRIMARY=DP-2
OUTPUT_SECONDARY=HDMI-0
: \
&& scwrypts desktop/xrandr/disconnect-all \
&& xrandr \
--output $OUTPUT_PRIMARY \
--mode 2560x1440 --rate 119.88 \
--rotate normal \
--pos 0x0 \
--output $OUTPUT_SECONDARY \
--mode 2560x1440 --rate 119.88 \
--rotate normal \
--pos 2560x1440\
&& sleep 4 \
&& xrandr --output $OUTPUT_PRIMARY --primary \
;
pkill compton
scwrypts desktop/pulse-audio/set-default-sink -- hdmi --id 0 --profile output:hdmi-surround71-extra2
scwrypts desktop/screen-blank -- disable
scwrypts desktop/i3/set-background -- roy-art.jpg
scwrypts desktop/play-sound -- gamedock

View File

@ -14,7 +14,14 @@ use connection/parse --group remote
REMOTE__LOGIN() {
local READ_COMMAND=0
[ ! $REMOTE_NAME ] && REMOTE_NAME=$1
[ ! $REMOTE_NAME ] && {
REMOTE_NAME=$1
shift 1
}
[[ $# -gt 0 ]] && {
REMOTE_SHELL_ARGS+=(-c "'$@'")
}
[ $REMOTE_NAME ] && {
STATUS "connecting to $REMOTE_NAME"
@ -34,16 +41,5 @@ REMOTE__LOGIN() {
return $?
}
ssh -t ${REMOTE_ARGS[@]} $REMOTE_HOST "$REMOTE_DEFAULT_SHELL ${REMOTE_SHELL_ARGS[@]}"
}
REMOTE__EXECUTE() {
[ ! $REMOTE_COMMAND ] && REMOTE_COMMAND="$@"
[ ! $REMOTE_COMMAND ] && {
ERROR 'no REMOTE_COMMAND provided!'
return 1
}
REMOTE_SHELL_ARGS=(-c "'$REMOTE_COMMAND'") REMOTE__LOGIN
ssh -t ${REMOTE_ARGS[@]} $REMOTE_HOST "$REMOTE_DEFAULT_SHELL ${REMOTE_SHELL_ARGS[@]} $@"
}

View File

@ -31,6 +31,6 @@ REMOTE_CONNECT_TMUX() {
# create or connect to session
TMUX_ARGS+=(new-session -As wryn)
REMOTE__EXECUTE "tmux ${TMUX_ARGS[@]}"
REMOTE__LOGIN "tmux ${TMUX_ARGS[@]}"
}