diff --git a/bspwm/bspwmrc b/bspwm/bspwmrc index 84891d9..b9b2d1d 100755 --- a/bspwm/bspwmrc +++ b/bspwm/bspwmrc @@ -10,6 +10,8 @@ else bspc monitor -d 1 101 fi +echo $(cat /etc/hostname) > "${XDG_CACHE_HOME}"/device_hostname + bspc wm -O DP-0 HDMI-0 echo "landscape" > "${XDG_CACHE_HOME}"/window_mode diff --git a/scripts/ctl-brightness b/scripts/ctl-brightness index bfe06b7..8df7233 100755 --- a/scripts/ctl-brightness +++ b/scripts/ctl-brightness @@ -1,3 +1,5 @@ #!/bin/bash -oled-brightness "$@" +if [[ $(cat /etc/hostname) == "uzui" ]]; then + "${XDG_CONFIG_HOME}"/bin/uzui/oled-brightness "$@" +fi diff --git a/scripts/display_change b/scripts/display_change new file mode 100755 index 0000000..7941d1a --- /dev/null +++ b/scripts/display_change @@ -0,0 +1,5 @@ +#!/bin/sh +# +if [[ $(cat /etc/hostname) == "uzui" ]]; then + "${XDG_CONFIG_HOME}"/bin/uzui/monitor_connect "$@" +fi diff --git a/scripts/uzui/monitor_connect b/scripts/uzui/monitor_connect new file mode 100755 index 0000000..f01a96c --- /dev/null +++ b/scripts/uzui/monitor_connect @@ -0,0 +1,9 @@ +#!/bin/sh + +if [[ "$1" == "0x0" ]]; then + xrandr --output eDP-1 --mode 1920x1080 --pos 0x0 --rotate normal --output DP-1 --off --output DP-2 --off --output DP-3 --off --output HDMI-1 --off +elif [[ "$1" == "mirror" ]]; then + xrandr --output eDP-1 --mode 1920x1080 --pos 0x0 --rotate normal --output DP-1 --off --output DP-2 --off --output DP-3 --off --output HDMI-1 --mode 1920x1080 --same-as eDP-1 +else + xrandr --output eDP-1 --mode 1920x1080 --pos 0x0 --rotate normal --output DP-1 --off --output DP-2 --off --output DP-3 --off --output HDMI-1 --mode "$1" --pos 1920x0 --rotate normal +fi diff --git a/scripts/oled-brightness b/scripts/uzui/oled-brightness similarity index 100% rename from scripts/oled-brightness rename to scripts/uzui/oled-brightness