From f1186d84f75ed96af268ac16a4a79edb163a8ce5 Mon Sep 17 00:00:00 2001 From: js0ny Date: Fri, 11 Apr 2025 19:35:39 +0000 Subject: [PATCH] minor fixes --- .just.d/tools.just | 9 ++++++ platforms/win/ahk/spcl.ahk | 4 +-- platforms/win/glzr/glazewm/config.yaml | 35 +++++++++++++++++------ tools/emacs.d/lisp/init-org.el | 1 + tools/nvim/lua/plugins/mod/image-nvim.lua | 3 ++ 5 files changed, 42 insertions(+), 10 deletions(-) diff --git a/.just.d/tools.just b/.just.d/tools.just index 7f17c9b..1f26ec6 100644 --- a/.just.d/tools.just +++ b/.just.d/tools.just @@ -53,3 +53,12 @@ zsh: test -d {{XDG_CONFIG_HOME}}/zsh/plugins/zsh-syntax-highlighting || git clone --depth 1 https://github.com/zsh-users/zsh-syntax-highlighting.git {{XDG_CONFIG_HOME}}/zsh/plugins/zsh-syntax-highlighting test -d {{XDG_CONFIG_HOME}}/zsh/plugins/zsh-history-substring-search || git clone --depth 1 https://github.com/zsh-users/zsh-history-substring-search.git {{XDG_CONFIG_HOME}}/zsh/plugins/zsh-history-substring-search test -d {{XDG_CONFIG_HOME}}/zsh/plugins/zsh-completions || git clone --depth 1 https://github.com/zsh-users/zsh-completions.git {{XDG_CONFIG_HOME}}/zsh/plugins/zsh-completions + +[linux] +install_emacs: + git clone --depth 1 https://github.com/emacs-mirror/emacs.git --branch feature/igc $HOME/.local/build/emacs-igc-build + cd $HOME/.local/build/emacs-igc-build + ./autogen.sh + ./configure --with-mailutils --with-native-compilation --with-pgtk --with-tree-sitter --with-imagemagick + make -j$(nproc) + sudo make install diff --git a/platforms/win/ahk/spcl.ahk b/platforms/win/ahk/spcl.ahk index 4c041a4..602e2ab 100644 --- a/platforms/win/ahk/spcl.ahk +++ b/platforms/win/ahk/spcl.ahk @@ -11,8 +11,8 @@ e::Up i::Right k::Home o::End -[::PgUp -]::PgDn +u::PgUp +m::PgDn 1::F1 2::F2 3::F3 diff --git a/platforms/win/glzr/glazewm/config.yaml b/platforms/win/glzr/glazewm/config.yaml index 0e5eb84..fe6da8f 100644 --- a/platforms/win/glzr/glazewm/config.yaml +++ b/platforms/win/glzr/glazewm/config.yaml @@ -139,16 +139,24 @@ window_rules: - window_title: { regex: "[Pp]icture.in.[Pp]icture" } window_class: { regex: "Chrome_WidgetWin_1|MozillaDialogClass" } - # Ignore rules for various 3rd-party apps. + # Notion Desktop Popup + - window_process: { equals: "Notion" } + window_class: { regex: "Chrome_WidgetWin_1" } + + # PowerToys Tools - window_process: { equals: "PowerToys" } window_class: { regex: 'HwndWrapper\[PowerToys\.PowerAccent.*?\]' } - window_process: { equals: "PowerToys" } window_title: { regex: ".*? - Peek" } - - window_process: { equals: "Lively" } - window_class: { regex: "HwndWrapper" } - # Ignore Quake-style consoles. + # PowerToys Command Palette + - window_title: { equals: "Command Palette" } + window_class: { equals: "WinUIDesktopWin32WindowClass" } + # Quake-style consoles. - window_process: { equals: "WindowsTerminal" } window_class: { equals: "CASCADIA_HOSTING_WINDOW_CLASS" } + # Misc + - window_process: { equals: "Lively" } + window_class: { regex: "HwndWrapper" } - commands: ["set-floating"] match: # Razer Synapse @@ -157,6 +165,8 @@ window_rules: - window_process: { equals: "AutoHotkeyUX" } - window_process: { equals: "ApplicationFrameHost" } window_title: { regex: "Settings|设置" } + ## Messenger Picture Preview + # QQ 图片预览 - window_process: { equals: "QQ" } window_title: { equals: "图片查看器" } # 微信图片视图 @@ -175,7 +185,14 @@ window_rules: - window_process: { equals: "vivaldi" } window_title: { regex: "^Vivaldi 设置.*$" } - window_process: { equals: "vivaldi" } - window_title: { regex: "^Bitwarden - Vivaldi$" } + window_title: { regex: "^Bitwarden.*$" } + ## KDE Apps on Windows, Configure & Keymap Popup + - window_class: { regex: "^Qt681QWindow(Icon)?$" } + window_title: { regex: "^Configure.*$" } + - window_process: { equals: "haruna" } + window_title: { regex: "^Settings.*$" } + - window_process: { equals: "steamwebhelper" } + window_title: { equals: "好友列表" } binding_modes: # When enabled, the focused window can be resized via arrow keys or HJKL. - name: "resize" @@ -245,7 +262,7 @@ keybindings: # Change the focused window to be floating. - commands: ["toggle-floating --centered"] - bindings: ["lwin+shift+space"] + bindings: ["lwin+shift+f"] # Change the focused window to be tiling. - commands: ["toggle-tiling"] @@ -253,7 +270,7 @@ keybindings: # Change the focused window to be fullscreen. - commands: ["toggle-fullscreen"] - bindings: ["lwin+shift+f"] + bindings: ["lwin+ctrl+f"] - commands: ["shell-exec dopus.exe"] bindings: ["lwin+f"] @@ -275,13 +292,15 @@ keybindings: # Redraw all windows. - commands: ["wm-redraw"] - bindings: ["alt+shift+w"] + bindings: ["lwin+shift+w"] # Launch CMD terminal. Alternatively, use `shell-exec wt` or # `shell-exec %ProgramFiles%/Git/git-bash.exe` to start Windows # Terminal and Git Bash respectively. - commands: ["shell-exec wezterm-gui.exe start"] bindings: ["lwin+r"] + - commands: ["shell-exec sharex -RectangleRegion"] + bindings: ["lwin+c"] # Focus the next/previous active workspace defined in `workspaces` config. # - commands: ["focus --next-active-workspace"] diff --git a/tools/emacs.d/lisp/init-org.el b/tools/emacs.d/lisp/init-org.el index 2259899..198ed94 100644 --- a/tools/emacs.d/lisp/init-org.el +++ b/tools/emacs.d/lisp/init-org.el @@ -249,5 +249,6 @@ (org-get-heading t t t t) effort)))))) +(setq diary-file "~/.local/js0ny/diary") (provide 'init-org) diff --git a/tools/nvim/lua/plugins/mod/image-nvim.lua b/tools/nvim/lua/plugins/mod/image-nvim.lua index b7255dc..3926778 100644 --- a/tools/nvim/lua/plugins/mod/image-nvim.lua +++ b/tools/nvim/lua/plugins/mod/image-nvim.lua @@ -2,10 +2,13 @@ -- If current session is not spawn by neovide, do not load image.nvim -- neovide did not support image viewer yet -- https://github.com/neovide/neovide/issues/2088 +-- Disable on: Neovide, alacritty and windows if vim.g.neovide then return {} elseif vim.env.TERM_PROGRAM == "alacritty" then return {} +elseif vim.loop.os_uname().sysname:lower() == "windows_nt" then + return {} else return { "3rd/image.nvim",