From 3be20222d0ba2620c0c9cd185dd22523e4f80988 Mon Sep 17 00:00:00 2001 From: zegonix Date: Tue, 10 Jun 2025 23:04:34 +0200 Subject: [PATCH] (sway) added reasonable lock command, initialise workspace 1 on main display --- sway-monitors-home/.config/sway/monitors | 10 ++++++++-- sway/.config/sway/config | 12 ++++++------ 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/sway-monitors-home/.config/sway/monitors b/sway-monitors-home/.config/sway/monitors index 06f36cc..e7d6d54 100644 --- a/sway-monitors-home/.config/sway/monitors +++ b/sway-monitors-home/.config/sway/monitors @@ -1,13 +1,19 @@ -output DP-2 { +set $main_display DP-2 +set $secondary_display DP-3 + +output $main_display { resolution 1920x1080@119.982Hz position 0 0 background ~/dotfiles/images/sunny_clearing.png fill } -output DP-3 { +output $secondary_display { resolution 1920x1080@60.000Hz position 1920 0 background ~/dotfiles/images/sunny_clearing.png fill } +workspace 1 output $main_display +workspace 2 output $secondary_display + exec_always xrandr --output DP-2 --primary diff --git a/sway/.config/sway/config b/sway/.config/sway/config index b3b4c5e..c76bad1 100644 --- a/sway/.config/sway/config +++ b/sway/.config/sway/config @@ -38,10 +38,12 @@ bar { # start screen locker exec swayidle -w \ timeout 300 'swaylock -f -e -i ~/dotfiles/images/city_skyline.png' \ - timeout 330 'swaymsg "output * power off"' \ + timeout 330 'swaymsg "output * power off"; systemctl suspend' \ resume 'swaymsg "output * power on"' \ before-sleep 'swaylock -f -e -i ~/dotfiles/images/city_skyline.png' +exec sway-audio-idle-inhibit + # NetworkManager is the most popular way to manage wireless networks on Linux, # and nm-applet is a desktop environment-independent system tray GUI for it. exec nm-applet @@ -60,14 +62,12 @@ bindsym $mod+Shift+r restart ### exit i3 (logs you out of your X session) #bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'" ## lock screen -bindsym $mod+Escape exec swaylock -f -e -c 000000 +bindsym $mod+Escape exec systemctl suspend ## kill focused window bindsym $mod+Shift+q kill # start programm launcher bindsym $mod+d exec fuzzel -#bindsym $mod+d exec rofi -show combi -#bindsym $mod+Shift+d exec rofi -show run # start a terminal bindsym $mod+Return exec foot @@ -97,8 +97,8 @@ bindsym $mod+Shift+Up move up bindsym $mod+Shift+Right move right # set splitting strategy -bindsym $mod+n split h -bindsym $mod+v split v +bindsym $mod+n layout splith +bindsym $mod+v layout splitv # enter fullscreen mode for the focused container bindsym $mod+f fullscreen toggle