diff --git a/.bin/host-mode##hostname.portalo b/.bin/host-mode##hostname.portalo new file mode 100755 index 0000000..fc3d90d --- /dev/null +++ b/.bin/host-mode##hostname.portalo @@ -0,0 +1,36 @@ +#!/usr/bin/env bash + +modes="std +single +single-sec" + +portalo_mode_std () { + echo "Loading portalo standard screen layout" + yadm config --unset-all local.class monitor-single + yadm config --unset-all local.class monitor-single-sec +} + +portalo_mode_single () { + echo "Loading portalo single screen layout" + yadm config --unset-all local.class monitor-single-sec + yadm config --add local.class monitor-single +} + +portalo_mode_single_sec () { + echo "Loading portalo single screen layout on secondary screen" + yadm config --unset-all local.class monitor-single + yadm config --add local.class monitor-single-sec +} + +if [ -z "$1" ]; then + mode=$(echo "$modes" | $DMENU -p "mode") +else + mode=$1 +fi + +case $mode in + "std") portalo_mode_std ;; + "single") portalo_mode_single ;; + "single-sec") portalo_mode_single_sec ;; + *) echo "'$mode' is not a valid mode (single, std)" ;; +esac diff --git a/.bin/portalo-mode b/.bin/portalo-mode deleted file mode 100755 index 0e6afcd..0000000 --- a/.bin/portalo-mode +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env bash - -portalo_mode_std () { - echo "Loading portalo standard screen layout" - yadm config --unset-all local.class monitor-single -} - -portalo_mode_single () { - echo "Loading portalo single screen layout" - yadm config --add local.class monitor-single -} - -case $1 in - std) portalo_mode_std ;; - single) portalo_mode_single ;; - *) echo "'$1' is not a valid-setup (single, std)" ;; -esac diff --git a/.config/hypr/binds.conf b/.config/hypr/binds.conf index d474ce0..cddb916 100644 --- a/.config/hypr/binds.conf +++ b/.config/hypr/binds.conf @@ -10,6 +10,7 @@ bind = $main_mod, F, fullscreen, bind = $main_mod, D, exec, j4-dmenu-desktop --dmenu="$DMENU" bind = $main_mod, Pause, exec, menu-shutdown bind = $main_mod, T, exec, ts-control +bind = $main_mod, M, exec, host-mode bind = $main_mod, C, exec, [float] $TERMINAL -e python # Screenshot / Color picker diff --git a/.config/hypr/host.conf##hostname.portalo,class.monitor-single b/.config/hypr/host.conf##hostname.portalo,class.monitor-single index bf42358..013c450 100644 --- a/.config/hypr/host.conf##hostname.portalo,class.monitor-single +++ b/.config/hypr/host.conf##hostname.portalo,class.monitor-single @@ -1,20 +1,8 @@ $mon1 = DP-1 $mon2 = HDMI-A-1 - -workspace=$ws01, monitor:$mon1, default:true -workspace=$ws02, monitor:$mon1 -workspace=$ws03, monitor:$mon1 -workspace=$ws04, monitor:$mon1 -workspace=$ws05, monitor:$mon1 -workspace=$ws06, monitor:$mon1 -workspace=$ws07, monitor:$mon1 -workspace=$ws08, monitor:$mon1 -workspace=$ws09, monitor:$mon1 -workspace=$ws10, monitor:$mon1 +$mon = $mon1 monitor = $mon1,2560x1440@144,0x0,auto monitor = $mon2,disable -exec = hyprctl dispatch moveworkspacetomonitor $ws08 $mon1 -exec = hyprctl dispatch moveworkspacetomonitor $ws09 $mon1 -exec = hyprctl dispatch moveworkspacetomonitor $ws10 $mon1 +source = ~/.config/hypr/lib/single_mon.conf diff --git a/.config/hypr/host.conf##hostname.portalo,class.monitor-single-sec b/.config/hypr/host.conf##hostname.portalo,class.monitor-single-sec new file mode 100644 index 0000000..cd21745 --- /dev/null +++ b/.config/hypr/host.conf##hostname.portalo,class.monitor-single-sec @@ -0,0 +1,8 @@ +$mon1 = DP-1 +$mon2 = HDMI-A-1 +$mon = $mon2 + +monitor = $mon1,disable +monitor = $mon2,1920x1080@60,0x0,auto + +source = ~/.config/hypr/lib/single_mon.conf diff --git a/.config/hypr/host.conf##hostname.portalo,default b/.config/hypr/host.conf##hostname.portalo,default index ab61eef..a61bb54 100644 --- a/.config/hypr/host.conf##hostname.portalo,default +++ b/.config/hypr/host.conf##hostname.portalo,default @@ -16,6 +16,13 @@ workspace=$ws10, monitor:$mon2 monitor = $mon1,2560x1440@144,1920x0,auto monitor = $mon2,1920x1080@60,0x0,auto +exec = hyprctl dispatch moveworkspacetomonitor $ws01 $mon1 +exec = hyprctl dispatch moveworkspacetomonitor $ws02 $mon1 +exec = hyprctl dispatch moveworkspacetomonitor $ws03 $mon1 +exec = hyprctl dispatch moveworkspacetomonitor $ws04 $mon1 +exec = hyprctl dispatch moveworkspacetomonitor $ws05 $mon1 +exec = hyprctl dispatch moveworkspacetomonitor $ws06 $mon1 +exec = hyprctl dispatch moveworkspacetomonitor $ws07 $mon1 exec = hyprctl dispatch moveworkspacetomonitor $ws08 $mon2 exec = hyprctl dispatch moveworkspacetomonitor $ws09 $mon2 exec = hyprctl dispatch moveworkspacetomonitor $ws10 $mon2 diff --git a/.config/hypr/lib/single_mon.conf b/.config/hypr/lib/single_mon.conf new file mode 100644 index 0000000..338a155 --- /dev/null +++ b/.config/hypr/lib/single_mon.conf @@ -0,0 +1,21 @@ +workspace=$ws01, monitor:$mon, default:true +workspace=$ws02, monitor:$mon +workspace=$ws03, monitor:$mon +workspace=$ws04, monitor:$mon +workspace=$ws05, monitor:$mon +workspace=$ws06, monitor:$mon +workspace=$ws07, monitor:$mon +workspace=$ws08, monitor:$mon +workspace=$ws09, monitor:$mon +workspace=$ws10, monitor:$mon + +exec = hyprctl dispatch moveworkspacetomonitor $ws01 $mon +exec = hyprctl dispatch moveworkspacetomonitor $ws02 $mon +exec = hyprctl dispatch moveworkspacetomonitor $ws03 $mon +exec = hyprctl dispatch moveworkspacetomonitor $ws04 $mon +exec = hyprctl dispatch moveworkspacetomonitor $ws05 $mon +exec = hyprctl dispatch moveworkspacetomonitor $ws06 $mon +exec = hyprctl dispatch moveworkspacetomonitor $ws07 $mon +exec = hyprctl dispatch moveworkspacetomonitor $ws08 $mon +exec = hyprctl dispatch moveworkspacetomonitor $ws09 $mon +exec = hyprctl dispatch moveworkspacetomonitor $ws10 $mon