Skip to content

Instantly share code, notes, and snippets.

@fuzunspm
Created July 5, 2025 16:26
Show Gist options
  • Save fuzunspm/6f055709219826db2a60d6a8c517713f to your computer and use it in GitHub Desktop.
Save fuzunspm/6f055709219826db2a60d6a8c517713f to your computer and use it in GitHub Desktop.
sway config
set $mod Mod4
font menlo:monospace 12
set $term alacritty
set $left h
set $down j
set $up k
set $right l
set $locker /home/fahriuzun/sway-lock.sh
set $dual /home/fahriuzun/.config/sway/change_dual.sh
set $single /home/fahriuzun/.config/sway/change_single.sh
set $racing /home/fahriuzun/.config/sway/change_racing.sh
set $racingdual /home/fahriuzun/.config/sway/change_dual_racing.sh
set $tv /home/fahriuzun/.config/sway/change_tv.sh
exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK
exec hash dbus-update-activation-environment 2>/dev/null && \
dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK
exec /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
#exec /usr/bin/lxqt-policykit-agent
set $menu wofi
# set $menu dmenu_path | wofi --term=alacritty --show drun --allow-images -i | xargs swaymsg exec --
# set $menu j4-dmenu-desktop --dmenu='bemenu -i --nb "#3f3f3f" --nf "#dcdccc" --fn "pango:DejaVu Sans Mono 12"' --term='alacritty'
set $menu wofi --conf=/home/fahriuzun/.config/sway/wofi --style=/home/fahriuzun/.config/sway/wofi.css
set $gnome-schema org.gnome.desktop.interface
exec_always {
gsettings set $gnome-schema gtk-theme Midnight-Green
gsettings set $gnome-schema cursor-theme Hacked-Green
gsettings set $gnome-schema icon-theme Suru++
gsettings set $gnome-schema font-name 'Cantarell 12'
gsettings set $schema gtk-application-prefer-dark-theme 1
gsettings set $schema color-scheme prefer-dark
gsettings set $schema gtk-enable-animations 1
gsettings set $schema toolbar-style GTK_TOOLBAR_BOTH
gsettings set $schema toolbar-icons-size GTK_ICON_SIZE_LARGE_TOOLBAR
gsettings set $schema font-antialiasing grayscale
gsettings set $schema font-hinting full
gsettings set $schema font-rgba-order rgb
}
#input "5426:92:Razer_Razer_DeathAdder_Elite" {
# accel_profile "flat"
# pointer_accel 0
#}
# output * adaptive_sync on
output DP-1 resolution 3440x1440 position 0,0 bg ~/Pictures/walls/arch.png center
#output DP-3 resolution 3840x2160 position 2560,0 bg ~/Pictures/walls/arch.png fill
output HDMI-A-1 disable
output DP-2 disable
# output HDMI-A-1 transform 90 resolution 3840x2160 position 2560,0 bg ~/Pictures/Wallpapers/wallhaven-639473.jpg fill
focus output DP-1
exec swayidle -w \
timeout 600 '/home/fahriuzun/sway-lock.sh' \
timeout 900 'swaymsg "output * dpms off"' \
resume 'swaymsg "output * dpms on"' \
before-sleep '/home/fahriuzun/sway-lock.sh'
for_window [class="^.*"] inhibit_idle fullscreen
for_window [app_id="^.*"] inhibit_idle fullscreen
# bindsym $mod+button4 exec swaymsg opacity plus 0.1 # Increase opacity (scroll up)
# bindsym $mod+button5 exec swaymsg opacity minus 0.1 # Decrease opacity (scroll down)
bindsym $mod+KP_Add exec /home/fahriuzun/.config/sway/opacity.sh up
bindsym $mod+KP_Subtract exec /home/fahriuzun/.config/sway/opacity.sh down
bindsym Alt+grave exec xdotool keydown Alt+grave
bindsym --release Alt+grave exec xdotool keyup Alt+grave
bindsym Shift+F1 exec xdotool keydown Shift+F1
bindsym --release Shift+F1 exec xdotool keyup Shift+F1
bindsym Shift+F12 exec xdotool keydown Shift+F12
bindsym --release Shift+F12 exec xdotool keyup Shift+F12
bindsym $mod+p exec killall -SIGUSR1 waybar
bindsym $mod+Return exec $term
bindsym $mod+t exec xpad -t
bindsym $mod+Shift+q kill
bindsym $mod+d exec $menu
floating_modifier $mod normal
bindsym $mod+Shift+c reload
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 Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'
bindsym Shift+Home exec --no-startup-id xdotool key --clearmodifiers End
bindsym $mod+$left focus left
bindsym $mod+$down focus down
bindsym $mod+$up focus up
bindsym $mod+$right focus right
# bindsym grave exec mumble rpc togglemute
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
bindsym $mod+Shift+$left move left
bindsym $mod+Shift+$down move down
bindsym $mod+Shift+$up move up
bindsym $mod+Shift+$right move right
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
set $ws1 "1"
set $ws2 "2"
set $ws3 "3"
set $ws4 "4"
set $ws5 "5"
set $ws6 "6"
set $ws7 "7"
set $ws8 "8"
set $ws9 "9"
set $ws10 "10"
bindsym $mod+1 workspace number $ws1
bindsym $mod+2 workspace number $ws2
bindsym $mod+3 workspace number $ws3
bindsym $mod+4 workspace number $ws4
bindsym $mod+5 workspace number $ws5
bindsym $mod+6 workspace number $ws6
bindsym $mod+7 workspace number $ws7
bindsym $mod+8 workspace number $ws8
bindsym $mod+9 workspace number $ws9
bindsym $mod+0 workspace number $ws10
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+b splith
bindsym $mod+v splitv
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
bindsym $mod+f fullscreen
bindsym $mod+Shift+space floating toggle
bindsym $mod+space focus mode_toggle
# focus_follows_mouse yes
bindsym $mod+a focus parent
bindsym $mod+Shift+minus move scratchpad
bindsym $mod+minus scratchpad show
mode "resize" {
bindsym $left resize shrink width 10px
bindsym $down resize grow height 10px
bindsym $up resize shrink height 10px
bindsym $right resize grow width 10px
bindsym Left resize shrink width 10px
bindsym Down resize grow height 10px
bindsym Up resize shrink height 10px
bindsym Right resize grow width 10px
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+r mode "resize"
# exec nm-applet
# exec redshift-gtk
# exec sleep 10 && salut
# exec mako --max-visible 10 --width 350 --border-color=#00ff00 --background-color=#000000 --default-timeout 6000
exec swaync
exec xhost +SI:localuser:root
exec blueman-applet
exec sleep 10 && /usr/bin/nextcloud
exec sleep 10 && pactl load-module module-raop-discover
# exec sleep 10 && flatpak run com.core447.StreamController
# exec gammastep -c /home/fahriuzun/.config/gammastep/config.ini
exec wlsunset -l 41.2 -L 32.42 -t 4500
exec sleep 10 && /usr/bin/keepassxc
exec sleep 10 && /usr/bin/kdeconnect-indicator
exec /usr/bin/corectrl
exec sleep 10 && /usr/bin/coolercontrol
exec sleep 10 && /usr/bin/openrgb --startminimized --profile "gg"
# exec /home/fahriuzun/Applications/Coolero-x86_64_aae53badce47a7b6905b23d0d5de7bac.AppImage
# exec /usr/bin/clight-gui
bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5% ; exec notify-send "Volume $(awk '/%/ { print $5}' <(pactl get-sink-volume @DEFAULT_SINK@))" -h string:x-canonical-private-synchronous:volume
bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5%; exec notify-send "Volume $(awk '/%/ { print $5}' <(pactl get-sink-volume @DEFAULT_SINK@))" -h string:x-canonical-private-synchronous:volume
bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle; exec notify-send "$(pactl get-sink-mute @DEFAULT_SINK@)" -h string:x-canonical-private-synchronous:volume
bindsym XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle; exec notify-send "$(pactl get-source-mute @DEFAULT_SOURCE@)" -h string:x-canonical-private-synchronous:volume
# bindsym XF86AudioPlay exec playerctl play-pause
# bindsym XF86AudioNext exec playerctl next
# bindsym XF86AudioPrev exec playerctl previous
bindsym --locked XF86AudioPlay exec playerctl play-pause
bindsym --locked XF86AudioNext exec playerctl next
bindsym --locked XF86AudioPrev exec playerctl previous
bindsym $mod+Shift+n exec swaync-client -t -sw
input * xkb_layout "us,tr"
input * xkb_options "grp:rctrl_toggle"
input * xkb_numlock enable
# Custom Settings
default_border pixel 2
hide_edge_borders smart
smart_gaps on
gaps inner 10
# for_window [app_id="Alacritty"] sticky enable
for_window [shell=".*"] title_format "%title :: %shell"
for_window [app_id="^launcher$"] floating enable, sticky enable, resize set 30 ppt 60 ppt, border pixel 10
for_window [class="Yad"] floating enable
for_window [class="Psensor"] floating enable
for_window [title="^launcher$"] floating enable, sticky enable, resize set 30 ppt 60 ppt, move position center
for_window {
[window_role="(pop-up|bubble|dialog)"] floating enable
}
for_window [class="xpad" instance="xpad"] floating enable
assign [class="steam"] workspace 4
assign [class="heroic"] workspace 4
assign [app_id="lutris"] workspace 4
assign [class="Android Studio"] workspace 2
assign [app_id="thunderbird"] workspace 9
assign [class="Signal"] workspace 3
assign [class="discord"] workspace 3
assign [app_id="telegramdesktop"] workspace 3
assign [class="Zulip"] workspace 3
assign [class="Slack"] workspace 3
assign [class="Psensor"] workspace 2
assign [class="Element"] workspace 3
assign [app_id="com.github.wwmm.easyeffects"] workspace 6
assign [class="vrmonitor"] workspace 5
assign [app_id="vrwebhelper"] workspace 5
assign [app_id="com.core447.StreamController"] workspace 6
assign [app_id="explorer.exe"] workspace 9
# Shutdown/Reboot
set $mode_system System (l) lock, (e) log, (r) reboot, (Shift+s) off, (d) Dual, (f) Single, (g) Racing, (h) TV, (j) RacinD
mode "$mode_system" {
bindsym l exec $locker, mode "default"
bindsym e exec swaymsg exit, mode "default"
bindsym r exec systemctl reboot, mode "default"
bindsym d exec $dual, mode "default"
bindsym f exec $single, mode "default"
bindsym g exec $racing, mode "default"
bindsym h exec $tv, mode "default"
bindsym j exec $racingdual, mode "default"
bindsym Shift+s exec systemctl poweroff -i, mode "default"
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+Delete mode "$mode_system"
# Screen Recording
set $mode_record DP-1 A (q), DP-1 N (w), DP-2 A (e), DP-2 N (r), SELECT (t), KILL (y)
mode "$mode_record" {
bindsym q exec wf-recorder -o DP-1 -f /home/fahriuzun/Videos/Screen\ Recordings/$(date +"%Y-%m-%d_%H:%M:%S.mp4") -c h264_vaapi -d /dev/dri/renderD128 --audio=alsa_output.pci-0000_0c_00.3.analog-stereo.monitor -t, mode "default"
bindsym w exec wf-recorder -o DP-1 -f /home/fahriuzun/Videos/Screen\ Recordings/$(date +"%Y-%m-%d_%H:%M:%S.mp4") -c h264_vaapi -d /dev/dri/renderD128 -t, mode "default"
bindsym e exec wf-recorder -o DP-2 -f /home/fahriuzun/Videos/Screen\ Recordings/$(date +"%Y-%m-%d_%H:%M:%S.mp4") -c h264_vaapi -d /dev/dri/renderD128 --audio=alsa_output.pci-0000_0c_00.3.analog-stereo.monitor -t, mode "default"
bindsym r exec wf-recorder -o DP-2 -f /home/fahriuzun/Videos/Screen\ Recordings/$(date +"%Y-%m-%d_%H:%M:%S.mp4") -c h264_vaapi -d /dev/dri/renderD128 -t, mode "default"
bindsym t exec wf-recorder -g "$$(slurp)" -f /home/fahriuzun/Videos/Screen\ Recordings/$(date +"%Y-%m-%d_%H:%M:%S.mp4") -c h264_vaapi -d /dev/dri/renderD128 --audio=alsa_output.pci-0000_0c_00.3.analog-stereo.monitor -t, mode "default"
bindsym y exec killall -s SIGINT wf-recorder, mode "default"
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym Alt+Shift+5 mode "$mode_record"
# Screenshot
set $mode_ss A CLP(a), A FILE(s), S CLP(f), D CLP(q), W CLP(z)
mode "$mode_ss" {
bindsym a exec grimshot --notify copy, mode "default"
# bindsym s exec grim ~/Pictures/ss/$(date +'screenshot_%Y-%m-%d-%H%M%S.png'), mode "default"
bindsym s exec grimshot --notify save, mode "default"
# bindsym d exec slurp | grim -g - ~/Pictures/ss/$(date +'screenshot_%Y-%m-%d-%H%M%S.png'), mode "default"
bindsym f exec grimshot save area - | swappy -f -, mode "default"
bindsym q exec grimshot save output - | swappy -f -, mode "default"
bindsym z exec grimshot save active - | swappy -f -, mode "default"
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym Print mode "$mode_ss"
# bindsym Alt+Print exec "flameshot gui --raw | wl-copy"
# bindsym Print exec "flameshot gui"
# for_window [app_id="flameshot"] border pixel 0, floating enable, fullscreen disable, move absolute position 0 0
bar {
# position bottom
# status_command while date +'%Y-%m-%d %l:%M:%S %p'; do sleep 1; done
swaybar_command waybar
#mode hide
#modifier $mod
# colors {
# statusline #ffffff
# background #323232
# inactive_workspace #32323200 #32323200 #5c5c5c
# }
}
include /etc/sway/config.d/*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment