set $mod Mod4 set $left h set $down j set $up k set $right l set $term foot set $menu fuzzel set $dmenu fuzzel -d set $file_manager pcmanfm-qt default_border pixel 2 default_floating_border pixel 2 titlebar_border_thickness 2 titlebar_padding 6 4 smart_gaps off smart_borders off gaps inner 0 gaps outer 0 hide_edge_borders none show_marks yes focus_follows_mouse no focus_on_window_activation smart # ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ # ┃ Outputs ┃ # ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ output * bg ~/.wallpaper fill output "Chimei Innolux Corporation 0x142B Unknown" { mode 1920x1080@60Hz pos 0 0 } output 'Acer Technologies EK220Q H3 14301552C3W01' { mode 1920x1080@100Hz pos -1920 0 } # ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ # ┃ Inputs ┃ # ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ # MSI touchpad input "1267:12930:PNP0C50:00_04F3:3282_Touchpad" { natural_scroll enabled pointer_accel 0 dwt enabled # disable while typing tap enabled # touch click also works with physical click click_method clickfinger scroll_method two_finger scroll_factor 0.3 tap_button_map lrm # selection w/o physical click } input "type:keyboard" { # swap capslock key to escape key # xkb_options caps:escape repeat_delay 200 repeat_rate 30 } # ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ # ┃ Keybinds ┃ # ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ # Open terminal bindsym $mod+Return exec $term # Kill focused window bindsym $mod+q kill # Start your launcher bindsym $mod+Space exec $menu # File manager bindsym $mod+e exec $file_manager # Open ungoogled chromium # bindsym $mod+b exec /usr/bin/chromium \ # --force-dark-mode \ # --enable-features=WebUIDarkMode bindsym $mod+b exec /usr/bin/helium bindsym $mod+Shift+b exec /usr/bin/librewolf # Reload the configuration file bindsym $mod+Shift+c reload # Power menu bindsym $mod+p exec ~/.local/bin/sway-power # Recall last notifications bindsym $mod+grave exec makoctl restore # Exit sway bindsym $mod+Shift+e exec swaynag -e bottom \ -m 'EXIT SWAY SESSION' \ -b 'YES' 'swaymsg exit' \ -s 'NO' # === Display === # Lid close handling bindswitch --reload --locked lid:on output eDP-1 disable bindswitch --reload --locked lid:off output eDP-1 enable # === Navigation === # Move your focus around bindsym $mod+$left focus left bindsym $mod+$down focus down bindsym $mod+$up focus up bindsym $mod+$right focus right # Or use $mod+[up|down|left|right] bindsym $mod+Left focus left bindsym $mod+Down focus down bindsym $mod+Up focus up bindsym $mod+Right focus right # Move the focused window with the same, but add Shift bindsym $mod+Shift+$left move left bindsym $mod+Shift+$down move down bindsym $mod+Shift+$up move up bindsym $mod+Shift+$right move right # Ditto, with arrow keys bindsym $mod+Shift+Left move left bindsym $mod+Shift+Down move down bindsym $mod+Shift+Up move up bindsym $mod+Shift+Right move right # === Workspaces === workspace 1 1:1 output DP-1 eDP-1 workspace 2 2:2 output DP-1 eDP-1 workspace 3 3:3 output DP-1 eDP-1 workspace 4 4:4 output DP-1 eDP-1 workspace 5 5:5 output DP-1 eDP-1 workspace 6 6:6 output HDMI-A-1 workspace 7 7:7 output HDMI-A-1 workspace 8 8:8 output HDMI-A-1 workspace 9 9:9 output HDMI-A-1 workspace 10 0:10 output HDMI-A-1 # Switch to workspace bindsym $mod+1 workspace 1 1:1 bindsym $mod+2 workspace 2 2:2 bindsym $mod+3 workspace 3 3:3 bindsym $mod+4 workspace 4 4:4 bindsym $mod+5 workspace 5 5:5 bindsym $mod+6 workspace 6 6:6 bindsym $mod+7 workspace 7 7:7 bindsym $mod+8 workspace 8 8:8 bindsym $mod+9 workspace 9 9:9 bindsym $mod+0 workspace 10 10:10 # Move focused container to workspace bindsym $mod+Shift+1 move container to workspace 1 1:1 bindsym $mod+Shift+2 move container to workspace 2 2:2 bindsym $mod+Shift+3 move container to workspace 3 3:3 bindsym $mod+Shift+4 move container to workspace 4 4:4 bindsym $mod+Shift+5 move container to workspace 5 5:5 bindsym $mod+Shift+6 move container to workspace 6 6:6 bindsym $mod+Shift+7 move container to workspace 7 7:7 bindsym $mod+Shift+8 move container to workspace 8 8:8 bindsym $mod+Shift+9 move container to workspace 9 9:9 bindsym $mod+Shift+0 move container to workspace 10 10:10 # Make the current focus fullscreen bindsym $mod+f fullscreen # Toggle the current focus between tiling and floating mode bindsym $mod+Shift+space floating toggle # === Resizing containers === mode "resize" { # left will shrink the containers width # right will grow the containers width # up will shrink the containers height # down will grow the containers height bindsym $left resize shrink width 10px bindsym $down resize grow height 10px bindsym $up resize shrink height 10px bindsym $right resize grow width 10px # Ditto, with arrow keys bindsym Left resize shrink width 10px bindsym Down resize grow height 10px bindsym Up resize shrink height 10px bindsym Right resize grow width 10px # Return to default mode bindsym Return mode "default" bindsym Escape mode "default" } bindsym $mod+r mode "resize" # Switch to previous workspace bindsym $mod+bracketleft workspace prev bindcode --whole-window $mod+275 workspace prev # Switch to next workspace bindsym $mod+bracketright workspace next bindcode --whole-window $mod+276 workspace next # Split view horizontally bindsym $mod+equal slith # Split view vertically bindsym $mod+minus slitv # === Layouts === # Activate stacking layout bindsym $mod+Shift+s layout stacking # Activate tabbed layout bindsym $mod+t layout tabbed # Toggle split layout bindsym $mod+s layout toggle split # === Media keys === # Switching to use with Pipewire bindsym --locked XF86AudioRaiseVolume exec wpctl set-volume -l 1.5 \@DEFAULT_AUDIO_SINK@ 5%+ bindsym --locked XF86AudioLowerVolume exec wpctl set-volume -l 1.5 \@DEFAULT_AUDIO_SINK@ 5%- bindsym --locked XF86AudioMute exec wpctl set-mute \@DEFAULT_AUDIO_SINK@ toggle bindsym --locked XF86AudioMicMute exec wpctl set-mute \@DEFAULT_AUDIO_SOURCE@ toggle # Special keys to control media via playerctl bindsym --locked XF86AudioPlay exec playerctl play-pause bindsym --locked XF86AudioPause exec playerctl play-pause bindsym --locked XF86AudioPrev exec playerctl previous bindsym --locked XF86AudioNext exec playerctl next bindsym --locked XF86AudioStop exec playerctl stop # Special keys to adjust brightness via brightnessctl bindsym --locked XF86MonBrightnessDown exec brightnessctl set -e1 -n2 5%- bindsym --locked XF86MonBrightnessUp exec brightnessctl set -e1 -n2 5%+ bindsym --locked $mod+XF86MonBrightnessDown exec ~/.local/bin/waybar-brightness down bindsym --locked $mod+XF86MonBrightnessUp exec ~/.local/bin/waybar-brightness up # === Clipboard === # Open clipboard (copying) bindsym $mod+v exec cliphist list \ | $dmenu \ | cliphist decode \ | wl-copy # Open clipboard (deleting) bindsym $mod+Shift+v exec cliphist list \ | $dmenu \ | cliphist delete # === Screenshot === # Screenshot whole screen bindsym Print exec --no-startup-id ~/.local/bin/screenshot # Screenshot region of screen bindsym Shift+Print exec --no-startup-id ~/.local/bin/screenshot region # Screenshot current window bindsym Ctrl+Print exec --no-startup-id ~/.local/bin/screenshot window # Parse text on screen and copy to clipboard bindsym $mod+Print exec --no-startup-id slurp \ | xargs -I {} grim -s 2 -t png -g {} - \ | tesseract - - \ | wl-copy -n # wlsunset toggle bindsym $mod+n exec pgrep wlsunset \ && pkill wlsunset \ || wlsunset -T 4500 # ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ # ┃ Window Rules ┃ # ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ floating_modifier $mod normal set { $float floating enable; shadows enable; border pixel 2 $float_resize floating enable; resize set 900 800 px; border pixel 2 $popup floating enable; sticky enable; shadows enable } for_window [app_id = "floating"] $float for_window [app_id = "floating_update"] $float for_window [title = "^Open File$"] $float_resize for_window [title = "^Save File$"] $float_resize for_window [app_id = "mpv"] $float_resize move position center for_window [app_id = "pavucontrol"] $float_resize for_window [app_id = "TUI.float"] $float_resize for_window [app_id="firefox" title="^Picture-in-Picture$"] $popup for_window [app_id="" title="^Picture in Picture$"] $popup for_window [title="^launcher$"] $float_resize for_window [app_id="hayase"] inhibit_idle fullscreen # ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ # ┃ Status bar ┃ # ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ no_focus [app_id="waybar"] for_window [app_id="waybar" floating] { move position cursor move down 60px } focus_on_window_activation focus bar { id mainbar output * swaybar_command waybar } # ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ # ┃ Autostarts ┃ # ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ seat * xcursor_theme Vimix-White 32 exec gsettings set org.gnome.desktop.interface cursor-theme Vimix-White exec gsettings set org.gnome.desktop.interface cursor-size 32 # Services # DBUS exec dbus-update-activation-environment \ --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway # swayidle exec swayidle -w \ timeout 600 'swaylock --daemonize' \ timeout 900 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \ before-sleep 'swaylock --daemonize' # wlsunset # exec wlsunset -l '23.36' -L '85.33' # poweralertd exec poweralertd # clipboard exec wl-paste --type text --watch cliphist store exec wl-paste --type image --watch cliphist store # NOTE: Facing a lot of issues with `gnome-keyring` # Have decided not use `gnome-keyring` # Gnome keyring # also required to add into /etc/pam.d/login to autostart and unlock from TTY # auth optional pam_gnome_keyring.so # session optional pam_gnome_keyring.so auto_start # exec gnome-keyring-daemon --start --components=secrets # Desktop notification exec mako # === Other configs === include /etc/sway/config.d/*