123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190 |
- # Default config for sway
- # See sway(5)
- set $mod Mod4
- set $left h
- set $down j
- set $up k
- set $right l
- set $term svte
- set $menu dmenu_path | bemenu | xargs swaymsg exec
- exec swayidle -w \
- timeout 30 'swaymsg output "*" dpms off' \
- resume 'swaymsg output "*" dpms on' \
- timeout 60 locker
- exec wlsunset -l 47.6 -L -1.8
- # Keybindings
- # Based on XMonad
- bindsym --to-code $mod+1 workspace 1
- bindsym --to-code $mod+2 workspace 2
- bindsym --to-code $mod+3 workspace 3
- bindsym --to-code $mod+4 workspace 4
- bindsym --to-code $mod+5 workspace 5
- bindsym --to-code $mod+6 workspace 6
- bindsym --to-code $mod+7 workspace 7
- bindsym --to-code $mod+8 workspace 8
- bindsym --to-code $mod+9 workspace 9
- bindsym --to-code $mod+0 workspace 10
- bindsym --to-code $mod+Shift+1 move window to workspace 1
- bindsym --to-code $mod+Shift+2 move window to workspace 2
- bindsym --to-code $mod+Shift+3 move window to workspace 3
- bindsym --to-code $mod+Shift+4 move window to workspace 4
- bindsym --to-code $mod+Shift+5 move window to workspace 5
- bindsym --to-code $mod+Shift+6 move window to workspace 6
- bindsym --to-code $mod+Shift+7 move window to workspace 7
- bindsym --to-code $mod+Shift+8 move window to workspace 8
- bindsym --to-code $mod+Shift+9 move window to workspace 9
- bindsym --to-code $mod+Shift+0 move window to workspace 10
- bindsym --to-code $mod+q reload
- #bindsym --to-code $mod+Shift+q exit
- output DP-2 pos 0 393
- output HDMI-A-1 pos 1920 0
- output HDMI-A-1 transform 270
- output HDMI-A-2 pos 3000 393
- bindsym --to-code $mod+w focus output DP-2
- bindsym --to-code $mod+Shift+w move workspace to output DP-2
- bindsym --to-code $mod+e focus output HDMI-A-1
- bindsym --to-code $mod+Shift+e move workspace to output HDMI-A-1
- bindsym --to-code $mod+r focus output HDMI-A-2
- bindsym --to-code $mod+Shift+r move workspace to output HDMI-A-2
- input "2:10:TPPS/2_Elan_TrackPoint" {
- scroll_factor 2
- pointer_accel 0.5
- }
- input "2:7:SynPS/2_Synaptics_TouchPad" {
- accel_profile flat
- natural_scroll enabled
- scroll_factor 2
- }
- input "1149:4130:Kensington_USB_Orbit" {
- middle_emulation enabled
- scroll_button button2
- }
- # Fucks with games
- input * dwt disabled
- bindsym --to-code $mod+Shift+p exec exec hiq-prompt
- bindsym --to-code $mod+p exec $menu
- bindsym $mod+Return exec $term
- bindsym --to-code $mod+Shift+c kill
- bindsym $mod+space layout toggle all
- bindsym $mod+Shift+space layout stacking
- floating_modifier $mod normal
- tiling_drag enable
- # Move your focus around
- bindsym --to-code $mod+$left focus left
- bindsym --to-code $mod+$down focus down
- bindsym --to-code $mod+$up focus up
- bindsym --to-code $mod+$right focus right
- # _move_ the focused window with the same, but add Shift
- bindsym --to-code $mod+Shift+$left move left
- bindsym --to-code $mod+Shift+$down move down
- bindsym --to-code $mod+Shift+$up move up
- bindsym --to-code $mod+Shift+$right move right
- bindsym --to-code $mod+f fullscreen
- bindsym --to-code $mod+s layout stacking
- #bindsym --to-code $mod+a focus parent
- #
- # Scratchpad:
- #
- # Sway has a "scratchpad", which is a bag of holding for windows.
- # You can send windows there and get them back later.
- # Move the currently focused window to the scratchpad
- bindsym $mod+Shift+minus move scratchpad
- # Show the next scratchpad window or hide the focused scratchpad window.
- # If there are multiple scratchpad windows, this command cycles through them.
- bindsym --to-code $mod+minus scratchpad show
- bindsym --to-code $mod+t floating disable
- bindsym --to-code $mod+Shift+t floating enable
- #
- # 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 --to-code $left resize shrink width 10px
- bindsym --to-code $down resize grow height 10px
- bindsym --to-code $up resize shrink height 10px
- bindsym --to-code $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 --to-code $mod+a mode "resize"
- bar {
- swaybar_command waybar
- }
- focus_follows_mouse no
- focus_on_window_activation none
- focus_wrapping no
- mouse_warping none
- workspace_layout stacking
- default_border pixel 1
- default_floating_border pixel 1
- smart_borders on
- # No titlebar ever
- exec_always swaymsg font "monospace 0"
- titlebar_border_thickness 0
- titlebar_padding 0
- for_window [title=".*"] title_format %title [%pid] (%class, %instance, %shell)
- for_window [app_id="mpv"] move workspace 3
- # Make sure XKB_DEFAULT_* stuff is used
- exec_always swaymsg 'input * xkb_layout "'${XKB_DEFAULT_LAYOUT}'"'
- exec_always swaymsg 'input * xkb_variant "'${XKB_DEFAULT_VARIANT}'"'
- exec_always swaymsg 'input * xkb_options "'${XKB_DEFAULT_OPTIONS}'"'
- bindsym Print exec 'slurp | grim -g - /tmp/screen.png'
- exec_always swaymsg 'output * bg "'${MY_WALLPAPER}'" "'${MY_WALLPAPER_MODE}'"'
- #bindsym --to-code $mod+b bar hidden_state toggle
- bindsym --to-code $mod+b exec killall -SIGUSR1 waybar
- bindsym XF86AudioMute exec amixer set Master playback toggle
- bindsym XF86AudioRaiseVolume exec amixer set Master playback 1%+
- bindsym XF86AudioLowerVolume exec amixer set Master playback 1%-
- bindsym XF86AudioMicMute exec amixer set Capture capture toggle
- bindsym XF86AudioPlay exec mpc toggle
- bindsym XF86AudioStop exec mpc stop
- bindsym XF86AudioPrev exec mpv prev
- bindsym XF86AudioNext exec mpv next
- # Launch Xwayland when needed
- xwayland enable
- exec $term
|