diff --git a/bin/altaria/dual-screen-game b/bin/altaria/dual-screen-game new file mode 100755 index 0000000..a3f4d7f --- /dev/null +++ b/bin/altaria/dual-screen-game @@ -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 diff --git a/scwrypts/ssh/lib/ssh.module.zsh b/scwrypts/ssh/lib/ssh.module.zsh index 2548007..d7abcb9 100644 --- a/scwrypts/ssh/lib/ssh.module.zsh +++ b/scwrypts/ssh/lib/ssh.module.zsh @@ -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[@]} $@" } diff --git a/scwrypts/ssh/lib/tmux.module.zsh b/scwrypts/ssh/lib/tmux.module.zsh index ef43b0e..d59f40f 100644 --- a/scwrypts/ssh/lib/tmux.module.zsh +++ b/scwrypts/ssh/lib/tmux.module.zsh @@ -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[@]}" }