| 1 | set $mod Mod4 |
| 2 | |
| 3 | # Font for window titles. |
| 4 | font pango:hermit 8 |
| 5 | |
| 6 | default_border none |
| 7 | default_floating_border none |
| 8 | smart_gaps on |
| 9 | gaps inner 10 |
| 10 | |
| 11 | # Use Mouse+$mod to drag floating windows to their wanted position |
| 12 | floating_modifier $mod |
| 13 | |
| 14 | # start a terminal |
| 15 | bindsym $mod+Return exec kitty |
| 16 | |
| 17 | # kill focused window |
| 18 | bindsym $mod+Shift+q kill |
| 19 | |
| 20 | # start rofi (runs via XWayland) |
| 21 | bindsym $mod+d exec rofi -show run |
| 22 | |
| 23 | # change focus |
| 24 | bindsym $mod+j focus left |
| 25 | bindsym $mod+k focus down |
| 26 | bindsym $mod+l focus up |
| 27 | bindsym $mod+semicolon focus right |
| 28 | |
| 29 | # alternatively, you can use the cursor keys: |
| 30 | bindsym $mod+Left focus left |
| 31 | bindsym $mod+Down focus down |
| 32 | bindsym $mod+Up focus up |
| 33 | bindsym $mod+Right focus right |
| 34 | |
| 35 | # move focused window |
| 36 | bindsym $mod+Shift+j move left |
| 37 | bindsym $mod+Shift+k move down |
| 38 | bindsym $mod+Shift+l move up |
| 39 | bindsym $mod+Shift+semicolon move right |
| 40 | |
| 41 | # alternatively, you can use the cursor keys: |
| 42 | bindsym $mod+Shift+Left move left |
| 43 | bindsym $mod+Shift+Down move down |
| 44 | bindsym $mod+Shift+Up move up |
| 45 | bindsym $mod+Shift+Right move right |
| 46 | |
| 47 | # split in horizontal orientation |
| 48 | bindsym $mod+h split h |
| 49 | |
| 50 | # split in vertical orientation |
| 51 | bindsym $mod+v split v |
| 52 | |
| 53 | # enter fullscreen mode for the focused container |
| 54 | bindsym $mod+f fullscreen toggle |
| 55 | |
| 56 | # change container layout (stacked, tabbed, toggle split) |
| 57 | bindsym $mod+s layout stacking |
| 58 | bindsym $mod+w layout tabbed |
| 59 | bindsym $mod+e layout toggle split |
| 60 | |
| 61 | # toggle tiling / floating |
| 62 | bindsym $mod+Shift+space floating toggle |
| 63 | |
| 64 | # change focus between tiling / floating windows |
| 65 | bindsym $mod+space focus mode_toggle |
| 66 | |
| 67 | # focus the parent container |
| 68 | bindsym $mod+a focus parent |
| 69 | |
| 70 | # switch to workspace |
| 71 | bindsym $mod+1 workspace 1:editor |
| 72 | bindsym $mod+2 workspace 2 |
| 73 | bindsym $mod+3 workspace 3 |
| 74 | bindsym $mod+4 workspace 4 |
| 75 | bindsym $mod+5 workspace 5 |
| 76 | bindsym $mod+6 workspace 6 |
| 77 | bindsym $mod+7 workspace 7 |
| 78 | bindsym $mod+8 workspace 8 |
| 79 | bindsym $mod+9 workspace 9 |
| 80 | bindsym $mod+0 workspace 10 |
| 81 | |
| 82 | # move focused container to workspace |
| 83 | bindsym $mod+Shift+1 move container to workspace 1:editor |
| 84 | bindsym $mod+Shift+2 move container to workspace 2 |
| 85 | bindsym $mod+Shift+3 move container to workspace 3 |
| 86 | bindsym $mod+Shift+4 move container to workspace 4 |
| 87 | bindsym $mod+Shift+5 move container to workspace 5 |
| 88 | bindsym $mod+Shift+6 move container to workspace 6 |
| 89 | bindsym $mod+Shift+7 move container to workspace 7 |
| 90 | bindsym $mod+Shift+8 move container to workspace 8 |
| 91 | bindsym $mod+Shift+9 move container to workspace 9 |
| 92 | bindsym $mod+Shift+0 move container to workspace 10 |
| 93 | |
| 94 | # reload the configuration file |
| 95 | bindsym $mod+Shift+c reload |
| 96 | # restart sway inplace (preserves your layout/session, can be used to upgrade sway) |
| 97 | bindsym $mod+Shift+r restart |
| 98 | # exit sway (logs you out of your Wayland session) |
| 99 | 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 session.' -B 'Yes, exit sway' 'swaymsg exit' |
| 100 | |
| 101 | # resize window (you can also use the mouse for that) |
| 102 | mode "resize" { |
| 103 | bindsym j resize shrink width 10 px or 10 ppt |
| 104 | bindsym k resize grow height 10 px or 10 ppt |
| 105 | bindsym l resize shrink height 10 px or 10 ppt |
| 106 | bindsym semicolon resize grow width 10 px or 10 ppt |
| 107 | |
| 108 | bindsym Left resize shrink width 10 px or 10 ppt |
| 109 | bindsym Down resize grow height 10 px or 10 ppt |
| 110 | bindsym Up resize shrink height 10 px or 10 ppt |
| 111 | bindsym Right resize grow width 10 px or 10 ppt |
| 112 | |
| 113 | bindsym Return mode "default" |
| 114 | bindsym Escape mode "default" |
| 115 | } |
| 116 | |
| 117 | bindsym $mod+r mode "resize" |
| 118 | |
| 119 | # Native sway bar left disabled — waybar is used instead (like polybar was for i3) |
| 120 | #bar { |
| 121 | # status_command i3status |
| 122 | # |
| 123 | # colors { |
| 124 | # separator #AA0000 |
| 125 | # inactive_workspace #990000 #000000 #CCCCCC |
| 126 | # focused_workspace #990000 #550000 #CCCCCC |
| 127 | # active_workspace #990000 #220000 #CCCCCC |
| 128 | # } |
| 129 | #} |
| 130 | |
| 131 | #for_window [app_id="steam"] floating enable |
| 132 | #for_window [shell="xwayland"] floating enable |
| 133 | |
| 134 | # --- Outputs: DP on the LEFT, HDMI on the RIGHT --- |
| 135 | # Based on the current xrandr layout (DisplayPort-0 3840x2160 @ 0,0, |
| 136 | # HDMI-A-0 1920x1080 @ 3840,0). Wayland/wlroots connector names can differ |
| 137 | # from X11's xrandr names (e.g. DP-1 / HDMI-A-1 instead of DisplayPort-0 / |
| 138 | # HDMI-A-0). If sway doesn't pick these up correctly on first launch, run: |
| 139 | # swaymsg -t get_outputs |
| 140 | # and swap in whatever names/resolutions it reports below. |
| 141 | output DP-1 position 0 0 resolution 3840x2160 |
| 142 | output HDMI-A-1 position 3840 0 resolution 1920x1080 |
| 143 | |
| 144 | # Wallpaper (same image as i3's feh --bg-scale) |
| 145 | exec swaybg -i /home/blackbeard/wallpaper -m fill |
| 146 | |
| 147 | exec_always waybar |
| 148 | |
| 149 | exec "swaymsg workspace 1:editor" |
blackbeard420 / sway
Last active 1 month ago