include ./defaults ### Variables set $mod Mod4 set $menu rofi -show run #bemenu-run set $term alacritty ### Key Bindings # I repeat them here to add `--to-code --no-warn` flag to make the bindings layout agnostic. bindsym --to-code --no-warn { $mod+$left focus left $mod+$down focus down $mod+$up focus up $mod+$right focus right } bindsym --to-code --no-warn $mod+Return exec $term bindsym --to-code --no-warn $mod+Shift+q kill bindsym --to-code --no-warn $mod+d exec $menu bindsym --to-code --no-warn $mod+Shift+c reload input * { xkb_layout "de,ir" xkb_options "lv3:caps_switch,grp:lctrl_lwin_toggle,shift:both_shiftlock" } input type:touchpad { tap disabled natural_scroll enabled } bar { status_command i3status } # Enable fzf-based floating app menu #for_window [app_id="^launcher$"] floating enable, sticky enable, resize set 30 ppt 60 ppt, border pixel 10 #set $menu exec $term --class=launcher -e sway-launcher-desktop #bindsym --to-code --no-warn $mod+tab exec $menu # # Multimedia keys - Courtesy of great Arch Linux wiki and its awesome users. # 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 bindsym XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle bindsym XF86MonBrightnessDown exec brightnessctl set 5%- bindsym XF86MonBrightnessUp exec brightnessctl set +5% bindsym XF86AudioPlay exec playerctl play-pause bindsym XF86AudioNext exec playerctl next bindsym XF86AudioPrev exec playerctl previous bindsym XF86Search exec bemenu-run # # Screen capture # Thanks to Gentoo wiki at https://wiki.gentoo.org/wiki/Sway # set $ps1 Print set $ps2 Control+Print set $ps3 Alt+Print set $ps4 Alt+Control+Print bindsym $ps1 exec grim - | wl-copy bindsym $ps2 exec grim -g "$(slurp)" - | wl-copy bindsym $ps3 exec grim $(xdg-user-dir PICTURES)/Screenshots/ps_$(date +"%Y%m%d%H%M%S").png bindsym $ps4 exec grim -g "$(slurp)" $(xdg-user-dir PICTURES)/Screenshots/ps_$(date +"%Y%m%d%H%M%S").png include ~/.config/sway/`hostname`