2023-09-04 23:49:15 +00:00
# xwayland enable|disable|force
# - enable: lazily launch xwayland on first client connection
# - disable: never launch xwayland
# - force: launch xwayland immediately on boot
# XWayland exposes a X11 server that translates the protocol to a wayland backend, allowing legacy x11-only GUI apps.
# XWayland uses about 35MB RSS even when idle
xwayland @xwayland@
set $mod @mod@
set $term @terminal_cmd@
set $menu @launcher_cmd@
set $emoji_picker @emoji_cmd@
set $locker @lock_cmd@
set $snippets_picker @snip_cmd@
set $screenshot @screenshot_cmd@
set $brightness_up @brightness_up_cmd@
set $brightness_down @brightness_down_cmd@
set $volume_up @vol_up_cmd@
set $volume_down @vol_down_cmd@
set $mute @mute_cmd@
2023-09-05 04:25:58 +00:00
set $default_workspace_layout @workspace_layout@
2023-09-04 23:49:15 +00:00
2023-09-05 01:05:59 +00:00
### default font (for e.g. window titles)
2023-09-05 04:25:58 +00:00
font @font@
2023-09-05 01:05:59 +00:00
### tab colors (#border #background #text [#indicator #childBorder])
# focused & unfocused are the main interest
# urgent is used when an inactive window wants attention (e.g. terminal rings a bell)
# colors are synchronized with waybar and mpv
client.focused #1f5e54 #418379 #ffffff
client.focused_inactive #1f5e54 #5f676a #ffffff
client.unfocused #1f5e54 #1f554c #b4b4b4
client.urgent #ff8080 #ff8080 #ffffff
2023-09-04 23:49:15 +00:00
2023-09-05 16:13:23 +00:00
output '*' bg "@background@" fill
2023-09-04 23:49:15 +00:00
### pixel boundary between windows
hide_edge_borders smart
2023-09-05 01:05:59 +00:00
default_border pixel 1
titlebar_border_thickness 1
# XX YY distance from edge of window title to edge of text
# the YY distance here determines the heigh of the overall title
titlebar_padding 12 1
title_align center
2023-09-04 23:49:15 +00:00
2023-09-05 01:05:59 +00:00
### focus_wrapping: behavior when trying to focus past the edge of a container
2023-09-04 23:49:15 +00:00
#### no => preserve last focus. helpful mostly when `focus_follows_mouse yes`
focus_wrapping no
focus_follows_mouse yes
2023-09-05 04:25:58 +00:00
workspace_layout $default_workspace_layout
2023-09-04 23:49:15 +00:00
### key bindings
floating_modifier $mod
2023-09-05 04:25:58 +00:00
#### media keys
2023-09-04 23:49:15 +00:00
bindsym $mod+Page_Up exec $volume_up
bindsym $mod+Page_Down exec $volume_down
2023-09-05 04:51:12 +00:00
# --locked means to keep the binding active even when display is locked/off
bindsym --locked XF86AudioMute exec $mute
bindsym --locked XF86AudioPlay exec @playerctl@ play-pause
bindsym --locked XF86AudioStop exec @playerctl@ stop
bindsym --locked XF86AudioNext exec @playerctl@ next
bindsym --locked XF86AudioPrev exec @playerctl@ previous
bindsym --locked XF86MonBrightnessUp exec $brightness_up
bindsym --locked XF86MonBrightnessDown exec $brightness_down
2023-09-05 04:25:58 +00:00
#### special functions
2023-09-04 23:49:15 +00:00
bindsym $mod+Print exec $screenshot
bindsym $mod+l exec $locker
bindsym $mod+s exec $snippets_picker
bindsym $mod+slash exec $emoji_picker
bindsym $mod+d exec $menu
bindsym $mod+Return exec $term
bindsym $mod+Shift+q kill
bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'
bindsym $mod+Shift+c reload
2023-09-05 04:25:58 +00:00
#### layout
2023-09-04 23:49:15 +00:00
bindsym $mod+b splith
bindsym $mod+v splitv
bindsym $mod+f fullscreen toggle
bindsym $mod+a focus parent
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
bindsym $mod+Shift+space floating toggle
bindsym $mod+space focus mode_toggle
bindsym $mod+r mode resize
2023-09-05 04:25:58 +00:00
#### movement
2023-09-04 23:49:15 +00:00
bindsym $mod+Up focus up
bindsym $mod+Down focus down
bindsym $mod+Left focus left
bindsym $mod+Right focus right
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Right move right
2023-09-05 04:25:58 +00:00
#### workspaces
2023-09-04 23:49:15 +00:00
bindsym $mod+1 workspace number 1
bindsym $mod+2 workspace number 2
bindsym $mod+3 workspace number 3
bindsym $mod+4 workspace number 4
bindsym $mod+5 workspace number 5
bindsym $mod+6 workspace number 6
bindsym $mod+7 workspace number 7
bindsym $mod+8 workspace number 8
bindsym $mod+9 workspace number 9
bindsym $mod+Shift+1 move container to workspace number 1
bindsym $mod+Shift+2 move container to workspace number 2
bindsym $mod+Shift+3 move container to workspace number 3
bindsym $mod+Shift+4 move container to workspace number 4
bindsym $mod+Shift+5 move container to workspace number 5
bindsym $mod+Shift+6 move container to workspace number 6
bindsym $mod+Shift+7 move container to workspace number 7
bindsym $mod+Shift+8 move container to workspace number 8
bindsym $mod+Shift+9 move container to workspace number 9
2023-09-05 04:25:58 +00:00
#### "scratchpad" = ??
2023-09-04 23:49:15 +00:00
bindsym $mod+Shift+minus move scratchpad
bindsym $mod+minus scratchpad show
mode "resize" {
2023-09-05 04:25:58 +00:00
bindsym Down resize grow height 30 px
2023-09-04 23:49:15 +00:00
bindsym Escape mode default
2023-09-05 04:25:58 +00:00
bindsym Left resize shrink width 30 px
2023-09-04 23:49:15 +00:00
bindsym Return mode default
2023-09-05 04:25:58 +00:00
bindsym Right resize grow width 30 px
bindsym Up resize shrink height 30 px
bindsym h resize shrink width 30 px
bindsym j resize grow height 30 px
bindsym k resize shrink height 30 px
bindsym l resize grow width 30 px
2023-09-04 23:49:15 +00:00
}
bar {
swaybar_command @waybar@
}
2023-09-05 04:25:58 +00:00
### application-specific settings
for_window [app_id="pinentry-.*"] floating true
for_window [app_id="foot" title=".*sxmo/modem/.*/draft.txt.*"] resize set height 25
for_window [title="megapixels"] inhibit_idle open
2023-09-04 23:49:15 +00:00
### displays
## DESKTOP
output "Samsung Electric Company S22C300 0x00007F35" {
pos 0,0
res 1920x1080
}
output "Goldstar Company Ltd LG ULTRAWIDE 0x00004E94" {
pos 1920,0
res 3440x1440
}
## LAPTOP
# sh/en TV
output "Pioneer Electronic Corporation VSX-524 0x00000101" {
pos 0,0
res 1920x1080
}
# internal display
output "Unknown 0x0637 0x00000000" {
pos 1920,0
res 1920x1080
}
# XXX: needed for xdg-desktop-portal-* to work.
# this is how we expose these env vars to user dbus services:
# - DISPLAY
# - WAYLAND_DISPLAY
# - SWAYSOCK
# - XDG_CURRENT_DESKTOP
# for more, see: <repo:nixos/nixpkgs:nixos/modules/programs/wayland/sway.nix>
include /etc/sway/config.d/*
2023-09-05 04:25:58 +00:00
@extra_lines@