diff --git a/desktop/.config/kanshi/config b/desktop/.config/kanshi/config index 13648c9..1f5765e 100644 --- a/desktop/.config/kanshi/config +++ b/desktop/.config/kanshi/config @@ -5,13 +5,6 @@ profile docked { exec notify-send "💻 Display changed" "Applying docked LG profile" } -profile docked { - output "Goldstar Company Ltd W2442 0x000574FD" position 1920,0 - output "Goldstar Company Ltd W2442 0x000574E1" position 0,0 - output eDP-1 disable - exec notify-send "💻 Display changed" "Applying docked Goldstar profile" -} - profile dockedall { output "LG Electronics W2442 0x000574FD" position 1920,0 output "LG Electronics W2442 0x000574E1" position 0,0 @@ -19,7 +12,7 @@ profile dockedall { exec notify-send "💻 Display changed" "Applying docked 3-screen profile" } -profile portable { +profile portableforce { output "LG Electronics W2442 0x000574FD" disable output "LG Electronics W2442 0x000574E1" disable output eDP-1 enable position 0,0 diff --git a/desktop/.config/river/init b/desktop/.config/river/init index 6eba67d..df3f22b 100755 --- a/desktop/.config/river/init +++ b/desktop/.config/river/init @@ -176,6 +176,7 @@ riverctl map normal $mod+Shift v toggle-float # shellcheck disable=SC2016 # Make all connected outputs show the desktop and no windows at all riverctl map normal $mod+Shift M spawn 'for i in $(wlopm | wc -l); do riverctl set-focused-tags $((1 << 10)); riverctl focus-output next; done; riverctl set-focused-tags $((1 << 10)); riverctl focus-output next' +riverctl map normal $mod+Shift O spawn "kanshiswitch" riverctl map normal $mod+Shift F10 spawn "riverctl send-layout-cmd $layout_cmd '--tags all --output all view-padding 0'" riverctl map normal $mod F10 spawn "riverctl send-layout-cmd $layout_cmd '--tags all --output all view-padding 6'" @@ -306,7 +307,6 @@ for pad in $(riverctl list-inputs | grep -i touchscreen); do riverctl input "$pad" pointer-accel 0.5 done - # We are not in voidlinux, so no nice turnstile user services will take care of us # have to start everything manually here. if ! cat /etc/*-release | grep -q '^NAME=.*Void'; then diff --git a/desktop/.local/bin/kanshiswitch b/desktop/.local/bin/kanshiswitch new file mode 100755 index 0000000..c4aefb8 --- /dev/null +++ b/desktop/.local/bin/kanshiswitch @@ -0,0 +1,29 @@ +#!/usr/bin/env sh + +if ! exist kanshictl; then + printf "Requires command 'kanshictl' on system." + exit 1 +fi + +picker=dmenu +if exist bemenu; then + picker=bemenu +elif exist wofi; then + picker=wofi +elif exist rofi; then + picker=rofi +fi + +regex='s/profile \+\(.*\) \+{/\1/p' + +list=$(sed -ne "$regex" "${XDG_CONFIG_HOME:-~/.config}/kanshi/config") +profile=$(printf "%s" "$list" | "$picker") +if [ -z "$profile" ]; then + return +else + kanshictl switch "$profile" +fi + +if [ "$1" = '-v' ]; then + notify-send "Kanshi profile set" "Set to: $profile" +fi