Skip to content

Instantly share code, notes, and snippets.

@kevenwyld
Created January 12, 2026 16:40
Show Gist options
  • Select an option

  • Save kevenwyld/b8dc8ecafde51ac9923ba657c8db5c95 to your computer and use it in GitHub Desktop.

Select an option

Save kevenwyld/b8dc8ecafde51ac9923ba657c8db5c95 to your computer and use it in GitHub Desktop.
sway_config_public
set $mod Mod4
set $ALT Mod1
#gaps inner 10
default_border pixel 1
hide_edge_borders --i3 none
# class border backgr. text indicator
client.focused #FF992C #FF992C #000000
titlebar_padding {
3 1
}
font pango:FreeSans 9
input "type:keyboard" {
xkb_options caps:super
repeat_delay 220
repeat_rate 70
}
input "9583:50774:3Dconnexion_CadMouse_Pro" {
scroll_button BTN_FORWARD
scroll_button_lock disabled
scroll_method on_button_down
pointer_accel -.3
}
input "1133:50184:Logitech_USB_Trackball" {
scroll_method on_button_down
}
seat * {
#hide_cursor 1500
#hide_cursor 3000
}
include /etc/sway/config.d/*
exec /usr/bin/swayidle -w timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"'
exec /usr/bin/blueman-applet
exec --no-startup-id /usr/bin/wl-gammarelay-rs
workspace 1 output DP-3
workspace 2 output DP-3
workspace 3 output DP-3
workspace 6 output DP-1
workspace 7 output DP-1
workspace 8 output DP-1
workspace 9 output DP-1
workspace 11 output DP-2
workspace 12 output DP-2
workspace 13 output DP-2
workspace 14 output DP-2
workspace 15 output DP-2
workspace 17 output DP-4
workspace 18 output DP-4
workspace 19 output DP-4
workspace 20 output DP-4
workspace 21 output DP-5
workspace 22 output DP-5
workspace 23 output DP-5
workspace 30 output DP-6
workspace 31 output DP-6
workspace 32 output DP-6
# #####################################################################
# Hardware specific bindings
# #####################################################################
bindsym XF86MonBrightnessUp exec $HOME/bin/br up
bindsym XF86MonBrightnessDown exec $HOME/bin/br down
bindsym XF86Calculator exec ci home
bindsym XF86Explorer exec ci work
# PrtSc key on Lenovo is where the menu key should be
# exec xmodmap -e "keycode 107 = Menu"
# #####################################################################
output {
DP-1 position 1440 1440 mode 2560x1440@165Hz
DP-1 adaptive_sync off
DP-2 transform 90
DP-2 position 4000 891 mode 2560x1440@165Hz
DP-2 adaptive_sync off
DP-3 transform 270
DP-3 position 0 891 mode 2560x1440@165Hz
DP-3 adaptive_sync off
DP-4 position 1440 0 mode 2560x1440@165Hz
DP-4 adaptive_sync off
DP-5 position 5440 1750 mode 3840x1600@144Hz
DP-5 adaptive_sync on
DP-5 enable
DP-6 position 5440 3350 mode 2048x1536@60Hz
DP-6 scale 1.5
DP-6 enable
}
# #####################################################################
# Hardware specific bindings
# #####################################################################
# #####################################################################
# Custom windows
# #####################################################################
floating_modifier $mod
# start a terminal
bindsym $mod+t exec alacritty
# create a floating terminal
bindsym $mod+Shift+t exec alacritty --title "Floating Terminal" --option window.opacity=0.8
for_window [title="Floating Terminal"] floating enable
# kill focused window
bindsym $mod+Shift+Q kill
# launch clipmenu
# start rofi program launcher
bindsym $mod+d exec rofi -show run
# start window switcher/search
bindsym $mod+w exec rofi -show window
# Start screenshooter when the printscreen key is pressed
bindsym Print exec $HOME/bin/screenshot.sh
bindsym Shift+Print exec $HOME/bin/screencapture.sh
# Launch Thunar
bindsym $mod+f exec nautilus
# turn off focus follows mouse movement
focus_follows_mouse no
# Control dunst
bindsym Control+space exec dunstctl close
bindsym Control+grave exec dunstctl history-pop
bindsym Control+period exec dunstctl action
bindsym Control+Shift+period exec dunstctl context
# Change volume with volume keys
bindsym XF86AudioRaiseVolume exec pactl set-sink-volume 0 +2% #increase sound volume
bindsym XF86AudioLowerVolume exec pactl set-sink-volume 0 -2% #decrease sound volume
bindsym XF86AudioMute exec pactl set-sink-mute 0 toggle # mute sound
bindsym XF86AudioPlay exec playerctl play-pause
bindsym XF86AudioNext exec playerctl next
bindsym XF86AudioPrev exec playerctl previous
# pactl is called to set the default sink. The input to the set-default-sink command
# comes from calling `pactl list short sinks`, adjusting the input, and passing it to
# tofi, which is acting like dmenu to produce a graphical list of sinks by short name.
# Selecting one of those sinks triggers the set-default-sink command to be executed, and
# upon completion we send a -SIGRTMIN+4 signal to the status bar which listens and runs
# a check on the default sink
#bindsym $mod+m exec pactl set-default-sink $(pactl list short sinks |awk '{print $2}' |tofi $tofi_args) && pkill -SIGRTMIN+4 i3status-rs
bindsym $mod+m exec pactl set-default-sink $(pactl list short sinks |awk '{print $2}' |rofi -dmenu) && pkill -SIGRTMIN+4 i3status-rs
# Make current window sticky (floating only)
bindsym $mod+i sticky toggle
# scratchpad modifiers:
# move window to scratchpad
bindsym $mod+Shift+minus move scratchpad
# show the scratchpad (toggle)
bindsym $mod+minus scratchpad show
# change focus
bindsym $mod+j focus left
bindsym $mod+k focus down
bindsym $mod+l focus up
bindsym $mod+semicolon focus right
# alternatively, you can use the cursor keys:
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# move focused window
bindsym $mod+Shift+J move left
bindsym $mod+Shift+K move down
bindsym $mod+Shift+L move up
bindsym $mod+Shift+semicolon move right
# alternatively, you can use the cursor 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
# split in horizontal orientation
bindsym $mod+h split h
# split in vertical orientation
bindsym $mod+v split v
# enter fullscreen mode for the focused container
bindsym $mod+Return fullscreen
# change container layout (stacked, tabbed, default)
#bindsym $mod+s layout stacking
bindsym $mod+s layout toggle stacking split
# Remove in favor of rofi window switcher
# bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle stacking split
# Set opacity for fun
bindsym $mod+period opacity minus .025
bindsym $mod+Shift+period opacity plus .025
# Set gap size for fun
bindsym $mod+slash gaps inner all plus 1
bindsym $mod+Shift+slash gaps inner all minus 1
# toggle tiling / floating
bindsym $mod+Shift+space floating toggle
# change focus between tiling / floating windows
bindsym $mod+space focus mode_toggle
# focus the parent container
bindsym $mod+a focus parent
# focus the child container
bindsym $mod+q focus child
# switch to workspace
bindsym $mod+1 workspace 1
bindsym $mod+2 workspace 2
bindsym $mod+3 workspace 3
bindsym $mod+4 workspace 4
bindsym $mod+5 workspace 5
bindsym $mod+6 workspace 6
bindsym $mod+7 workspace 7
bindsym $mod+8 workspace 8
bindsym $mod+9 workspace 9
bindsym $mod+0 workspace 10
bindsym $mod+F1 workspace 11
bindsym $mod+F2 workspace 12
bindsym $mod+F3 workspace 13
bindsym $mod+F4 workspace 14
bindsym $mod+F5 workspace 15
bindsym $mod+F6 workspace 16
bindsym $mod+F7 workspace 17
bindsym $mod+F8 workspace 18
bindsym $mod+F9 workspace 19
bindsym $mod+F10 workspace 20
bindsym $mod+Tab workspace next_on_output
bindsym $mod+Shift+Tab workspace prev_on_output
# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace 1
bindsym $mod+Shift+2 move container to workspace 2
bindsym $mod+Shift+3 move container to workspace 3
bindsym $mod+Shift+4 move container to workspace 4
bindsym $mod+Shift+5 move container to workspace 5
bindsym $mod+Shift+6 move container to workspace 6
bindsym $mod+Shift+7 move container to workspace 7
bindsym $mod+Shift+8 move container to workspace 8
bindsym $mod+Shift+9 move container to workspace 9
bindsym $mod+Shift+0 move container to workspace 10
bindsym $mod+Shift+F1 move container to workspace 11
bindsym $mod+Shift+F2 move container to workspace 12
bindsym $mod+Shift+F3 move container to workspace 13
bindsym $mod+Shift+F4 move container to workspace 14
bindsym $mod+Shift+F5 move container to workspace 15
bindsym $mod+Shift+F6 move container to workspace 16
bindsym $mod+Shift+F7 move container to workspace 17
bindsym $mod+Shift+F8 move container to workspace 18
bindsym $mod+Shift+F9 move container to workspace 19
bindsym $mod+Shift+F10 move container to workspace 20
# move the whole workspace to the next output
bindsym $mod+x exec "swaymsg -t get_outputs |jq '[.[] | select(.active == true)] | .[(map(.focused) | index(true) + 1) % length].name' |xargs swaymsg move workspace to"
# reload the configuration file
bindsym $mod+Shift+C reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Shift+R restart
# exit i3 (logs you out of your X session)
bindsym $mod+Shift+E exit
# resize window (you can also use the mouse for that)
mode "resize" {
# These bindings trigger as soon as you enter the resize mode
# Pressing left will shrink the window’s width.
# Pressing right will grow the window’s width.
# Pressing up will shrink the window’s height.
# Pressing down will grow the window’s height.
bindsym j resize shrink width 10 px or 1 ppt
bindsym k resize shrink height 10 px or 1 ppt
bindsym l resize grow height 10 px or 1 ppt
bindsym semicolon resize grow width 10 px or 1 ppt
# same bindings, but for the arrow keys
bindsym Left resize shrink width 10 px or 1 ppt
bindsym Down resize grow height 10 px or 1 ppt
bindsym Up resize shrink height 10 px or 1 ppt
bindsym Right resize grow width 10 px or 1 ppt
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+r mode "resize"
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
bar {
tray_output DP-3
tray_output DP-5
status_command i3status-rs
font pango:FreeSans, FontAwesome 9.5
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment