master
Raw Download raw file
  1# man 5 sway
  2
  3# Logo key
  4set $mod Mod4
  5
  6set $term kitty
  7set $browser firefox
  8set $status ~/.config/sway/status.sh
  9set $menu  ~/.config/sway/menu.sh 
 10
 11# Home row direction keys, like vim
 12set $left h
 13set $down j
 14set $up k
 15set $right l
 16
 17include /etc/sway/config-vars.d/*
 18
 19# swaymsg -t get_outputs
 20output * bg #111111 solid_color
 21output eDP-1 mode 2256x1504 position 0,0
 22output eDP-1 scale 1.22
 23
 24# swaymsg -t get_inputs
 25# man 5 sway-input
 26# firefox -> about:config -> apz.gtk.kinetic_scroll.enabled false
 27input "2362:628:PIXA3854:00_093A:0274_Touchpad" {
 28	dwt enabled
 29	tap enabled
 30	natural_scroll enabled
 31	middle_emulation enabled
 32	tap_button_map lrm
 33	pointer_accel 0.55
 34}
 35
 36# caps becomes ctrl
 37input "type:keyboard" {
 38	xkb_options caps:ctrl_modifier
 39}
 40
 41# dogmatic
 42xwayland disable
 43
 44# xdg desktop portal
 45exec --no-startup-id /usr/lib/xdg-desktop-portal -r
 46
 47### Key bindings
 48#
 49# Basics:
 50#
 51    # Start a terminal
 52    bindsym $mod+Return exec $term
 53    bindsym $mod+t exec $term
 54
 55    # Kill focused window
 56    bindsym $mod+Shift+q kill
 57
 58    # Start menu
 59    bindsym $mod+d exec $menu
 60
 61    # Start a browser
 62    bindsym $mod+y exec $browser
 63
 64    # Drag floating windows by holding down $mod and left mouse button.
 65    # Resize them with right mouse button + $mod.
 66    # Despite the name, also works for non-floating windows.
 67    # Change normal to inverse to use left mouse button for resizing and right
 68    # mouse button for dragging.
 69    floating_modifier $mod normal
 70
 71    # Reload the configuration file
 72    bindsym $mod+Shift+c reload
 73
 74    # Exit sway (logs you out of your Wayland session)
 75    bindsym $mod+Shift+e exec swaynag -t warning -m 'Exit?' -B 'Yes, exit sway' 'swaymsg exit'
 76#
 77# Moving around:
 78#
 79    # Move your focus around
 80    bindsym $mod+$left focus left
 81    bindsym $mod+$down focus down
 82    bindsym $mod+$up focus up
 83    bindsym $mod+$right focus right
 84    # Or use $mod+[up|down|left|right]
 85    bindsym $mod+Left focus left
 86    bindsym $mod+Down focus down
 87    bindsym $mod+Up focus up
 88    bindsym $mod+Right focus right
 89
 90    # Move the focused window with the same, but add Shift
 91    bindsym $mod+Shift+$left move left
 92    bindsym $mod+Shift+$down move down
 93    bindsym $mod+Shift+$up move up
 94    bindsym $mod+Shift+$right move right
 95    # Ditto, with arrow keys
 96    bindsym $mod+Shift+Left move left
 97    bindsym $mod+Shift+Down move down
 98    bindsym $mod+Shift+Up move up
 99    bindsym $mod+Shift+Right move right
100#
101# Workspaces:
102#
103    # Switch to workspace
104    bindsym $mod+1 workspace number 1
105    bindsym $mod+2 workspace number 2
106    bindsym $mod+3 workspace number 3
107    bindsym $mod+4 workspace number 4
108    bindsym $mod+5 workspace number 5
109    bindsym $mod+6 workspace number 6
110    bindsym $mod+7 workspace number 7
111    bindsym $mod+8 workspace number 8
112    bindsym $mod+9 workspace number 9
113    bindsym $mod+0 workspace number 10
114    # Move focused container to workspace
115    bindsym $mod+Shift+1 move container to workspace number 1
116    bindsym $mod+Shift+2 move container to workspace number 2
117    bindsym $mod+Shift+3 move container to workspace number 3
118    bindsym $mod+Shift+4 move container to workspace number 4
119    bindsym $mod+Shift+5 move container to workspace number 5
120    bindsym $mod+Shift+6 move container to workspace number 6
121    bindsym $mod+Shift+7 move container to workspace number 7
122    bindsym $mod+Shift+8 move container to workspace number 8
123    bindsym $mod+Shift+9 move container to workspace number 9
124    bindsym $mod+Shift+0 move container to workspace number 10
125    # Note: workspaces can have any name you want, not just numbers.
126    # We just use 1-10 as the default.
127#
128# Layout stuff:
129#
130    # You can "split" the current object of your focus with
131    # $mod+b or $mod+v, for horizontal and vertical splits
132    # respectively.
133    bindsym $mod+b splith
134    bindsym $mod+v splitv
135
136    # Switch the current container between different layout styles
137    # bindsym $mod+s layout stacking
138    # bindsym $mod+w layout tabbed
139    bindsym $mod+e layout toggle split
140
141    # Make the current focus fullscreen
142    bindsym $mod+f fullscreen
143
144    # Toggle the current focus between tiling and floating mode
145    bindsym $mod+Shift+space floating toggle
146
147    # Swap focus between the tiling area and the floating area
148    bindsym $mod+space focus mode_toggle
149
150    # Move focus to the parent container
151    bindsym $mod+a focus parent
152#
153# Scratchpad:
154#
155    # Sway has a "scratchpad", which is a bag of holding for windows.
156    # You can send windows there and get them back later.
157
158    # Move the currently focused window to the scratchpad
159    bindsym $mod+Shift+minus move scratchpad
160
161    # Show the next scratchpad window or hide the focused scratchpad window.
162    # If there are multiple scratchpad windows, this command cycles through them.
163    bindsym $mod+minus scratchpad show
164#
165# Resizing containers:
166#
167mode "resize" {
168    # left will shrink the containers width
169    # right will grow the containers width
170    # up will shrink the containers height
171    # down will grow the containers height
172    bindsym $left resize shrink width 10px
173    bindsym $down resize grow height 10px
174    bindsym $up resize shrink height 10px
175    bindsym $right resize grow width 10px
176
177    # Ditto, with arrow keys
178    bindsym Left resize shrink width 10px
179    bindsym Down resize grow height 10px
180    bindsym Up resize shrink height 10px
181    bindsym Right resize grow width 10px
182
183    # Return to default mode
184    bindsym Return mode "default"
185    bindsym Escape mode "default"
186}
187bindsym $mod+r mode "resize"
188
189# man 5 sway-bar
190bar {
191    position top
192    status_command while $status; do sleep 1; done
193    font "pango:Berkeley Mono Bold 8"
194    status_padding 0
195    height  0
196
197    colors {
198        statusline #ffffff
199        background #111111
200        inactive_workspace #111111 #111111 #444444
201        focused_workspace  #111111 #111111 #ffffff
202    }
203}
204
205default_border pixel 2
206hide_edge_borders none
207smart_borders on
208client.focused   #111111 #222222 #ffffff #333333
209client.unfocused #111111 #111111 #ffffff
210client.focused_inactive #111111 #111111 #ffffff
211font "pango:Berkeley Mono Bold 8"
212
213### Idle configuration
214#
215# Example configuration:
216#
217# exec swayidle -w \
218#          timeout 300 'swaylock -f -c 000000' \
219#          timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \
220#          before-sleep 'swaylock -f -c 000000'
221#
222# This will lock your screen after 300 seconds of inactivity, then turn off
223# your displays after another 300 seconds, and turn your screens back on when
224# resumed. It will also lock your screen before your computer goes to sleep.
225
226include /etc/sway/config.d/*