From 0ea7c9210869e3cbfcd3ac2aca8cbb4e18a8f832 Mon Sep 17 00:00:00 2001 From: Martin Michalec Date: Wed, 11 Feb 2026 05:44:52 +0300 Subject: add wm --- dot_config/sway/config | 183 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 183 insertions(+) create mode 100644 dot_config/sway/config (limited to 'dot_config/sway') diff --git a/dot_config/sway/config b/dot_config/sway/config new file mode 100644 index 0000000..bdb65bd --- /dev/null +++ b/dot_config/sway/config @@ -0,0 +1,183 @@ +xwayland enable + + +# Layout configuration +input * { + xkb_layout us,ru + xkb_variant altgr-intl, + xkb_options grp:shifts_toggle,ctrl:nocaps +} + + +# General settings: +set $mod Mod4 +floating_modifier $mod normal +bindsym --to-code $mod+Shift+r reload + + +# Launching external applications: +set $pass passmenu +bindsym --to-code $mod+p exec $pass -ip "Copy pass: " -l 10 +bindsym --to-code $mod+Shift+p exec $pass --name -ip "Copy name: " -l 10 +bindsym --to-code $mod+Alt+p exec $pass --type -ip "Type pass: " -l 10 +bindsym --to-code $mod+Alt+Shift+p exec $pass --type --name -ip "Type name: " -l 10 + +set $power-menu powermenu -ip "Power: " +bindsym --to-code $mod+Shift+q exec $power-menu +bindsym --to-code $mod+Control+q exec $power-menu + +set $term emacsclient --create-frame --quiet +set $emacs emacs --background black +set $backup-term foot +bindsym $mod+Return exec $term +bindsym $mod+Shift+Return exec $emacs +bindsym $mod+Control+Shift+Return exec $backup-term + +set $menu menu-drun -ip "Run: " +set $lock lock +bindsym --to-code $mod+Shift+d exec $menu +bindsym --to-code $mod+Shift+l exec $lock +bindsym --to-code $mod+Control+d exec $menu +bindsym --to-code $mod+Control+l exec $lock + +bindsym --to-code $mod+Control+n exec menu-network + + +# Manipulating windows: +bindsym --to-code $mod+Shift+c kill +bindsym --to-code $mod+Shift+f fullscreen +bindsym --to-code $mod+Control+c kill + +bindsym $mod+Shift+space floating toggle +bindsym $mod+Ctrl+space focus mode_toggle + +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+Control+b focus left +bindsym $mod+Control+n focus down +bindsym $mod+Control+p focus up +bindsym $mod+Control+f focus right + +bindsym $mod+Control+Shift+b move left +bindsym $mod+Control+Shift+n move down +bindsym $mod+Control+Shift+p move up +bindsym $mod+Control+Shift+f move right + + +# Moving around workspaces: + +bindsym $mod+tab workspace back_and_forth +bindsym $mod+Control+i workspace back_and_forth + +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 + + +# Scratchpad settings: +bindsym --to-code $mod+Shift+minus move scratchpad +bindsym --to-code $mod+minus scratchpad show + + +# Other: + +bindsym $mod+Control+t exec emacsclient -e "(modus-themes-toggle)" + +default_border pixel +default_floating_border pixel +gaps inner 4 +exec gpg-connect-agent updatestartuptty /bye >/dev/null +# exec pipewire +exec --no-startup-id udiskie -s +exec --no-startup-id $emacs +exec --no-startup-id swayidle -w +exec_always --no-startup-id mako + +# toggle waybar +# bindsym $mod+o exec killall -SIGUSR1 waybar + +bindsym --locked XF86AudioRaiseVolume \ + exec pactl set-sink-mute @DEFAULT_SINK@ false; \ + exec pactl set-sink-volume @DEFAULT_SINK@ +5% +bindsym --locked XF86AudioLowerVolume \ + exec pactl set-sink-mute @DEFAULT_SINK@ false; \ + exec pactl set-sink-volume @DEFAULT_SINK@ -5% +bindsym --locked XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle +bindsym --locked XF86AudioMicMute \ + exec pactl set-source-mute @DEFAULT_SOURCE@ toggle +bindsym --locked XF86MonBrightnessUp exec brightnessctl set 5%+ +bindsym --locked XF86MonBrightnessDown exec brightnessctl set 5%- + +output LVDS-1 pos 0 0 res 1366x768 +output VGA-1 pos 1366 0 res 1024x768 +# output * adaptive_sync on # this may be good, test it +bindswitch --reload --locked lid:on exec swaylock +bindsym $mod+Shift+o [floating] kill +input 6700:66:SEMICCHIP_Usb_Mouse { + pointer_accel 0.0 + accel_profile flat +} +input 6127:24647:Lenovo_ThinkPad_Compact_USB_Keyboard_with_TrackPoint { + pointer_accel -0.6 + repeat_delay 150 + repeat_rate 60 +} +input type:keyboard { + repeat_delay 150 + repeat_rate 60 +} +input type:touchpad { + natural_scroll enabled + tap enabled +} + +bindsym $mod+Alt+s exec sway-swappy-clipboard +bindsym $mod+Shift+s exec sway-shot-window-or-selection + +bindsym $mod+Print exec sway-shot-output +bindsym $mod+Alt+Print exec sway-swappy-clipboard +bindsym XF86SelectiveScreenshot exec sway-shot-window-or-selection +bindsym $mod+Shift+Print exec sway-shot-window-or-selection +bindsym $mod+Control+Print exec toggle-screen-capture output +bindsym $mod+Shift+Control+Print exec toggle-screen-capture window + +bindsym $mod+Control+s exec spotlight + +# bindsym --to-code XF86NotificationCenter exec toggle dunst + +bar swaybar_command waybar + +for_window [title=".* - Emacs Client"] floating enable +for_window [title="cmatrix"] floating enable +for_window [app_id="wdisplays"] floating enable +for_window [app_id="iwgtk"] floating enable +for_window [app_id="mpv"] floating enable + +smart_borders on +smart_gaps on -- cgit v1.3