nixos-config/home/sway/config

159 lines
4.5 KiB
Text
Raw Normal View History

2024-10-22 11:53:19 -04:00
set $mod Mod4
set $alt Mod1
set $left h
set $down j
set $up k
set $right l
set $term $HOME/.config/sway/scripts/terminal.sh
set $menu rofi -show run
2024-10-22 11:53:19 -04:00
set $screenshot grim -g "$(slurp)" - | wl-copy
2024-12-19 02:37:54 -05:00
set $browser librewolf
2024-10-22 11:53:19 -04:00
set $clipboard rofi -show clipboard -show-icons
2024-12-04 22:53:37 -05:00
set $emoji rofi -show emoji
2024-10-22 11:53:19 -04:00
set $font_family DejaVu Sans Mono
set $font_size 11
set $bg #000000
set $fg #ffffff
set $fgi #888888
2024-12-14 00:12:21 -05:00
set $wallpaper $HOME/wallpapers/nixos-c-book-large.png
2024-11-21 15:56:39 -05:00
set $lock swaylock -f -i $wallpaper
2024-10-22 11:53:19 -04:00
output * bg $wallpaper fill
floating_modifier $mod normal
default_border pixel
smart_borders on
focus_follows_mouse always
mouse_warping container
2024-10-22 11:53:19 -04:00
bindsym $mod+Return exec $term
2024-11-22 00:58:04 -05:00
bindsym $mod+Ctrl+q kill
2024-10-22 11:53:19 -04:00
bindsym $mod+d exec $menu
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 Print exec $screenshot
2024-11-01 11:34:42 -04:00
bindsym $mod+comma exec $clipboard
2024-10-22 11:53:19 -04:00
bindsym $mod+period exec $emoji
bindsym $mod+$alt+b exec $browser
bindsym $mod+$alt+a exec anki
bindsym $mod+$alt+f exec thunar
2024-10-24 22:47:30 -04:00
bindsym $mod+$alt+e exec evolution
2024-11-22 00:58:04 -05:00
bindsym $mod+p exec bitwarden
bindsym $mod+$alt+m exec element-desktop
2024-10-22 11:53:19 -04:00
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+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
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
2024-12-04 22:53:37 -05:00
# mouse side buttons
bindsym --whole-window BTN_EXTRA exec ~/.config/sway/scripts/remote.sh btn1
bindsym --whole-window BTN_SIDE exec ~/.config/sway/scripts/remote.sh
2024-10-22 11:53:19 -04:00
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
bindsym $mod+a focus parent
bindsym $mod+Shift+a focus child
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 Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+r mode "resize"
# keys to adjust volue and brightness
bindsym --locked XF86AudioMute exec "amixer -q sset Master,0 toggle"
bindsym --locked XF86AudioLowerVolume exec "amixer -q set Master 1%-"
bindsym --locked XF86AudioRaiseVolume exec "amixer -q sset Master 1%+"
bindsym --locked XF86MonBrightnessDown exec brightnessctl set 1%-
bindsym --locked XF86MonBrightnessUp exec brightnessctl set 1%+
# lockscreen
bindsym $mod+Control+l exec $lock
2024-10-22 11:53:19 -04:00
font pango:$font_family $font_size
2024-12-18 18:12:18 -05:00
for_window [app_id=mpv] floating enable, inhibit_idle open
2024-10-22 11:53:19 -04:00
for_window [class="pomatez"] floating enable, sticky enable
2024-11-06 00:28:04 -05:00
for_window [class="PacketTracer"] floating enable, border normal
for_window [app_id="LibreWolf" title="^Extension"] floating enable
for_window [floating] border csd
2024-11-21 15:56:39 -05:00
for_window [app_id="org.keepassxc.KeePassXC"] floating enable
for_window [class="Bitwarden"] floating enable
2024-10-22 11:53:19 -04:00
bar {
2024-11-21 15:56:39 -05:00
swaybar_command waybar
2024-10-22 11:53:19 -04:00
}
input "type:touchpad" {
dwt enabled
tap enabled
natural_scroll enabled
}
input "type:keyboard" {
xkb_layout us
xkb_options ctrl:nocaps
2024-11-02 12:10:31 -04:00
xkb_numlock enabled
2024-10-22 11:53:19 -04:00
}
exec wl-paste --watch cliphist store
exec mako >> $HOME/mako.log 2>&1
2024-10-22 11:53:19 -04:00
exec dbus-update-activation-environment --all
exec swayidle -w \
2024-11-21 15:56:39 -05:00
timeout 300 'swaymsg "output * power off"' \
timeout 305 $lock \
resume 'swaymsg "output * power on"' \
before-sleep 'playerctl pause; swaylock -f'
2024-10-22 11:53:19 -04:00
exec system-dnotify --ready