added a desktop layout and updated ssh to use one library function for login/execute
This commit is contained in:
parent
ff6cf514d4
commit
26a34d1c84
27
bin/altaria/dual-screen-game
Executable file
27
bin/altaria/dual-screen-game
Executable 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
|
@ -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[@]} $@"
|
||||
}
|
||||
|
@ -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[@]}"
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user