sway fix display layout

This commit is contained in:
thek4n 2025-11-13 16:32:08 +03:00
parent 0220be6920
commit 1bc39c91c0
6 changed files with 26 additions and 29 deletions

3
.gitignore vendored
View File

@ -42,3 +42,6 @@ home/user/.config/git/local
home/user/.config/sway/config.d/* home/user/.config/sway/config.d/*
!home/user/.config/sway/config.d/.gitkeep !home/user/.config/sway/config.d/.gitkeep
home/user/.config/sway/variables.d/*
!home/user/.config/sway/variables.d/.gitkeep

View File

@ -10,7 +10,7 @@ exec swayidle -w \
# Notifications # Notifications
#systemctl --user enable --now dbus.service #systemctl --user enable --now dbus.service
exec mako --anchor top-right --default-timeout 4000 --icons 1 --actions 1 --output primary exec mako --anchor top-right --default-timeout 4000 --icons 1 --actions 1 --output $primary
exec --no-startup-id pomodoro daemon exec --no-startup-id pomodoro daemon

View File

@ -104,17 +104,6 @@ mode $exitmode {
} }
bindsym --to-code $mod+x mode $exitmode bindsym --to-code $mod+x mode $exitmode
workspace $ws1 output DP-1
workspace $ws2 output DP-1
workspace $ws3 output DP-1
workspace $ws9 output HDMI-A-1
workspace $ws10 output HDMI-A-1
workspace hide1 output DP-1
workspace hide2 output HDMI-A-1
# switch to workspace # switch to workspace
bindsym --to-code $mod+1 workspace number $ws1 bindsym --to-code $mod+1 workspace number $ws1
bindsym --to-code $mod+2 workspace number $ws2 bindsym --to-code $mod+2 workspace number $ws2
@ -146,31 +135,33 @@ bindsym --to-code $mod+Shift+u workspace next
bindsym --to-code $mod+Tab workspace back_and_forth bindsym --to-code $mod+Tab workspace back_and_forth
# resize window (you can also use the mouse for that) # resize window (you can also use the mouse for that)
mode "resize" { set $resizemode "Resize: toggle [p]recize"
mode $resizemode {
bindsym --to-code h resize shrink width 10 px or 10 ppt bindsym --to-code h resize shrink width 10 px or 10 ppt
bindsym --to-code j resize grow height 10 px or 10 ppt bindsym --to-code j resize grow height 10 px or 10 ppt
bindsym --to-code k resize shrink height 10 px or 10 ppt bindsym --to-code k resize shrink height 10 px or 10 ppt
bindsym --to-code l resize grow width 10 px or 10 ppt bindsym --to-code l resize grow width 10 px or 10 ppt
bindsym --to-code $mod+r mode "default" bindsym --to-code $mod+r mode "default"
bindsym --to-code p mode "resize_precise" bindsym --to-code p mode $presizemode
bindsym --to-code Return mode "default" bindsym --to-code Return mode "default"
bindsym --to-code Escape mode "default" bindsym --to-code Escape mode "default"
} }
mode "resize_precise" { set $presizemode "Precise resize: toggle [p]resize"
mode $presizemode {
bindsym --to-code h resize shrink width 1 px or 1 ppt bindsym --to-code h resize shrink width 1 px or 1 ppt
bindsym --to-code j resize grow height 1 px or 1 ppt bindsym --to-code j resize grow height 1 px or 1 ppt
bindsym --to-code k resize shrink height 1 px or 1 ppt bindsym --to-code k resize shrink height 1 px or 1 ppt
bindsym --to-code l resize grow width 1 px or 1 ppt bindsym --to-code l resize grow width 1 px or 1 ppt
bindsym --to-code $mod+r mode "default" bindsym --to-code $mod+r mode "default"
bindsym --to-code p mode "resize" bindsym --to-code p mode $resizemode
bindsym --to-code Return mode "default" bindsym --to-code Return mode "default"
bindsym --to-code Escape mode "default" bindsym --to-code Escape mode "default"
} }
bindsym --to-code $mod+r mode "resize" bindsym --to-code $mod+r mode $resizemode
# Change focus between tiling / floating windows # Change focus between tiling / floating windows

View File

@ -1,17 +1,5 @@
# Sway config sourcer # Sway config sourcer
# Screen layout
# exec --no-startup-id ~/.screenlayout/default
# Wallpapers
# exec --no-startup-id nitrogen --restore; sleep 1; picom -b --config ~/.config/picom/picom.conf
# exec --no-startup-id hsetroot
# exec --no-startup-id feh --randomize --no-fehbg --bg-scale $HOME/.wallpaper/*
set $mod Mod4 set $mod Mod4
set $ws1 "1 Browser" set $ws1 "1 Browser"
@ -25,6 +13,9 @@ set $ws8 "8💬Social"
set $ws9 "9🎵Music" set $ws9 "9🎵Music"
set $ws10 "10🍿Media" set $ws10 "10🍿Media"
# set $primary DVI-I-1
# set $secondary VGA-1
include ~/.config/sway/variables.d/*.conf
include ~/.config/sway/other.conf include ~/.config/sway/other.conf
include ~/.config/sway/bindings.conf include ~/.config/sway/bindings.conf

View File

@ -26,6 +26,18 @@ assign [app_id="Alacritty"] workspace $ws2
assign [app_id="org.telegram.desktop"] workspace $ws8 assign [app_id="org.telegram.desktop"] workspace $ws8
workspace $ws1 output $primary
workspace $ws2 output $primary
workspace $ws3 output $primary
workspace $ws9 output $secondary
workspace $ws10 output $secondary
workspace hide1 output $primary
workspace hide2 output $secondary
# Screen layout
exec ~/.screenlayout/default
no_focus [title="^Peek preview$"] no_focus [title="^Peek preview$"]
no_focus [class="feh"] no_focus [class="feh"]