Загрузка данных


#######################################################################
#  ██████╗  ██████╗ ████████╗███████╗
#  i3 Rice v2 — полная, рабочая конфигурация
#######################################################################

# ===== Мод-клавиша и базовые настройки =====
set $mod Mod4
set $alt Mod1
font pango:JetBrains Mono Nerd Font 10

# ===== Окна и отступы =====
default_border pixel 2
default_floating_border normal 2
gaps inner 6
gaps outer 4
smart_gaps on
title_align center

# Catppuccin Frappé + фиолетовый акцент
client.focused          #CBA6F7 #1E1E2E #CDD6F4 #CBA6F7   #CBA6F7
client.unfocused        #313244 #1E1E2E #585B70 #313244   #313244
client.focused_inactive #313244 #1E1E2E #7F849C #313244   #313244
client.urgent           #F38BA8 #F38BA8 #1E1E2E #F38BA8   #F38BA8
client.placeholder      #313244 #1E1E2E #7F849C #313244   #313244
client.background       #1E1E2E

# ===== Автозапуск =====
exec --no-startup-id xsetroot -cursor_name left_ptr
exec --no-startup-id feh --bg-scale ~/Pictures/Wallpapers/catppuccin-purple.png
exec --no-startup-id picom --config ~/.config/picom/picom.conf
exec --no-startup-id dunst
exec --no-startup-id nm-applet
exec --no-startup-id setxkbmap -layout us,ru -option grp:win_space_toggle
exec --no-startup-id gsettings set org.gnome.desktop.interface gtk-theme 'Lavanda-Dark'
exec --no-startup-id gsettings set org.gnome.desktop.interface icon-theme 'Papirus'
exec --no-startup-id gsettings set org.gnome.desktop.interface cursor-theme 'Bibata-Modern-Classic'
exec --no-startup-id gsettings set org.cinnamon.desktop.interface gtk-theme 'Lavanda-Dark'
exec --no-startup-id gsettings set org.cinnamon.desktop.interface icon-theme 'Papirus'
exec --no-startup-id setxkbmap -layout us,ru -option grp:win_space_toggle
exec --no-startup-id polybar main
exec --no-startup-id ~/.config/polybar/scripts/raise-polybar.sh

# Правила окон
for_window [class="Polybar"]            sticky enable, border none, floating enable, focus disable
for_window [instance="polybar-main"]    sticky enable, border none, floating enable, focus disable
for_window [window_role="pop-up"]       floating enable
for_window [window_role="dialog"]       floating enable
for_window [class="(?i)thunar"]         floating enable
for_window [class="(?i)file-roller"]    floating enable
for_window [class="(?i)engrampa"]       floating enable
for_window [class="(?i)nm-connection-editor"] floating enable
for_window [class="(?i)blueman-manager"] floating enable
for_window [class="(?i)pavucontrol"]    floating enable
for_window [class="(?i)flameshot"]      floating enable
for_window [class="(?i)rofi"]           floating enable
for_window [class="(?i)fuzzel"]         floating enable
for_window [class="(?i)zenity"]         floating enable
for_window [class="(?i)california"]     floating enable
for_window [class="(?i)vlc"]            floating enable
for_window [class="(?i)mpv"]            floating enable
for_window [class="(?i)audacious"]      floating enable
for_window [class="(?i)firefox"]        resize set 1280 800, move position center

# (Закреплённые приложения отключены)

# ===== Приложения =====
bindsym $mod+Return exec konsole
bindsym $mod+d exec rofi -show drun
bindsym $mod+b exec firefox
bindsym $mod+e exec thunar
bindsym $mod+t exec telegram-desktop
bindsym $mod+c exec ~/.config/polybar/scripts/colorpicker.sh
bindsym $mod+n exec ~/.config/polybar/scripts/wifi.sh
bindsym $mod+y exec ~/.config/polybar/scripts/clipboard.sh
bindsym $mod+grave exec ~/.config/polybar/scripts/workspace-switcher.sh
bindsym $mod+End exec ~/.config/polybar/scripts/powermenu.sh

# ===== Win-меню (Win+Alt или Ctrl+Win) — rofi -show drun =====
bindsym $mod+Alt_L exec rofi -show drun
bindsym Ctrl+$mod exec rofi -show drun

# ===== Alt+Tab =====
bindsym $alt+Tab exec ~/.config/polybar/scripts/alttab.sh

# ===== Win-функции =====
bindsym $mod+i exec ~/.config/polybar/scripts/show-desktop.sh
bindsym $mod+Shift+i exec ~/.config/polybar/scripts/show-all.sh
bindsym $mod+w exec rofi -show window
bindsym $mod+x exec --no-startup-id ~/.config/polybar/scripts/lock.sh

# ===== Фокус (vim) =====
bindsym $mod+h focus left
bindsym $mod+j focus down
bindsym $mod+k focus up
bindsym $mod+l focus right
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right

# ===== Перемещение (Shift+vim) =====
bindsym $mod+Shift+h move left
bindsym $mod+Shift+j move down
bindsym $mod+Shift+k move up
bindsym $mod+Shift+l move 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

# ===== Снап (Ctrl+стрелки) =====
bindsym $mod+Ctrl+Left resize set width 50 ppt, move left
bindsym $mod+Ctrl+Right resize set width 50 ppt, move right
bindsym $mod+Ctrl+Up fullscreen toggle
bindsym $mod+Ctrl+Down move scratchpad

# ===== Сплит и тайлинг =====
bindsym $mod+q split h
bindsym $mod+v split v
bindsym $mod+s layout stacking
bindsym $mod+Shift+w layout tabbed
bindsym $mod+f floating toggle

# ===== Ресайз (Mod+z) =====
floating_modifier $mod
mode "resize" {
        bindsym h resize shrink width 30 px or 30 ppt
        bindsym j resize grow height 30 px or 30 ppt
        bindsym k resize shrink height 30 px or 30 ppt
        bindsym l resize grow width 30 ppt
        bindsym Left  resize shrink width 30 px or 30 ppt
        bindsym Down  resize grow height 30 px or 30 ppt
        bindsym Up    resize shrink height 30 px or 30 ppt
        bindsym Right resize grow width 30 ppt
        bindsym Escape mode "default"
        bindsym Return mode "default"
        bindsym $mod+z mode "default"
}
bindsym $mod+z mode "resize"

# ===== Fullscreen, Minimize, Maximize =====
bindsym F11 fullscreen toggle
bindsym $mod+m fullscreen toggle
bindsym $mod+Shift+minus move scratchpad
bindsym $mod+minus scratchpad show

# ===== Управление окнами =====
bindsym $mod+Shift+q kill
bindsym $mod+Shift+c reload
bindsym $mod+Shift+r restart
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'Exit i3?' -B 'Yes' 'i3-msg exit'"

# ===== Тайтлбар мышью =====
bindsym $mod+button2 titlebar floating toggle
bindsym $mod+button3 titlebar kill

# ===== Gaps (Mod+g) =====
mode "gaps" {
        bindsym plus gaps inner plus 5
        bindsym minus gaps inner minus 5
        bindsym 0 gaps inner set 0
        bindsym Escape mode "default"
        bindsym Return mode "default"
        bindsym $mod+g mode "default"
}
bindsym $mod+g mode "gaps"

# ===== Рабочие столы =====
set $ws1 "1:term"
set $ws2 "2:web"
set $ws3 "3:code"
set $ws4 "4:chat"
set $ws5 "5:media"
set $ws6 "6:files"
set $ws7 "7:work"
set $ws8 "8:game"
set $ws9 "9:misc"
set $ws10 "10:etc"

bindsym $mod+1 workspace number $ws1
bindsym $mod+2 workspace number $ws2
bindsym $mod+3 workspace number $ws3
bindsym $mod+4 workspace number $ws4
bindsym $mod+5 workspace number $ws5
bindsym $mod+6 workspace number $ws6
bindsym $mod+7 workspace number $ws7
bindsym $mod+8 workspace number $ws8
bindsym $mod+9 workspace number $ws9
bindsym $mod+0 workspace number $ws10

bindsym $mod+Shift+1 move container to workspace number $ws1
bindsym $mod+Shift+2 move container to workspace number $ws2
bindsym $mod+Shift+3 move container to workspace number $ws3
bindsym $mod+Shift+4 move container to workspace number $ws4
bindsym $mod+Shift+5 move container to workspace number $ws5
bindsym $mod+Shift+6 move container to workspace number $ws6
bindsym $mod+Shift+7 move container to workspace number $ws7
bindsym $mod+Shift+8 move container to workspace number $ws8
bindsym $mod+Shift+9 move container to workspace number $ws9
bindsym $mod+Shift+0 move container to workspace number $ws10

# Win+Ctrl+1..4 = открыть приложение на рабочем столе
bindsym $mod+Ctrl+1 exec konsole; workspace number $ws1
bindsym $mod+Ctrl+2 exec firefox; workspace number $ws2
bindsym $mod+Ctrl+3 exec code; workspace number $ws3
bindsym $mod+Ctrl+4 exec telegram-desktop; workspace number $ws4

# ===== Скриншоты =====
bindsym Print exec ~/.config/polybar/scripts/screenshot.sh full
bindsym $mod+Print exec ~/.config/polybar/scripts/screenshot.sh area
bindsym $mod+Shift+Print exec ~/.config/polybar/scripts/screenshot.sh window

# ===== Медиа =====
bindsym $mod+comma exec ~/.config/polybar/scripts/media.sh prev
bindsym $mod+period exec ~/.config/polybar/scripts/media.sh next
bindsym $mod+slash exec ~/.config/polybar/scripts/media.sh toggle

# ===== Медиа-клавиши =====
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +5%
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5%
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle
bindsym XF86MonBrightnessUp exec --no-startup-id ~/.config/polybar/scripts/brightness.sh up
bindsym XF86MonBrightnessDown exec --no-startup-id ~/.config/polybar/scripts/brightness.sh down