repos / dotfiles

my dotfiles

dotfiles / dot_config / sway
Eric Bower  ·  2025-03-31

config

  1# Read `man 5 sway` for a complete reference.
  2set $mod Mod4
  3set $left h
  4set $down j
  5set $up k
  6set $right l
  7# Your preferred terminal emulator
  8set $term foot
  9
 10font pango:"Noto Sans" 10, "Noto Color Emoji" 10
 11
 12set $background #282a36
 13set $color5 #bd93f9
 14set $menuargs --binding vim --no-exec --no-overlap --ignorecase --prompt '>>' --fn "Noto Sans Mono 10" --tf "$color5" --hf "$color5" --tb "$background" --fb "$background" --nb "$background" --ab "$background" --hb "$background"
 15set $menu bemenu-run $menuargs | xargs swaymsg exec --
 16
 17client.focused		#bd93f9 #282a36 #f2f2f2 #50fa7b #bd93f9
 18client.unfocused	#81859b #282a36 #81859b #50fa7b #44475a
 19
 20default_border pixel 1
 21
 22set $home DP-1
 23#output $home mode 2560x1440@144Hz
 24#output $home scale 1
 25
 26set $home3 DP-3
 27output $home3 mode 2560x1440@144Hz
 28output $home3 scale 1
 29
 30set $cahoots DP-4
 31# Dell Inc. DELL U2713HM JMPXK44LA7AL
 32output $cahoots mode 2560x1440@59.951Hz
 33output $cahoots scale 1.2
 34
 35set $laptop eDP-1
 36output $laptop mode 2256x1504@59.999Hz
 37output $laptop scale 1.7
 38
 39bindswitch lid:on output $laptop disable
 40bindswitch lid:off output $laptop enable
 41
 42# git clone https://aur.archlinux.org/light.git
 43# RUN: `usermod -a -G video erock`
 44bindsym XF86MonBrightnessUp exec light -A 1
 45bindsym XF86MonBrightnessDown exec light -U 1
 46# RUN: pacman -S pamixer
 47bindsym XF86AudioMute exec pamixer --toggle-mute
 48bindsym XF86AudioLowerVolume exec pamixer -d 5
 49bindsym XF86AudioRaiseVolume exec pamixer -i 5
 50# bindsym $mod+Shift+s exec grimshot --notify save area
 51bindsym $mod+Shift+s exec grim -g "$(slurp)" -t png ~/screenshot.png 
 52
 53input "type:touchpad" {
 54    tap enabled
 55    natural_scroll disabled
 56    dwt disabled
 57    accel_profile "flat"  # disable mouse acceleration
 58    pointer_accel 0.0     # set mouse sensitivity (between -1 and 1)
 59}
 60
 61input "type:keyboard" {
 62	repeat_delay 300
 63	repeat_rate 30
 64}
 65
 66input "1:1:AT_Translated_Set_2_keyboard" {
 67  xkb_options "caps:escape,altwin:swap_alt_win"
 68}
 69
 70input "18003:1:foostan_Corne" {
 71}
 72
 73input "4152:5920:SteelSeries_SteelSeries_Rival_310_eSports_Mouse_Keyboard" {
 74    scroll_factor 1
 75}
 76
 77input "20547:23623:Ploopy_Corporation_Ploopy_Adept_Trackball_Mouse" {
 78  accel_profile "flat"
 79  pointer_accel -0.65 # between -1 and 1
 80}
 81
 82# Start a terminal
 83bindsym $mod+Return exec $term
 84
 85# Kill focused window
 86bindsym $mod+Shift+q kill
 87
 88# Start your launcher
 89bindsym $mod+d exec $menu
 90
 91# Drag floating windows by holding down $mod and left mouse button.
 92# Resize them with right mouse button + $mod.
 93# Despite the name, also works for non-floating windows.
 94# Change normal to inverse to use left mouse button for resizing and right
 95# mouse button for dragging.
 96floating_modifier $mod normal
 97
 98# Reload the configuration file
 99bindsym $mod+Shift+c reload
100
101# Exit sway
102bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'
103
104# Move your focus around
105bindsym $mod+$left focus left
106bindsym $mod+$down focus down
107bindsym $mod+$up focus up
108bindsym $mod+$right focus right
109
110# Move the focused window with the same, but add Shift
111bindsym $mod+Shift+$left move left
112bindsym $mod+Shift+$down move down
113bindsym $mod+Shift+$up move up
114bindsym $mod+Shift+$right move right
115
116# Switch to workspace
117bindsym $mod+1 workspace number 1
118bindsym $mod+2 workspace number 2
119bindsym $mod+3 workspace number 3
120bindsym $mod+4 workspace number 4
121bindsym $mod+5 workspace number 5
122bindsym $mod+6 workspace number 6
123bindsym $mod+7 workspace number 7
124bindsym $mod+8 workspace number 8
125bindsym $mod+9 workspace number 9
126bindsym $mod+0 workspace number 10
127# Move focused container to workspace
128bindsym $mod+Shift+1 move container to workspace number 1
129bindsym $mod+Shift+2 move container to workspace number 2
130bindsym $mod+Shift+3 move container to workspace number 3
131bindsym $mod+Shift+4 move container to workspace number 4
132bindsym $mod+Shift+5 move container to workspace number 5
133bindsym $mod+Shift+6 move container to workspace number 6
134bindsym $mod+Shift+7 move container to workspace number 7
135bindsym $mod+Shift+8 move container to workspace number 8
136bindsym $mod+Shift+9 move container to workspace number 9
137bindsym $mod+Shift+0 move container to workspace number 10
138
139bindsym $mod+c exec wl-copy
140bindsym $mod+v exec wl-paste
141
142# You can "split" the current object of your focus with
143# $mod+b or $mod+v, for horizontal and vertical splits
144# respectively.
145bindsym $mod+z splith
146bindsym $mod+x splitv
147
148# Switch the current container between different layout styles
149bindsym $mod+s layout stacking
150bindsym $mod+w layout tabbed
151bindsym $mod+e layout toggle split
152
153# Make the current focus fullscreen
154bindsym $mod+f fullscreen
155
156# Toggle the current focus between tiling and floating mode
157bindsym $mod+Shift+space floating toggle
158
159# Swap focus between the tiling area and the floating area
160bindsym $mod+space focus mode_toggle
161
162# Move focus to the parent container
163bindsym $mod+a focus parent
164    
165# Sway has a "scratchpad", which is a bag of holding for windows.
166# You can send windows there and get them back later.
167# Move the currently focused window to the scratchpad
168bindsym $mod+Shift+minus move scratchpad
169
170# Show the next scratchpad window or hide the focused scratchpad window.
171# If there are multiple scratchpad windows, this command cycles through them.
172bindsym $mod+minus scratchpad show
173
174bar {
175	swaybar_command waybar
176}
177
178exec_always gammastep -l 42.265385:-83.716557 -t 6500:3500
179
180set $gnome-schema org.gnome.desktop.interface
181exec_always {
182    gsettings set $gnome-schema font-name 'Noto Sans 10'
183}
184
185# notifications
186exec mako
187# swipe gestures
188exec libinput-gestures-setup autostart start