Created
July 18, 2022 09:18
-
-
Save juster-0/113ad57a5c8fd2eb7e5386292475ba1b to your computer and use it in GitHub Desktop.
xrandr rofi menu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
xrandr --dpi 276 | |
xrandr --output eDP-1 --auto --scale 1x1 --pos 0x0 | |
# Disable all other screens | |
xrandr --output DP-1 --off | |
xrandr --output DP-1-0 --off | |
xrandr --output HDMI-1-0 --off | |
# Restart some services | |
source $HOME/.local/bin/set_background.sh | |
killall -q picom | |
picom & disown |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
xrandr --output eDP-1 --auto --scale 1x1 --pos 0x0 | |
xrandr --output DP-1 --auto --right-of eDP-1 | |
xrandr --output DP-1 --scale 1x1 --pos 3840x0 | |
# Disable all other screens | |
xrandr --output HDMI-1-0 --off | |
xrandr --output DP-1-0 --off | |
# Restart some services | |
source $HOME/.local/bin/set_background.sh | |
killall -q picom | |
picom & disown |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Disable first laptop monitor | |
xrandr --output eDP-1 --off | |
xrandr --dpi 276 | |
xrandr --output HDMI-1-0 --auto --pos 0x0 | |
# Disable all other screens | |
xrandr --output DP-1 --off | |
xrandr --output DP-1-0 --off | |
# Restart some services | |
source $HOME/.local/bin/set_background.sh | |
killall -q picom | |
picom & disown |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
rofi -show xr -modi "xr:$HOME/.local/bin/xrandr-menu/xrandr-rofi.sh" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
case $@ in | |
"[eDP-1][^DP-1]") | |
source $HOME/.local/bin/xrandr-menu/modes/eDP-1_UDP-1.sh > /dev/null 2>&1 | |
;; | |
"[eDP-1] [DP-1]") | |
source $HOME/.local/bin/xrandr-menu/modes/eDP-1_DP-1.sh > /dev/null 2>&1 | |
;; | |
"[eDP-1][^DP-1][HDMI-1-0]") | |
source $HOME/.local/bin/xrandr-menu/modes/eDP-1_UDP-1_HDMI-1-0.sh > /dev/null 2>&1 | |
;; | |
"[eDP-1] [DP-1][HDMI-1-0]") | |
source $HOME/.local/bin/xrandr-menu/modes/eDP-1_DP-1_HDMI-1-0.sh > /dev/null 2>&1 | |
;; | |
"[eDP-1][^DP-1][DP-1-0]") | |
source $HOME/.local/bin/xrandr-menu/modes/eDP-1_UDP-1_DP-1-0.sh > /dev/null 2>&1 | |
;; | |
"[eDP-1] [DP-1][DP-1-0]") | |
source $HOME/.local/bin/xrandr-menu/modes/eDP-1_DP-1_DP-1-0.sh > /dev/null 2>&1 | |
;; | |
"[DP-1]") | |
source $HOME/.local/bin/xrandr-menu/modes/DP-1.sh > /dev/null 2>&1 | |
;; | |
"[eDP-1]") | |
source $HOME/.local/bin/xrandr-menu/modes/eDP-1.sh > /dev/null 2>&1 | |
;; | |
"[HDMI-1-0]") | |
source $HOME/.local/bin/xrandr-menu/modes/HDMI-1-0.sh > /dev/null 2>&1 | |
;; | |
esac | |
echo -en "\0no-custom\x1ftrue\n" | |
echo "[eDP-1][^DP-1]" | |
echo "[eDP-1] [DP-1]" | |
echo "[eDP-1][^DP-1][HDMI-1-0]" | |
echo "[eDP-1] [DP-1][HDMI-1-0]" | |
echo "[eDP-1][^DP-1][DP-1-0]" | |
echo "[eDP-1] [DP-1][DP-1-0]" | |
echo "[DP-1]" | |
echo "[eDP-1]" | |
echo "[HDMI-1-0]" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment