153 lines
4.9 KiB
Plaintext
Raw Normal View History

2024-09-04 00:54:15 +06:00
set $mod Mod1
# Home row direction keys, like vim
set $left h
set $down j
set $up k
set $right l
2025-04-18 21:40:38 +06:00
# Запуск программ
bindsym $mod+Return exec alacritty
bindsym $mod+p exec ~/bin/screen.sh
bindsym $mod+space exec ~/bin/change_layout.sh
# bindsym Control+space exec sh /home/fs/bin/change_layout.sh
set $menu ~/bin/rofi
input type:keyboard {
xkb_layout us,ru
xkb_options grp:ctrl_alt_toggle,caps:ctrl_modifier,grp:alt_space_toggle,grp:ctrl_space_toggle
}
2024-09-04 00:54:15 +06:00
2025-04-18 21:40:38 +06:00
# close
bindsym $mod+q kill
2024-09-04 00:54:15 +06:00
2025-04-18 21:40:38 +06:00
# Регулировка яркости
bindsym XF86MonBrightnessUp exec brightnessctl set +5%
bindsym XF86MonBrightnessDown exec brightnessctl set 5%-
2024-09-04 00:54:15 +06:00
2025-04-18 21:40:38 +06:00
# Громкость
bindsym XF86AudioRaiseVolume exec "pactl set-sink-volume 0 +5%"
bindsym XF86AudioLowerVolume exec "pactl set-sink-volume 0 -5%"
bindsym XF86AudioMute exec "pactl set-sink-mute 0 toggle"
2024-09-04 00:54:15 +06:00
2025-04-18 21:40:38 +06:00
# Mocp
bindsym Mod4+u exec "mocp --seek -5"
bindsym Mod4+i exec "mocp --seek +5"
bindsym Mod4+j exec "mocp --previous"
bindsym Mod4+k exec "mocp --next"
bindsym Mod4+space exec "mocp --toggle-pause"
bindsym Mod4+r exec "swaymsg reload"
2024-09-04 00:54:15 +06:00
2025-04-18 21:40:38 +06:00
# Emacs
bindsym $mod+e mode $emacs_map
2024-10-14 00:46:34 +06:00
mode "$emacs_map" {
2024-10-28 21:49:48 +06:00
bindsym e exec "emacsclient -n -q -c --socket-name=main" ; mode "default"
2025-02-15 20:38:47 +06:00
bindsym o exec "emacsclient -n -q -c --socket-name=other" ; mode "default"
bindsym h exec "emacsclient -n -q -c --socket-name=http /home/fs/Desktop/work/http/"; mode "default"
bindsym d exec "emacsclient -n -q -c --socket-name=documents /home/fs/Documents/" ; mode "default"
bindsym f exec "emacsclient -n -q -c --socket-name=fm /home/fs/" ; mode "default"
2025-04-18 21:40:38 +06:00
bindsym p exec "emacsclient -n -q -c --socket-name=fm /home/fs/Pictures/" ; mode "default"
bindsym v exec "emacsclient -n -q -c --socket-name=fm /home/fs/Videos/" ; mode "default"
bindsym m exec "emacsclient -n -q -c --socket-name=music /home/fs/Music/8/" ; mode "default"
2025-02-15 20:38:47 +06:00
bindsym t exec "emacsclient -n -q -c --socket-name=terminal" ; mode "default"
2025-04-18 21:40:38 +06:00
}
2024-12-12 00:05:59 +06:00
2025-04-18 21:40:38 +06:00
# Программы
bindsym $mod+r mode $wofi_map
mode "$wofi_map" {
bindsym i exec $menu; mode "default"
bindsym u exec ~/bin/firefox_profiles.sh; mode "default"
2024-10-14 00:46:34 +06:00
}
2024-09-04 00:54:15 +06:00
# Exit sway (logs you out of your Wayland session)
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'
2025-04-18 21:40:38 +06:00
# Переключение окон
bindsym $mod+$left focus left
bindsym $mod+$down focus down
bindsym $mod+$up focus up
bindsym $mod+$right focus right
# move focused window
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
# modes
bindsym $mod+b splith
bindsym $mod+v splitv
# Switch the current container between different layout styles
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+t layout toggle split
bindsym $mod+f fullscreen
bindsym $mod+Shift+f floating toggle
# bindsym $mod+space focus mode_toggle
bindsym $mod+a focus parent
2024-09-04 00:54:15 +06:00
#
# Resizing containers:
#
2025-04-18 21:40:38 +06:00
floating_modifier $mod normal
2024-09-04 00:54:15 +06:00
include /etc/sway/config.d/*
}
2024-10-14 00:46:34 +06:00
2024-09-04 00:54:15 +06:00
bar {
swaybar_command waybar
}
2024-09-12 22:43:09 +06:00
input "type:touchpad" {
2024-09-04 00:54:15 +06:00
dwt enabled
2024-09-12 22:43:09 +06:00
dwtp enabled
2024-09-04 00:54:15 +06:00
tap enabled
2024-09-12 22:43:09 +06:00
tap_button_map lrm
2024-09-04 00:54:15 +06:00
}
# --- theme ---
default_border pixel 2
default_floating_border none
titlebar_padding 1
titlebar_border_thickness 0
gaps inner 10
set {
$accent #ebdbb2
$red #cc241d
$darkgray #3c3836
}
client.focused $accent $accent $darkgray $accent $accent
client.focused_inactive $darkgray $darkgray $accent $darkgray $darkgray
client.unfocused $darkgray $darkgray $accent $darkgray $darkgray
client.urgent $red $red $accent $red $red