the GREAT CONFIG MIGRATION; (scwrypts v5 and some neat new config stuffs)
This commit is contained in:
12
config/local/altaria/bin/1080p-beeg-game
Executable file
12
config/local/altaria/bin/1080p-beeg-game
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/zsh
|
||||
source ${0:a:h}/xorg.zsh
|
||||
|
||||
xrandr --output $XRANDR_OUTPUT__smol --off
|
||||
|
||||
XRANDR_SET \
|
||||
--compositing disable \
|
||||
--screen-blank disable \
|
||||
--background link-vs-gdizz.jpg \
|
||||
--sound-effect gamedock \
|
||||
${XRANDR_ARGS__livingroom__1080p[@]} --pos 0x0 --primary \
|
||||
;
|
12
config/local/altaria/bin/4k-beeg-game
Executable file
12
config/local/altaria/bin/4k-beeg-game
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/zsh
|
||||
source ${0:a:h}/xorg.zsh
|
||||
|
||||
xrandr --output $XRANDR_OUTPUT__smol --off
|
||||
|
||||
XRANDR_SET \
|
||||
--compositing disable \
|
||||
--screen-blank disable \
|
||||
--background vegeta.jpg \
|
||||
--sound-effect gamedock \
|
||||
${XRANDR_ARGS__livingroom__4k[@]} --pos 0x0 --primary --rate 119.88 \
|
||||
;
|
12
config/local/altaria/bin/apps
Executable file
12
config/local/altaria/bin/apps
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/zsh
|
||||
|
||||
tmux new -d -s apps -n 'foreman' 'htop' \; \
|
||||
split-window -d -t apps:foreman "clear; echo 'Keeping apps fresh...'; while true; do sleep 30; done" \
|
||||
2>/dev/null
|
||||
|
||||
for APP in $(find "${0:a:h}" -name apps.\*)
|
||||
do
|
||||
echo "looking for $APP"
|
||||
tmux list-windows -t apps: | awk '{print $2;}' | grep -q $APP \
|
||||
|| tmux new-window -dn $APP -t apps: "${0:a:h}/$APP"
|
||||
done
|
8
config/local/altaria/bin/apps.midi
Executable file
8
config/local/altaria/bin/apps.midi
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/bin/zsh
|
||||
|
||||
cd $HOME/Projects/python/xorg-midi/code
|
||||
source ../env/bin/activate
|
||||
|
||||
./midi-controller
|
||||
|
||||
deactivate
|
12
config/local/altaria/bin/beeg-game
Executable file
12
config/local/altaria/bin/beeg-game
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/zsh
|
||||
source ${0:a:h}/xorg.zsh
|
||||
|
||||
xrandr --output $XRANDR_OUTPUT__smol --off
|
||||
|
||||
XRANDR_SET \
|
||||
--compositing disable \
|
||||
--screen-blank disable \
|
||||
--background roy-art.jpg \
|
||||
--sound-effect gamedock \
|
||||
${XRANDR_ARGS__livingroom__1440p[@]} --pos 0x0 --primary \
|
||||
;
|
21
config/local/altaria/bin/default
Executable file
21
config/local/altaria/bin/default
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/bin/zsh
|
||||
source ${0:a:h}/xorg.zsh
|
||||
|
||||
case $MONITOR_CONFIGURATION in
|
||||
home )
|
||||
XRANDR_SET \
|
||||
--screen-blank disable \
|
||||
${XRANDR_ARGS__smol__1440p[@]} --pos 0x0 --primary --rate 120.00 \
|
||||
${XRANDR_ARGS__livingroom__1440p[@]} --pos 0x0 \
|
||||
;
|
||||
|
||||
;;
|
||||
unknown )
|
||||
echo 'unknown state; using default configuration to prevent monitor issues'
|
||||
xrandr --output $(xrandr | grep ' connected' | awk '{print $1;}') --primary
|
||||
scwrypts desktop i3 set background -- $(scwrypts -n get theme).jpg
|
||||
$DOTWRYN/bin/polybar
|
||||
scwrypts desktop play sfx -- login
|
||||
return 0
|
||||
;;
|
||||
esac
|
12
config/local/altaria/bin/smol-game
Executable file
12
config/local/altaria/bin/smol-game
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/zsh
|
||||
source ${0:a:h}/xorg.zsh
|
||||
|
||||
xrandr --output $XRANDR_OUTPUT__livingroom --off
|
||||
|
||||
XRANDR_SET \
|
||||
--compositing enable \
|
||||
--screen-blank disable \
|
||||
--sound-effect gamedock \
|
||||
${XRANDR_ARGS__smol__1440p[@]} --pos 0x0 --rate 180.00 --primary \
|
||||
;
|
||||
|
84
config/local/altaria/bin/xorg.zsh
Normal file
84
config/local/altaria/bin/xorg.zsh
Normal file
@@ -0,0 +1,84 @@
|
||||
#!/bin/zsh
|
||||
source $HOME/.config/wryn/env.zsh
|
||||
|
||||
export DISPLAY=:0
|
||||
|
||||
#####################################################################
|
||||
|
||||
XRANDR_RESOLUTION__4k='3840x2160'
|
||||
XRANDR_RESOLUTION__1440p='2560x1440'
|
||||
XRANDR_RESOLUTION__1080p='1920x1080'
|
||||
|
||||
XRANDR_OUTPUT__livingroom='HDMI-0'
|
||||
XRANDR_OUTPUT__smol='DP-4'
|
||||
|
||||
XRANDR_ARGS__livingroom__4k=(--output $XRANDR_OUTPUT__livingroom --mode $XRANDR_RESOLUTION__4k --rate 119.88)
|
||||
XRANDR_ARGS__livingroom__1440p=(--output $XRANDR_OUTPUT__livingroom --mode $XRANDR_RESOLUTION__1440p)
|
||||
XRANDR_ARGS__livingroom__1080p=(--output $XRANDR_OUTPUT__livingroom --mode $XRANDR_RESOLUTION__1080p --rate 119.88)
|
||||
|
||||
XRANDR_ARGS__smol__1440p=(--output $XRANDR_OUTPUT__smol --mode $XRANDR_RESOLUTION__1440p)
|
||||
XRANDR_ARGS__smol__1080p=(--output $XRANDR_OUTPUT__smol --mode $XRANDR_RESOLUTION__1080p)
|
||||
|
||||
#####################################################################
|
||||
|
||||
MONITOR_CONFIGURATION=unknown
|
||||
|
||||
: \
|
||||
&& xrandr --query | grep -q "^$XRANDR_OUTPUT__livingroom connected" \
|
||||
&& xrandr --query | grep -q "^$XRANDR_OUTPUT__smol connected" \
|
||||
&& MONITOR_CONFIGURATION=home \
|
||||
;
|
||||
|
||||
###############################################################################
|
||||
|
||||
XRANDR_SET() {
|
||||
local ERRORS=0
|
||||
|
||||
local COMPOSITING=enable
|
||||
local SCREEN_BLANK=enable
|
||||
local BACKGROUND=$(scwrypts -n get theme).jpg
|
||||
local SOUND_EFFECT=login
|
||||
local XRANDR_ARGS=()
|
||||
|
||||
while [[ $# -gt 0 ]]
|
||||
do
|
||||
case $1 in
|
||||
--compositing ) COMPOSITING="$2" ; shift 1 ;;
|
||||
--screen-blank ) SCREEN_BLANK="$2" ; shift 1 ;;
|
||||
--background ) BACKGROUND="$2" ; shift 1 ;;
|
||||
--sound-effect ) SOUND_EFFECT="$2" ; shift 1 ;;
|
||||
|
||||
* ) XRANDR_ARGS+=($1) ;
|
||||
esac
|
||||
shift 1
|
||||
done
|
||||
|
||||
case $COMPOSITING in
|
||||
enable ) (pkill compton; sleep 1; compton;) & ;;
|
||||
disable ) pkill compton ;;
|
||||
* )
|
||||
echo "ERROR : invalid setting '$COMPOSITING' for compositing" >&2
|
||||
return 1
|
||||
esac
|
||||
|
||||
case $SCREEN_BLANK in
|
||||
enable | disable ) ;;
|
||||
* )
|
||||
echo "ERROR : invalid setting '$SCREEN_BLANK' for screen blank" >&2
|
||||
return 1
|
||||
esac
|
||||
|
||||
##########################################
|
||||
|
||||
# disabling for a moment since the latest X11/NVIDIA drivers are causing some issues after "disconnect all"
|
||||
#scwrypts desktop xrandr disconnect all
|
||||
|
||||
xrandr ${XRANDR_ARGS[@]}
|
||||
|
||||
sleep 1
|
||||
|
||||
scwrypts desktop screen blank -- $SCREEN_BLANK
|
||||
scwrypts desktop i3 set background -- $BACKGROUND || scwrypts desktop i3 set background -- purple.jpg
|
||||
$DOTWRYN/bin/polybar
|
||||
scwrypts desktop play sfx -- $SOUND_EFFECT
|
||||
}
|
Reference in New Issue
Block a user