diff --git a/platforms/win/Microsoft.PowerShell_profile.ps1 b/platforms/win/Microsoft.PowerShell_profile.ps1 index aadabcc..e3f0062 100644 --- a/platforms/win/Microsoft.PowerShell_profile.ps1 +++ b/platforms/win/Microsoft.PowerShell_profile.ps1 @@ -54,7 +54,6 @@ $Env:VISUAL = "code --wait" $Env:FILE_MANAGER = "dopus.exe" -${function:wsl2} = { wsl.exe --distribution kali-linux $args } ${function:wini} = { winget install $args } ${function:winr} = { winget uninstall $args } ${function:wins} = { winget search $args } @@ -72,3 +71,17 @@ if (Get-Command "sfsu.exe" -ErrorAction SilentlyContinue) { # Elevate in current shell # Set Windows Sudo to `inlined` sudo ${function:su} = { sudo.exe pwsh } + +function Show-WindowsNotification { + param ( + [string]$Title, + [Parameter(ValueFromPipeline=$true)] + [string]$Message + ) + + Add-Type -AssemblyName System.Windows.Forms + $notifyIcon = New-Object System.Windows.Forms.NotifyIcon + $notifyIcon.Icon = [System.Drawing.Icon]::ExtractAssociatedIcon((Get-Command pwsh).Source) + $notifyIcon.Visible = $true + $notifyIcon.ShowBalloonTip(0,$Title,$Message,[System.Windows.Forms.ToolTipIcon]::Info) +} \ No newline at end of file diff --git a/platforms/win/glzr/glazewm/config.yaml b/platforms/win/glzr/glazewm/config.yaml index 4733e59..fa5909c 100644 --- a/platforms/win/glzr/glazewm/config.yaml +++ b/platforms/win/glzr/glazewm/config.yaml @@ -217,7 +217,7 @@ keybindings: # Change tiling direction. This determines where new tiling windows will # be inserted. - commands: ["toggle-tiling-direction"] - bindings: ["lwin+v"] + bindings: ["lwin+x"] # Change focus from tiling windows -> floating -> fullscreen. # - commands: ["wm-cycle-focus"] diff --git a/platforms/win/komorebi/komorebi.ahk b/platforms/win/komorebi/komorebi.ahk index 8bc1263..ae4ef83 100644 --- a/platforms/win/komorebi/komorebi.ahk +++ b/platforms/win/komorebi/komorebi.ahk @@ -6,67 +6,67 @@ Komorebic(cmd) { RunWait(format("komorebic.exe {}", cmd), , "Hide") } -!q:: Komorebic("close") -!m:: Komorebic("minimize") +#q:: Komorebic("close") +#m:: Komorebic("minimize") ; Focus windows -#+h:: Komorebic("focus left") -#+n:: Komorebic("focus down") -#+e:: Komorebic("focus up") -#+i:: Komorebic("focus right") +#h:: Komorebic("focus left") +#n:: Komorebic("focus down") +#e:: Komorebic("focus up") +#i:: Komorebic("focus right") -!+[:: Komorebic("cycle-focus previous") -!+]:: Komorebic("cycle-focus next") +#+[:: Komorebic("cycle-focus previous") +#+]:: Komorebic("cycle-focus next") ; Move windows -!+h:: Komorebic("move left") -!+j:: Komorebic("move down") -!+k:: Komorebic("move up") -!+l:: Komorebic("move right") +#+h:: Komorebic("move left") +#+n:: Komorebic("move down") +#+e:: Komorebic("move up") +#+i:: Komorebic("move right") ; Stack windows -!Left:: Komorebic("stack left") -!Down:: Komorebic("stack down") -!Up:: Komorebic("stack up") -!Right:: Komorebic("stack right") -!;:: Komorebic("unstack") -![:: Komorebic("cycle-stack previous") -!]:: Komorebic("cycle-stack next") +#Left:: Komorebic("stack left") +#Down:: Komorebic("stack down") +#Up:: Komorebic("stack up") +#Right:: Komorebic("stack right") +#;:: Komorebic("unstack") +#[:: Komorebic("cycle-stack previous") +#]:: Komorebic("cycle-stack next") ; Resize -!=:: Komorebic("resize-axis horizontal increase") -!-:: Komorebic("resize-axis horizontal decrease") -!+=:: Komorebic("resize-axis vertical increase") -!+_:: Komorebic("resize-axis vertical decrease") +#=:: Komorebic("resize-axis horizontal increase") +#-:: Komorebic("resize-axis horizontal decrease") +#+=:: Komorebic("resize-axis vertical increase") +#+_:: Komorebic("resize-axis vertical decrease") ; Manipulate windows -!t:: Komorebic("toggle-float") -!f:: Komorebic("toggle-monocle") +#t:: Komorebic("toggle-float") +#f:: Komorebic("toggle-monocle") ; Window manager options -!+r:: Komorebic("retile") -!p:: Komorebic("toggle-pause") +#+r:: Komorebic("retile") +#p:: Komorebic("toggle-pause") ; Layouts -!x:: Komorebic("flip-layout horizontal") -!y:: Komorebic("flip-layout vertical") +#x:: Komorebic("flip-layout horizontal") +#y:: Komorebic("flip-layout vertical") ; Workspaces -!1:: Komorebic("focus-workspace 0") -!2:: Komorebic("focus-workspace 1") -!3:: Komorebic("focus-workspace 2") -!4:: Komorebic("focus-workspace 3") -!5:: Komorebic("focus-workspace 4") -!6:: Komorebic("focus-workspace 5") -!7:: Komorebic("focus-workspace 6") -!8:: Komorebic("focus-workspace 7") +#1:: Komorebic("focus-workspace 0") +#2:: Komorebic("focus-workspace 1") +#3:: Komorebic("focus-workspace 2") +#4:: Komorebic("focus-workspace 3") +#5:: Komorebic("focus-workspace 4") +#6:: Komorebic("focus-workspace 5") +#7:: Komorebic("focus-workspace 6") +#8:: Komorebic("focus-workspace 7") ; Move windows across workspaces -!+1:: Komorebic("move-to-workspace 0") -!+2:: Komorebic("move-to-workspace 1") -!+3:: Komorebic("move-to-workspace 2") -!+4:: Komorebic("move-to-workspace 3") -!+5:: Komorebic("move-to-workspace 4") -!+6:: Komorebic("move-to-workspace 5") -!+7:: Komorebic("move-to-workspace 6") -!+8:: Komorebic("move-to-workspace 7") +#+1:: Komorebic("move-to-workspace 0") +#+2:: Komorebic("move-to-workspace 1") +#+3:: Komorebic("move-to-workspace 2") +#+4:: Komorebic("move-to-workspace 3") +#+5:: Komorebic("move-to-workspace 4") +#+6:: Komorebic("move-to-workspace 5") +#+7:: Komorebic("move-to-workspace 6") +#+8:: Komorebic("move-to-workspace 7") \ No newline at end of file diff --git a/platforms/win/komorebi/komorebi.bar.json b/platforms/win/komorebi/komorebi.bar.json index 39a1147..8917bec 100644 --- a/platforms/win/komorebi/komorebi.bar.json +++ b/platforms/win/komorebi/komorebi.bar.json @@ -1,14 +1,6 @@ { - "$schema": "https://raw.githubusercontent.com/LGUG2Z/komorebi/v0.1.30/schema.bar.json", - "monitor": { - "index": 0, - "work_area_offset": { - "left": 0, - "top": 40, - "right": 0, - "bottom": 40 - } - }, + "$schema": "https://raw.githubusercontent.com/LGUG2Z/komorebi/v0.1.34/schema.bar.json", + "monitor": 0, "font_family": "JetBrains Mono", "theme": { "palette": "Base16", @@ -33,6 +25,11 @@ } ], "right_widgets": [ + { + "Update": { + "enable": true + } + }, { "Media": { "enable": true @@ -73,4 +70,4 @@ } } ] -} \ No newline at end of file +} diff --git a/platforms/win/komorebi/komorebi.json b/platforms/win/komorebi/komorebi.json index ec8ec47..9800d61 100644 --- a/platforms/win/komorebi/komorebi.json +++ b/platforms/win/komorebi/komorebi.json @@ -1,6 +1,6 @@ { - "$schema": "https://raw.githubusercontent.com/LGUG2Z/komorebi/v0.1.30/schema.json", - "app_specific_configuration_path": "$Env:USERPROFILE/applications.json", + "$schema": "https://raw.githubusercontent.com/LGUG2Z/komorebi/v0.1.34/schema.json", + "app_specific_configuration_path": "$Env:KOMOREBI_CONFIG_HOME/applications.json", "window_hiding_behaviour": "Cloak", "cross_monitor_move_behaviour": "Insert", "default_workspace_padding": 20, diff --git a/tools/emacs.d/lisp/init-appearance.el b/tools/emacs.d/lisp/init-appearance.el index 21aeeca..4216ff4 100644 --- a/tools/emacs.d/lisp/init-appearance.el +++ b/tools/emacs.d/lisp/init-appearance.el @@ -1,11 +1,11 @@ ;;; init-appearance.el (when (display-graphic-p) - (add-to-list 'default-frame-alist '(font . "Sarasa Mono SC"))) + (add-to-list 'default-frame-alist '(font . "Sarasa Mono SC Nerd Font"))) ;; Set CJK Display Font -(dolist (charset '(kana han cjk-misc bopomofo)) - (set-fontset-font t charset (font-spec :family "Sarasa Mono SC"))) +(dolist (charset '(kana han cjk-misc bopomofo)) + (set-fontset-font t charset (font-spec :family "Sarasa Mono SC"))) ;; Icon Support ;; Once installed, Manually install the fonts required: diff --git a/tools/emacs.d/lisp/init-edit.el b/tools/emacs.d/lisp/init-edit.el index af4539d..cf415a9 100644 --- a/tools/emacs.d/lisp/init-edit.el +++ b/tools/emacs.d/lisp/init-edit.el @@ -79,6 +79,8 @@ (lambda (orig-fn &rest args) (let ((inhibit-field-text-motion t)) ;; 禁止字段自动换行 (apply orig-fn args)))) - (yas-reload-all)) + (setq yas-snippet-dirs '("~/.dotfiles/tools/doom/snippets/")) + (yas-reload-all) + ) (provide 'init-edit) diff --git a/tools/emacs.d/lisp/init-org.el b/tools/emacs.d/lisp/init-org.el index 8e5610c..40d5ec7 100644 --- a/tools/emacs.d/lisp/init-org.el +++ b/tools/emacs.d/lisp/init-org.el @@ -7,25 +7,27 @@ (use-package org :straight (:type built-in) ;; Tell straight to not install org - :config - (setq org-log-done 'time) - (setq org-startup-indented nil) + :custom + (org-log-done 'time) + (org-startup-indented nil) ;; Use inline image - (setq org-startup-with-inline-images t) - (setq org-display-remote-inline-images 'cache) ; 预览网络图片 + (org-startup-with-inline-images t) + (org-display-remote-inline-images 'cache) ; 预览网络图片 ;; Use LaTeX rendering - (setq org-startup-with-latex-preview nil) - (setq org-image-actual-width 600) + (org-startup-with-latex-preview nil) + (org-image-actual-width 600) ;; Conceal on markup markers - (setq org-hide-emphasis-markers t) - (setq org-directory "~/OrgFiles/") - (setq org-agenda-files (list (concat org-directory "tasks/"))) - (setq org-persist-directory (expand-file-name "org-persist" user-emacs-data)) - (setq org-pretty-entities t) - (setq org-src-fontify-natively t) - (setq org-src-tab-acts-natively t) ; Use TAB to indent inside source block - (setq org-src-preserve-indentation t) ; Prevent from auto-indent + (org-hide-emphasis-markers t) + (org-directory "~/OrgFiles/") + (org-agenda-files (list (concat org-directory "tasks/"))) + (org-persist-directory (expand-file-name "org-persist" user-emacs-data)) + (org-pretty-entities t) + (org-src-fontify-natively t) + (org-src-tab-acts-natively t) ; Use TAB to indent inside source block + (org-src-preserve-indentation t) ; Prevent from auto-indent + (org-startup-folded 'showall) + :config (with-eval-after-load 'org (define-key org-mode-map (kbd "C-j") 'org-return-indent) (evil-define-key 'normal org-mode-map (kbd "TAB") 'org-cycle)) @@ -75,7 +77,7 @@ :after org :config ;; Hardcoding the image dir - (setq-default org-download-image-dir "~/OrgFiles/Attachments") + (setq-default org-download-image-dir (expand-file-name ".attach" org-directory)) (setq org-download-heading-lvl nil ; don't use heading when creating files org-download-timestamp "%Y%m%d-%H%M%S" @@ -265,3 +267,4 @@ (provide 'init-org) +