### Sway Configuration ### Variables set $mod Mod4 # Home row direction keys, like vim set $left h set $down j set $up k set $right l # Sursor movement set $fast 50 set $slow 10 # Preferred terminal emulator set $term alacritty # Screensaver # ScreenSaver preferences set $screensave_time 1800 set $sleep_time 2700 ### Apperance # Wallpaper output * bg $HOME/.local/share/backgrounds/2023-01-03-23-13-24-DSC_2417.jpg fill focus_wrapping no # Window colors # Class border Backgr Text indicator child_border client.focused #C71585 #ffffff #C71585 #C71585 #C71585 client.unfocused #B941FF #4080bf #B941FF #B941FF #B941FF client.urgent #9F00C5 #33ccff #33ccff #33ccff #9F00C5 # Gaps gaps inner 10 gaps outer 4 default_border pixel 3 for_window [app_id="gnome-calendar"] floating enable ### Idle configuration exec swayidle -w \ timeout $screensave_time 'swaylock -f -C /home/dg/.config/swaylock/config' \ timeout $sleep_time 'systemctl suspend' \ resume 'swaymsg "output * dpms on"' \ before-sleep 'swaylock -f -C /home/dg/.config/swaylock/config' ### Key bindings ## Volume bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5% bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5% bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle # Media playerctl bindsym XF86AudioNext exec playerctl next bindsym XF86AudioPrev exec playerctl previous bindsym XF86AudioPlay exec playerctl play-pause # Calculator bindsym XF86Calculator exec gnome-calculator # Backlight bindsym XF86MonBrightnessUp exec light -A 5 bindsym XF86MonBrightnessDown exec light -U 5 # Screenshot bindsym $mod+Shift+s exec grim -g "$(slurp)" $HOME/Pictures/Screenshots/$(date +'screenshot_%y-%m-%d-%H:%M.png') bindsym XF86Pictures exec grim -g "$(slurp)" - | swappy -f - # Leds bindsym XF86KbdBrightnessUp exec light -A 5 -s sysfs/leds/smc::kbd_backlight bindsym XF86KbdBrightnessDown exec light -U 5 -s sysfs/leds/smc::kbd_backlight # Screenshot bindsym XF86LaunchA exec grim -g "$(slurp)" $HOME/Pictures/Screenshots/$(date +'screenshot_%y-%m-%d-%H:%M.png') # Kill focused window bindsym $mod+Shift+q kill # mouse button for dragging. floating_modifier $mod normal # Lock screen bindsym $mod+Shift+backspace exec swaylock -C $HOME/.swaylock/config # Reload the configuration file bindsym $mod+Shift+r reload # Exit sway (logs you out of your Wayland session) bindsym $mod+Shift+e exec swaynag -t warning -m 'Do you really want to exit sway?' -b 'Yes, exit sway' 'swaymsg exit' --background=#005566 --button-background=#009999 --button-border=#002b33 --border-bottom=#002b33 --button-margin-right=10px ### Applications shortcuts # Launcher # bindsym $mod+space exec --no-startup-id wofi --show drun -I -i bindsym $mod+space exec "rofi -show drun" # 1password Quick Access bindsym $mod+Shift+p exec 1password --quick-access # Start a terminal bindsym $mod+Return exec $term # Browsers bindsym $mod+Shift+f exec firefox # Explorer bindsym $mod+n exec alacritty --class=ranger sh -c "source ~/.zshrc & source ranger" # spotify-tui bindsym $mod+s exec alacritty --class=spotify -e "spt" ### Moving around: # Move your focus around bindsym $mod+$left focus left bindsym $mod+$down focus down bindsym $mod+$up focus up bindsym $mod+$right focus right bindsym $mod+Left focus left bindsym $mod+Down focus down bindsym $mod+Up focus up bindsym $mod+Right focus right # Move the focused window with the same, but add Shift bindsym $mod+Shift+$left move left bindsym $mod+Shift+$down move down bindsym $mod+Shift+$up move up bindsym $mod+Shift+$right move right ### Workspaces: # Switch to workspace bindsym $mod+1 workspace number 1 bindsym $mod+2 workspace number 2 bindsym $mod+3 workspace number 3 bindsym $mod+4 workspace number 4 bindsym $mod+5 workspace number 5 bindsym $mod+6 workspace number 6 bindsym $mod+7 workspace number 7 bindsym $mod+8 workspace number 8 bindsym $mod+9 workspace number 9 bindsym $mod+0 workspace number 10 # Move focused container to workspace bindsym $mod+Shift+1 move container to workspace number 1 bindsym $mod+Shift+2 move container to workspace number 2 bindsym $mod+Shift+3 move container to workspace number 3 bindsym $mod+Shift+4 move container to workspace number 4 bindsym $mod+Shift+5 move container to workspace number 5 bindsym $mod+Shift+6 move container to workspace number 6 bindsym $mod+Shift+7 move container to workspace number 7 bindsym $mod+Shift+8 move container to workspace number 8 bindsym $mod+Shift+9 move container to workspace number 9 bindsym $mod+Shift+0 move container to workspace number 10 ### Layout stuff: # toggle next window split direction bindsym $mod+backspace split toggle # set current floating window to sticky bindsym $mod+Shift+Up sticky toggle #bindsym $mod+s layout stacking bindsym $mod+t layout tabbed bindsym $mod+e layout toggle split bindsym $mod+f fullscreen bindsym $mod+Shift+space floating toggle bindsym $mod+ctrl+space focus mode_toggle ### Scratchpad: bindsym $mod+Shift+minus move scratchpad bindsym $mod+minus scratchpad show # Move cursor mode "mouse" { bindsym KP_Left seat - cursor move -10 0 bindsym KP_Down seat - cursor move 0 10 bindsym KP_Up seat - cursor move 0 -10 bindsym KP_Right seat - cursor move 10 0 bindsym Shift+KP_Left seat - cursor move -50 0 bindsym Shift+KP_Down seat - cursor move 0 50 bindsym Shift+KP_Up seat - cursor move 0 -50 bindsym Shift+KP_Right seat - cursor move 50 0 bindsym --release KP_Begin seat - cursor press button1, seat - cursor release button1 bindsym --release KP_DELETE seat - cursor press button3, seat - cursor release button3 bindsym Return mode "default" bindsym Escape mode "default" } bindsym $mod+Shift+m mode "mouse" ### Resizing containers: mode "resize" { bindsym $left resize shrink width 40px bindsym $down resize grow height 40px bindsym $up resize shrink height 40px bindsym $right resize grow width 40px # Return to default mode bindsym Return mode "default" bindsym Escape mode "default" } bindsym $mod+r mode "resize" ### Status Bar: bar { swaybar_command waybar workspace_buttons yes } ### Startup commands exec GDK_BACKEND=wayland exec CLUTTER_BACKEND=wayland exec --no-startup-id gammastep-indicator -l 38.89511:-77.03637 exec mako exec nm-applet --indicator exec /usr/bin/blueman-applet exec $HOME/.local/bin/autotiling exec dbus-daemon --session --address=unix:path=$XDG_RUNTIME_DIR/bus exec /home/dg/.cargo/bin/sworkstyle &> /tmp/sworkstyle.log exec /usr/bin/1password --silent ### Input/Output devices output HDMI-A-1 { resolution 1920x1080 scale 1.0 pos 1600 0 scale_filter linear } input type:keyboard { xkb_layout "us" xkb_numlock enable } # Browser picture-in-picture mode for_window [app_id="firefox" title="^Picture-in-Picture$"] \ floating enable, move position 1400 700, resize set width 20 ppt height 22 ppt, sticky enable