diff --git a/README.md b/README.md index 6add786..8b4a513 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,8 @@ Hyprland 0.57 на Fedora 44: тёмный минималистичный рай | `dms/plugins/networkEditor` | плагин DMS: кнопка в панели, открывает `nm-connection-editor` | | `dms/settings.json` | настройки DMS (панель, тема `pink`, лаунчер) | | `systemd/user/hyprland-session.target` | нужен порталам (`xdg-desktop-portal`) вне uwsm | -| `kitty/kitty.conf` | терминал | +| `kitty/kitty.conf` | терминал: цвета и вкладки подключены из файлов DMS, прозрачность 0.80 | +| `fontconfig/60-monospace-jetbrains.conf` | JetBrains Mono — моноширинный шрифт по умолчанию для всех программ | | `install.sh` | установка на чистую Fedora: по умолчанию только визуал, `--full` — ещё инструменты и приложения | | `sync.sh` | копирует живой конфиг из `~/.config` в репозиторий | diff --git a/dms/settings.json b/dms/settings.json index 974be98..6c9d6f7 100644 --- a/dms/settings.json +++ b/dms/settings.json @@ -346,7 +346,7 @@ } ], "configVersion": 42, - "popupTransparency": 0.95, + "popupTransparency": 0.98, "fontFamily": "JetBrains Mono Medium", "audioVisualizerEnabled": true, "scrollTitleEnabled": true, @@ -489,7 +489,7 @@ "displayFontFamily": "JetBrains Mono", "fontWeight": 300, "fontScale": 1, - "currentThemeName": "pink", + "currentThemeName": "purple", "wallpaperFillMode": "Fill", "connectedFrameBarStyleBackups": {}, "frameEnabled": false, diff --git a/fontconfig/60-monospace-jetbrains.conf b/fontconfig/60-monospace-jetbrains.conf new file mode 100644 index 0000000..8531865 --- /dev/null +++ b/fontconfig/60-monospace-jetbrains.conf @@ -0,0 +1,11 @@ + + + + + + monospace + + JetBrains Mono + + + diff --git a/hypr/cheatsheet.txt b/hypr/cheatsheet.txt index 317dc62..e07f124 100644 --- a/hypr/cheatsheet.txt +++ b/hypr/cheatsheet.txt @@ -22,8 +22,9 @@ Mod+C Центрировать плавающее окно Mod+Shift+T Закрепить плавающее окно поверх всех Mod+E Сменить направление разбиения Mod+P Pseudo-tiling -Mod+W Собрать окна во вкладки (группа) -Mod+[ / Mod+] Предыдущая / следующая вкладка группы +Mod+W Режим вкладок: все окна стола в одну группу; повтор — разобрать обратно + Пока группа в фокусе, новые окна открываются новыми вкладками +Mod+[ / Mod+] Предыдущая / следующая вкладка (также колесо мыши на полосе вкладок, клик по вкладке) Mod+Ctrl+H/J/K/L Изменить размер окна (также стрелки, можно удерживать) Mod+ЛКМ / ПКМ Перетащить / изменить размер окна мышью @@ -50,9 +51,9 @@ Mod+1..0 Перейти на стол 1..10 (повтор = наза Mod+Shift+1..0 Перенести окно на стол 1..10 Alt+Tab Предыдущее окно (ещё раз — обратно) Mod+Alt+Tab Следующее окно на этом столе -Mod+Tab Следующий стол -Mod+Shift+Tab Предыдущий стол -Mod+колесо мыши Листать столы +Mod+Tab Следующий стол этого монитора (на другой не уходит) +Mod+Shift+Tab Предыдущий стол этого монитора +Mod+колесо мыши Листать столы этого монитора Жест 3 пальца Листать столы Mod+, / Mod+. Фокус на левый / правый монитор Mod+Shift+- Убрать окно в scratchpad diff --git a/hypr/hyprland.lua b/hypr/hyprland.lua index 14faea4..0fe5356 100644 --- a/hypr/hyprland.lua +++ b/hypr/hyprland.lua @@ -1,4 +1,21 @@ -- Hyprland 0.57 (Lua). Clean dark work setup; shell = DankMaterialShell. + +pcall(require, "dms.colors") -- DMS theme colours; DMS rewrites that file on every theme change and Hyprland reloads when it does + +-- Theme colours as plain hex, read from the file DMS regenerates (fallbacks = the pink theme). +local function dms_hex(key, fallback) + local f = io.open(os.getenv("HOME") .. "/.config/hypr/dms/colors.lua") + local t = f and f:read("*a") or "" + if f then f:close() end + return t:match("%f[%w_]" .. key .. '%s*=%s*"rgb%((%x%x%x%x%x%x)%)"') or fallback +end +local function lighten(hex, k) -- mix a colour with white + local function m(c) return math.floor(c + (255 - c) * k + 0.5) end + return string.format("%02x%02x%02x", m(tonumber(hex:sub(1, 2), 16)), m(tonumber(hex:sub(3, 4), 16)), m(tonumber(hex:sub(5, 6), 16))) +end +local primary = dms_hex("active_border", "e91e63") +local outline = dms_hex("inactive_border", "9f8c8e") +local light = lighten(primary, 0.55) -- Fallback login session: GNOME (via GDM). local terminal = "kitty" @@ -44,12 +61,12 @@ end) ----------------------- hl.config({ general = { - gaps_in = 6, - gaps_out = 14, + gaps_in = 4, + gaps_out = 10, border_size = 2, col = { - active_border = { colors = { "rgba(e91e63ff)", "rgba(ff6398ff)", "rgba(f8bbd9ff)", "rgba(e91e63ff)" }, angle = 45 }, - inactive_border = "rgba(3a2a2eaa)", + active_border = { colors = { "rgba(" .. primary .. "ff)", "rgba(" .. light .. "ff)", "rgba(" .. primary .. "ff)" }, angle = 45 }, + inactive_border = "rgba(" .. outline .. "40)", }, resize_on_border = true, allow_tearing = false, @@ -63,11 +80,18 @@ hl.config({ dim_inactive = true, dim_strength = 0.06, shadow = { - enabled = true, - range = 30, + enabled = true, + range = 20, render_power = 3, - color = 0x66e91e63, -- soft pink glow on the focused window - color_inactive = 0x66000000, + color = 0x55000000, + color_inactive = 0x44000000, + }, + glow = { -- light around the focused window, colour follows the DMS theme + enabled = true, + range = 14, + render_power = 3, + color = "rgba(" .. primary .. "55)", + color_inactive = "rgba(00000000)", }, blur = { enabled = true, @@ -79,6 +103,19 @@ hl.config({ popups = true, }, }, + group = { + auto_group = true, -- a new window opened while a group is focused becomes another tab + insert_after_current = true, + focus_removed_window = true, + col = { border_active = "rgba(" .. primary .. "ff)", border_inactive = "rgba(" .. outline .. "40)" }, + groupbar = { + enabled = true, height = 16, font_size = 10, font_family = "JetBrains Mono", + render_titles = true, gradients = true, rounding = 6, gaps_in = 2, gaps_out = 2, + indicator_height = 0, scrolling = true, middle_click_close = true, + text_color = "rgba(ffffffff)", text_color_inactive = "rgba(b8a4a9ff)", + col = { active = "rgba(" .. primary .. "dd)", inactive = "rgba(2a2024cc)" }, + }, + }, animations = { enabled = true }, binds = { workspace_back_and_forth = true }, dwindle = { preserve_split = true, force_split = 2 }, -- new window always opens to the right/below @@ -99,14 +136,12 @@ hl.curve("easeOutQuint", { type = "bezier", points = { {0.23, 1}, {0.32, 1} hl.curve("easeInOutCubic", { type = "bezier", points = { {0.65, 0.05}, {0.36, 1} } }) hl.curve("quick", { type = "bezier", points = { {0.15, 0}, {0.1, 1} } }) hl.curve("linear", { type = "bezier", points = { {0, 0}, {1, 1} } }) -hl.curve("snappy", { type = "spring", mass = 1, stiffness = 340, damping = 24 }) -hl.curve("bouncy", { type = "spring", mass = 1, stiffness = 280, damping = 17 }) hl.animation({ leaf = "global", enabled = true, speed = 10, bezier = "default" }) hl.animation({ leaf = "border", enabled = true, speed = 4, bezier = "easeOutQuint" }) hl.animation({ leaf = "borderangle", enabled = true, speed = 60, bezier = "linear", style = "loop" }) -- slowly rotating gradient border -hl.animation({ leaf = "windows", enabled = true, speed = 3.2, spring = "snappy" }) -hl.animation({ leaf = "windowsIn", enabled = true, speed = 3.0, spring = "bouncy", style = "popin 88%" }) +hl.animation({ leaf = "windows", enabled = true, speed = 3.0, bezier = "easeOutQuint" }) +hl.animation({ leaf = "windowsIn", enabled = true, speed = 2.6, bezier = "easeOutQuint", style = "popin 94%" }) hl.animation({ leaf = "windowsOut", enabled = true, speed = 1.2, bezier = "quick", style = "popin 88%" }) hl.animation({ leaf = "fade", enabled = true, speed = 2, bezier = "quick" }) hl.animation({ leaf = "fadeDim", enabled = true, speed = 2.5, bezier = "quick" }) @@ -181,13 +216,34 @@ b(mod .. " + SHIFT + SPACE", hl.dsp.window.float({ action = "toggle" })) b(mod .. " + C", hl.dsp.window.center()) b(mod .. " + E", hl.dsp.layout("togglesplit")) b(mod .. " + P", hl.dsp.window.pseudo()) -b(mod .. " + W", hl.dsp.group.toggle()) +-- Tabs: Mod+W puts every tiled window of this workspace into one tabbed group; press it again to split them back. +-- While a group is focused, new windows join it as tabs. Mod+[ / Mod+] or the mouse wheel on the tab bar switch tabs. +function HL_toggle_tabs() + local a = hl.get_active_window() + if not a then return end + if a.group and a.group.size > 1 then + hl.dispatch(hl.dsp.group.toggle()) + return + end + local wins = hl.get_windows({ workspace = a.workspace.id, floating = false, mapped = true }) + if #wins < 2 then + hl.dispatch(hl.dsp.group.toggle()) -- single window: just start a group, the next windows become its tabs + return + end + if not a.group then hl.dispatch(hl.dsp.group.toggle()) end + local g = hl.get_window("address:" .. a.address).group + for _, w in ipairs(wins) do + if w.address ~= a.address and not w.group then g:add(w) end + end + hl.dispatch(hl.dsp.focus({ window = "address:" .. a.address })) +end +b(mod .. " + W", HL_toggle_tabs) b("ALT + TAB", hl.dsp.exec_cmd("~/.config/hypr/scripts/prev-window.sh")) -- previous window (press again to go back) b(mod .. " + ALT + TAB", hl.dsp.window.cycle_next()) -- next window on this workspace -b(mod .. " + TAB", hl.dsp.focus({ workspace = "e+1" })) -b(mod .. " + SHIFT + TAB", hl.dsp.focus({ workspace = "e-1" })) -b(mod .. " + mouse_down", hl.dsp.focus({ workspace = "e+1" })) -b(mod .. " + mouse_up", hl.dsp.focus({ workspace = "e-1" })) +b(mod .. " + TAB", hl.dsp.focus({ workspace = "m+1" })) -- next open workspace on THIS monitor +b(mod .. " + SHIFT + TAB", hl.dsp.focus({ workspace = "m-1" })) +b(mod .. " + mouse_down", hl.dsp.focus({ workspace = "m+1" })) +b(mod .. " + mouse_up", hl.dsp.focus({ workspace = "m-1" })) -- workspaces 1..10 for i = 1, 10 do diff --git a/install.sh b/install.sh index baccf17..40c67bf 100755 --- a/install.sh +++ b/install.sh @@ -58,7 +58,7 @@ done # ---------- проверки ---------- step "Проверки" [ "$(id -u)" -ne 0 ] || die "запускайте от обычного пользователя, sudo скрипт вызовет сам" -for d in hypr dms/plugins/networkEditor systemd/user kitty; do +for d in hypr dms/plugins/networkEditor systemd/user kitty fontconfig; do [ -e "$REPO/$d" ] || die "в репозитории нет $d (запускайте install.sh из корня hyprland-rising)" done . /etc/os-release 2>/dev/null || true @@ -151,6 +151,13 @@ PY run cp -a "$REPO/kitty/kitty.conf" "$CFG/kitty/kitty.conf" info "kitty/kitty.conf" + # JetBrains Mono as the default monospace font for every program + run mkdir -p "$CFG/fontconfig/conf.d" + run cp -a "$REPO/fontconfig/60-monospace-jetbrains.conf" "$CFG/fontconfig/conf.d/60-monospace-jetbrains.conf" + run fc-cache -f || true + command -v gsettings >/dev/null && run gsettings set org.gnome.desktop.interface monospace-font-name 'JetBrains Mono 11' || true + info "fontconfig: JetBrains Mono как моноширинный шрифт по умолчанию" + run cp -a "$REPO/systemd/user/hyprland-session.target" "$CFG/systemd/user/" run systemctl --user daemon-reload || warn "systemctl --user недоступен (нет пользовательской сессии systemd): выполните daemon-reload после входа" info "systemd/user/hyprland-session.target (нужен порталам: выбор файлов, демонстрация экрана)" diff --git a/kitty/kitty.conf b/kitty/kitty.conf index 9620a50..6a6f52e 100644 --- a/kitty/kitty.conf +++ b/kitty/kitty.conf @@ -36,6 +36,8 @@ copy_on_select clipboard strip_trailing_spaces smart # ---------- Tabs ---------- +# DMS tab colours; the layout lines below are mine and override its layout (kitty does not allow comments after include) +include dank-tabs.conf tab_bar_edge top tab_bar_style powerline tab_powerline_style round @@ -53,7 +55,6 @@ inactive_text_alpha 0.75 window_border_width 1pt # ---------- URLs ---------- -url_color #7dcfff url_style curly detect_urls yes underline_hyperlinks hover @@ -63,40 +64,15 @@ enable_audio_bell no visual_bell_duration 0.15 ease-out window_alert_on_bell yes -# ---------- Colors: Tokyo Night Storm tuned for glass ---------- -foreground #c0caf5 -background #11111b -selection_foreground #11111b -selection_background #bb9af7 -cursor #ff9e64 -cursor_text_color #11111b -url_color #7dcfff +# ---------- Colors: from DankMaterialShell ---------- +# dank-theme.conf is regenerated by DMS on every theme change; tab colours come from dank-tabs.conf (included above the tab section) +include dank-theme.conf -active_tab_foreground #11111b -active_tab_background #bb9af7 -inactive_tab_foreground #a9b1d6 -inactive_tab_background #1f2335 tab_bar_background none mark1_foreground #11111b mark1_background #ff9e64 -color0 #414868 -color8 #565f89 -color1 #f7768e -color9 #ff899d -color2 #9ece6a -color10 #b9f27c -color3 #e0af68 -color11 #ffc777 -color4 #7aa2f7 -color12 #8db0ff -color5 #bb9af7 -color13 #c9a9ff -color6 #7dcfff -color14 #a4daff -color7 #a9b1d6 -color15 #c0caf5 # ---------- Shortcuts ---------- # Plain Ctrl+C / Ctrl+V: Ctrl+C copies when text is selected, otherwise it is the usual interrupt (SIGINT) diff --git a/sync.sh b/sync.sh index 14c6ce5..574b8c6 100755 --- a/sync.sh +++ b/sync.sh @@ -4,10 +4,11 @@ set -e cd "$(dirname "$0")" C=${XDG_CONFIG_HOME:-$HOME/.config} -mkdir -p hypr dms/plugins systemd/user kitty +mkdir -p hypr dms/plugins systemd/user kitty fontconfig rsync -a --delete --exclude 'dms/' --exclude 'hyprlock.conf' --exclude 'hyprpaper.conf' --exclude 'scripts/osd.sh' "$C/hypr/" hypr/ rsync -a --delete "$C/dms/plugins/networkEditor/" dms/plugins/networkEditor/ cp -f "$C/dms/settings.json" dms/settings.json cp -f "$C/systemd/user/hyprland-session.target" systemd/user/ cp -f "$C/kitty/kitty.conf" kitty/kitty.conf +cp -f "$C/fontconfig/conf.d/60-monospace-jetbrains.conf" fontconfig/ git status --short