From 8dc68ca138d17d696f435c315aa8d485559c013e Mon Sep 17 00:00:00 2001 From: js0ny Date: Wed, 2 Apr 2025 19:26:14 +0100 Subject: [PATCH] chore(linux): Minor change --- platforms/linux/hypr/.gitignore | 1 + platforms/linux/hypr/hypridle.conf | 14 +++++++++++ platforms/linux/hypr/hyprland.conf | 34 ++++++++++++++------------ platforms/linux/kde/kglobalshortcutsrc | 12 +++++---- platforms/linux/neovide.toml | 26 ++++++++++++++++++++ platforms/linux/user-dirs.dirs | 9 +++++-- platforms/linux/user-dirs.locale | 1 + 7 files changed, 75 insertions(+), 22 deletions(-) create mode 100644 platforms/linux/hypr/.gitignore create mode 100644 platforms/linux/hypr/hypridle.conf create mode 100644 platforms/linux/neovide.toml create mode 100644 platforms/linux/user-dirs.locale diff --git a/platforms/linux/hypr/.gitignore b/platforms/linux/hypr/.gitignore new file mode 100644 index 0000000..5df1b9b --- /dev/null +++ b/platforms/linux/hypr/.gitignore @@ -0,0 +1 @@ +.sass-cache diff --git a/platforms/linux/hypr/hypridle.conf b/platforms/linux/hypr/hypridle.conf new file mode 100644 index 0000000..6451aac --- /dev/null +++ b/platforms/linux/hypr/hypridle.conf @@ -0,0 +1,14 @@ +general { + lock_cmd = notify-send "lock!" # dbus/sysd lock command (loginctl lock-session) + unlock_cmd = notify-send "unlock!" # same as above, but unlock + before_sleep_cmd = notify-send "Zzz" # command ran before sleep + after_sleep_cmd = notify-send "Awake!" # command ran after sleep + ignore_dbus_inhibit = false # whether to ignore dbus-sent idle-inhibit requests (used by e.g. firefox or steam) + ignore_systemd_inhibit = false # whether to ignore systemd-inhibit --what=idle inhibitors +} + +listener { + timeout = 600 # in seconds + on-timeout = notify-send "You are idle!" # command to run when timeout has passed + on-resume = notify-send "Welcome back!" # command to run when activity is detected after timeout has fired. +} diff --git a/platforms/linux/hypr/hyprland.conf b/platforms/linux/hypr/hyprland.conf index 6d9a6aa..5330165 100644 --- a/platforms/linux/hypr/hyprland.conf +++ b/platforms/linux/hypr/hyprland.conf @@ -44,7 +44,7 @@ xwayland { # monitor=,preferred,auto,auto # Format: # MONITOR_NAME,RESOLUTION@REFRESH_RATE,OFFSET_XxOFFSET_Y,SCALE -monitor=DP-2,3840x2160@59,0x0,1.666667 +monitor=DP-2,3840x2160@60,0x0,1.875 ################### @@ -56,7 +56,7 @@ monitor=DP-2,3840x2160@59,0x0,1.666667 # Set programs that you use $terminal = kitty $fileManager = dolphin -$menu = wofi +$menu = rofi ################# @@ -68,11 +68,11 @@ $menu = wofi # exec-once = $terminal # exec-once = nm-applet & -# exec-once = waybar & hyprpaper & mako & systemctl --user start hyprpolkitagent & fcitx5 & albert # Top Bar exec-once = waybar & # Notifications exec-once = mako & +# exec-once = hyprpanel & # wallpapers exec-once = hyprpaper & # Authentication agent @@ -147,12 +147,12 @@ decoration { active_opacity = 1.0 inactive_opacity = 1.0 - # shadow { - # enabled = true - # range = 4 - # render_power = 3 - # color = $base - # } + shadow { + enabled = true + range = 4 + render_power = 3 + color = $base + } # https://wiki.hyprland.org/Configuring/Variables/#blur blur { @@ -231,7 +231,7 @@ input { kb_layout = us kb_variant = kb_model = - kb_options = caps:escape + kb_options = kb_rules = follow_mouse = 1 @@ -266,12 +266,12 @@ $mainMod = SUPER # Sets "Windows" key as main modifier # Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more bind = $mainMod, R, exec, $terminal bind = $mainMod, Q, killactive, -bind = $mainMod, M, exit, +# bind = $mainMod, M, exit, bind = $mainMod, F, exec, $fileManager -bind = $mainMod, V, exec, cliphist list | wofi --dmenu | cliphist decode | wl-copy -bind = $mainMod SHIFT, V, togglefloating +bind = $mainMod, V, exec, cliphist list | rofi --dmenu | cliphist decode | wl-copy +bind = $mainMod SHIFT, F, togglefloating -bind = $mainMod, space, exec, $menu +bind = alt, space, exec, $menu -show drun bind = $mainMod, P, pseudo, # dwindle bind = $mainMod, X, togglesplit, # dwindle @@ -284,8 +284,12 @@ bind = $mainMod, h, movefocus, l bind = $mainMod, i, movefocus, r bind = $mainMod, e, movefocus, u bind = $mainMod, n, movefocus, d +bind = $mainMod alt, h, swapwindow, l +bind = $mainMod alt, i, swapwindow, r +bind = $mainMod alt, e, swapwindow, u +bind = $mainMod alt, n, swapwindow, d -bind = $mainMod, c, exec, grimblast copy area +bind = $mainMod, c, exec, hyprshot -m region -o $HOME/Pictures/Screenshots/ # Switch workspaces with mainMod + [0-9] bind = $mainMod, 1, workspace, 1 diff --git a/platforms/linux/kde/kglobalshortcutsrc b/platforms/linux/kde/kglobalshortcutsrc index e80a834..a74c408 100644 --- a/platforms/linux/kde/kglobalshortcutsrc +++ b/platforms/linux/kde/kglobalshortcutsrc @@ -41,7 +41,7 @@ mute=Volume Mute,Volume Mute,静音 [krusader] _k_friendly_name=Krusader -bring_main_window_to_top=Meta+K,Meta+K,Bring Main Window to Top +bring_main_window_to_top=none,Meta+K,Bring Main Window to Top [ksmserver] Halt Without Confirmation=none,,关机 (无需确认) @@ -172,14 +172,14 @@ Window Custom Quick Tile Bottom=none,,自定义快速铺放窗口到下方 Window Custom Quick Tile Left=none,,自定义快速铺放窗口到左侧 Window Custom Quick Tile Right=none,,自定义快速铺放窗口到右侧 Window Custom Quick Tile Top=none,,自定义快速铺放窗口到上方 -Window Fullscreen=none,,全屏显示窗口 +Window Fullscreen=Meta+F11,,全屏显示窗口 Window Grow Horizontal=none,,水平扩展窗口 Window Grow Vertical=none,,垂直扩展窗口 Window Lower=none,,降低窗口 Window Maximize=Meta+PgUp,Meta+PgUp,最大化窗口 Window Maximize Horizontal=none,,水平最大化窗口 Window Maximize Vertical=none,,垂直最大化窗口 -Window Minimize=Meta+PgDown,Meta+PgDown,最小化窗口 +Window Minimize=Meta+PgDown\tMeta+M,Meta+PgDown,最小化窗口 Window Move=none,,移动窗口 Window Move Center=none,,移动窗口到中央 Window No Border=none,,显示/隐藏窗口标题栏和框架 @@ -229,7 +229,7 @@ Window to Desktop 5=Meta+%,,窗口移动到桌面 5 Window to Desktop 6=Meta+^,,窗口移动到桌面 6 Window to Desktop 7=Meta+&,,窗口移动到桌面 7 Window to Desktop 8=Meta+*,,窗口移动到桌面 8 -Window to Desktop 9=none,,窗口移动到桌面 9 +Window to Desktop 9=Meta+(,,窗口移动到桌面 9 Window to Next Desktop=none,,窗口移动到下一桌面 Window to Next Screen=Meta+Shift+Right,Meta+Shift+Right,移动窗口到下一屏幕 Window to Previous Desktop=none,,窗口移动到上一桌面 @@ -288,6 +288,8 @@ activate task manager entry 6=none,Meta+6,激活任务管理器条目 6 activate task manager entry 7=none,Meta+7,激活任务管理器条目 7 activate task manager entry 8=none,Meta+8,激活任务管理器条目 8 activate task manager entry 9=none,Meta+9,激活任务管理器条目 9 +activate widget 115=none,none,激活 应用程序启动器 挂件 +activate widget 120=none,none,激活 数字时钟 挂件 activate widget 3=none,none,Activate Application Launcher Widget clear-history=none,,清除剪贴板历史(L) clipboard_action=Meta+Ctrl+X,Meta+Ctrl+X,自动弹出操作菜单 @@ -316,7 +318,7 @@ _launch=Meta+F _launch=none [services][org.kde.krunner.desktop] -_launch=Alt+F2\tSearch\tAlt+Space +_launch=Alt+F2\tMeta+K\tSearch\tAlt+Space [services][org.kde.kscreen.desktop] ShowOSD=Display diff --git a/platforms/linux/neovide.toml b/platforms/linux/neovide.toml new file mode 100644 index 0000000..93cf59c --- /dev/null +++ b/platforms/linux/neovide.toml @@ -0,0 +1,26 @@ +# $XDG_CONFIG_HOME/neovide/config.toml +# ln -sf $DOTFILES/mac/neovide.toml $XDG_CONFIG_HOME/neovide/config.toml +# New-Item -ItemType SymbolicLink -Path $Env:XDG_CONFIG_HOME/neovide/config.toml -Value $DOTFILES\mac\neovide.toml (Mac) +# https://neovide.dev/config-file.html?highlight=toml#config-file +# 设置为 fork 默认后台运行,不会占用终端 +fork = true +# frame = "full" +idle = true +maximized = false +# neovim-bin = "/opt/homebrew/bin/nvim" +frame = "transparent" +no-multigrid = false +srgb = false +tabs = true +theme = "auto" +title-hidden = true +vsync = true +wsl = false + +[font] +normal = [ + "Maple Mono NF CN", + "Iosevka Nerd Font", + "霞鹜文楷等宽", +] # Will use the bundled Fira Code Nerd Font by default +size = 14.0 diff --git a/platforms/linux/user-dirs.dirs b/platforms/linux/user-dirs.dirs index fd18e7b..ae7f277 100644 --- a/platforms/linux/user-dirs.dirs +++ b/platforms/linux/user-dirs.dirs @@ -1,5 +1,10 @@ -# Force to use English for directory names - +# This file is written by xdg-user-dirs-update +# If you want to change or add directories, just edit the line you're +# interested in. All local changes will be retained on the next run. +# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped +# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an +# absolute path. No other format is supported. +# XDG_DESKTOP_DIR="$HOME/Desktop" XDG_DOWNLOAD_DIR="$HOME/Downloads" XDG_TEMPLATES_DIR="$HOME/Templates" diff --git a/platforms/linux/user-dirs.locale b/platforms/linux/user-dirs.locale new file mode 100644 index 0000000..2c28678 --- /dev/null +++ b/platforms/linux/user-dirs.locale @@ -0,0 +1 @@ +zh_CN \ No newline at end of file