minor fix

This commit is contained in:
js0ny 2025-03-18 09:08:16 +00:00
parent 520561edb3
commit c3fa0c4b5c
8 changed files with 95 additions and 80 deletions

View file

@ -54,7 +54,6 @@ $Env:VISUAL = "code --wait"
$Env:FILE_MANAGER = "dopus.exe" $Env:FILE_MANAGER = "dopus.exe"
${function:wsl2} = { wsl.exe --distribution kali-linux $args }
${function:wini} = { winget install $args } ${function:wini} = { winget install $args }
${function:winr} = { winget uninstall $args } ${function:winr} = { winget uninstall $args }
${function:wins} = { winget search $args } ${function:wins} = { winget search $args }
@ -72,3 +71,17 @@ if (Get-Command "sfsu.exe" -ErrorAction SilentlyContinue) {
# Elevate in current shell # Elevate in current shell
# Set Windows Sudo to `inlined` sudo # Set Windows Sudo to `inlined` sudo
${function:su} = { sudo.exe pwsh } ${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)
}

View file

@ -217,7 +217,7 @@ keybindings:
# Change tiling direction. This determines where new tiling windows will # Change tiling direction. This determines where new tiling windows will
# be inserted. # be inserted.
- commands: ["toggle-tiling-direction"] - commands: ["toggle-tiling-direction"]
bindings: ["lwin+v"] bindings: ["lwin+x"]
# Change focus from tiling windows -> floating -> fullscreen. # Change focus from tiling windows -> floating -> fullscreen.
# - commands: ["wm-cycle-focus"] # - commands: ["wm-cycle-focus"]

View file

@ -6,67 +6,67 @@ Komorebic(cmd) {
RunWait(format("komorebic.exe {}", cmd), , "Hide") RunWait(format("komorebic.exe {}", cmd), , "Hide")
} }
!q:: Komorebic("close") #q:: Komorebic("close")
!m:: Komorebic("minimize") #m:: Komorebic("minimize")
; Focus windows ; Focus windows
#+h:: Komorebic("focus left") #h:: Komorebic("focus left")
#+n:: Komorebic("focus down") #n:: Komorebic("focus down")
#+e:: Komorebic("focus up") #e:: Komorebic("focus up")
#+i:: Komorebic("focus right") #i:: Komorebic("focus right")
!+[:: Komorebic("cycle-focus previous") #+[:: Komorebic("cycle-focus previous")
!+]:: Komorebic("cycle-focus next") #+]:: Komorebic("cycle-focus next")
; Move windows ; Move windows
!+h:: Komorebic("move left") #+h:: Komorebic("move left")
!+j:: Komorebic("move down") #+n:: Komorebic("move down")
!+k:: Komorebic("move up") #+e:: Komorebic("move up")
!+l:: Komorebic("move right") #+i:: Komorebic("move right")
; Stack windows ; Stack windows
!Left:: Komorebic("stack left") #Left:: Komorebic("stack left")
!Down:: Komorebic("stack down") #Down:: Komorebic("stack down")
!Up:: Komorebic("stack up") #Up:: Komorebic("stack up")
!Right:: Komorebic("stack right") #Right:: Komorebic("stack right")
!;:: Komorebic("unstack") #;:: Komorebic("unstack")
![:: Komorebic("cycle-stack previous") #[:: Komorebic("cycle-stack previous")
!]:: Komorebic("cycle-stack next") #]:: Komorebic("cycle-stack next")
; Resize ; Resize
!=:: Komorebic("resize-axis horizontal increase") #=:: Komorebic("resize-axis horizontal increase")
!-:: Komorebic("resize-axis horizontal decrease") #-:: Komorebic("resize-axis horizontal decrease")
!+=:: Komorebic("resize-axis vertical increase") #+=:: Komorebic("resize-axis vertical increase")
!+_:: Komorebic("resize-axis vertical decrease") #+_:: Komorebic("resize-axis vertical decrease")
; Manipulate windows ; Manipulate windows
!t:: Komorebic("toggle-float") #t:: Komorebic("toggle-float")
!f:: Komorebic("toggle-monocle") #f:: Komorebic("toggle-monocle")
; Window manager options ; Window manager options
!+r:: Komorebic("retile") #+r:: Komorebic("retile")
!p:: Komorebic("toggle-pause") #p:: Komorebic("toggle-pause")
; Layouts ; Layouts
!x:: Komorebic("flip-layout horizontal") #x:: Komorebic("flip-layout horizontal")
!y:: Komorebic("flip-layout vertical") #y:: Komorebic("flip-layout vertical")
; Workspaces ; Workspaces
!1:: Komorebic("focus-workspace 0") #1:: Komorebic("focus-workspace 0")
!2:: Komorebic("focus-workspace 1") #2:: Komorebic("focus-workspace 1")
!3:: Komorebic("focus-workspace 2") #3:: Komorebic("focus-workspace 2")
!4:: Komorebic("focus-workspace 3") #4:: Komorebic("focus-workspace 3")
!5:: Komorebic("focus-workspace 4") #5:: Komorebic("focus-workspace 4")
!6:: Komorebic("focus-workspace 5") #6:: Komorebic("focus-workspace 5")
!7:: Komorebic("focus-workspace 6") #7:: Komorebic("focus-workspace 6")
!8:: Komorebic("focus-workspace 7") #8:: Komorebic("focus-workspace 7")
; Move windows across workspaces ; Move windows across workspaces
!+1:: Komorebic("move-to-workspace 0") #+1:: Komorebic("move-to-workspace 0")
!+2:: Komorebic("move-to-workspace 1") #+2:: Komorebic("move-to-workspace 1")
!+3:: Komorebic("move-to-workspace 2") #+3:: Komorebic("move-to-workspace 2")
!+4:: Komorebic("move-to-workspace 3") #+4:: Komorebic("move-to-workspace 3")
!+5:: Komorebic("move-to-workspace 4") #+5:: Komorebic("move-to-workspace 4")
!+6:: Komorebic("move-to-workspace 5") #+6:: Komorebic("move-to-workspace 5")
!+7:: Komorebic("move-to-workspace 6") #+7:: Komorebic("move-to-workspace 6")
!+8:: Komorebic("move-to-workspace 7") #+8:: Komorebic("move-to-workspace 7")

View file

@ -1,14 +1,6 @@
{ {
"$schema": "https://raw.githubusercontent.com/LGUG2Z/komorebi/v0.1.30/schema.bar.json", "$schema": "https://raw.githubusercontent.com/LGUG2Z/komorebi/v0.1.34/schema.bar.json",
"monitor": { "monitor": 0,
"index": 0,
"work_area_offset": {
"left": 0,
"top": 40,
"right": 0,
"bottom": 40
}
},
"font_family": "JetBrains Mono", "font_family": "JetBrains Mono",
"theme": { "theme": {
"palette": "Base16", "palette": "Base16",
@ -33,6 +25,11 @@
} }
], ],
"right_widgets": [ "right_widgets": [
{
"Update": {
"enable": true
}
},
{ {
"Media": { "Media": {
"enable": true "enable": true
@ -73,4 +70,4 @@
} }
} }
] ]
} }

View file

@ -1,6 +1,6 @@
{ {
"$schema": "https://raw.githubusercontent.com/LGUG2Z/komorebi/v0.1.30/schema.json", "$schema": "https://raw.githubusercontent.com/LGUG2Z/komorebi/v0.1.34/schema.json",
"app_specific_configuration_path": "$Env:USERPROFILE/applications.json", "app_specific_configuration_path": "$Env:KOMOREBI_CONFIG_HOME/applications.json",
"window_hiding_behaviour": "Cloak", "window_hiding_behaviour": "Cloak",
"cross_monitor_move_behaviour": "Insert", "cross_monitor_move_behaviour": "Insert",
"default_workspace_padding": 20, "default_workspace_padding": 20,

View file

@ -1,11 +1,11 @@
;;; init-appearance.el ;;; init-appearance.el
(when (display-graphic-p) (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 ;; Set CJK Display Font
(dolist (charset '(kana han cjk-misc bopomofo)) (dolist (charset '(kana han cjk-misc bopomofo))
(set-fontset-font t charset (font-spec :family "Sarasa Mono SC"))) (set-fontset-font t charset (font-spec :family "Sarasa Mono SC")))
;; Icon Support ;; Icon Support
;; Once installed, Manually install the fonts required: ;; Once installed, Manually install the fonts required:

View file

@ -79,6 +79,8 @@
(lambda (orig-fn &rest args) (lambda (orig-fn &rest args)
(let ((inhibit-field-text-motion t)) ;; 禁止字段自动换行 (let ((inhibit-field-text-motion t)) ;; 禁止字段自动换行
(apply orig-fn args)))) (apply orig-fn args))))
(yas-reload-all)) (setq yas-snippet-dirs '("~/.dotfiles/tools/doom/snippets/"))
(yas-reload-all)
)
(provide 'init-edit) (provide 'init-edit)

View file

@ -7,25 +7,27 @@
(use-package org (use-package org
:straight (:type built-in) ;; Tell straight to not install org :straight (:type built-in) ;; Tell straight to not install org
:config :custom
(setq org-log-done 'time) (org-log-done 'time)
(setq org-startup-indented nil) (org-startup-indented nil)
;; Use inline image ;; Use inline image
(setq org-startup-with-inline-images t) (org-startup-with-inline-images t)
(setq org-display-remote-inline-images 'cache) ; 预览网络图片 (org-display-remote-inline-images 'cache) ; 预览网络图片
;; Use LaTeX rendering ;; Use LaTeX rendering
(setq org-startup-with-latex-preview nil) (org-startup-with-latex-preview nil)
(setq org-image-actual-width 600) (org-image-actual-width 600)
;; Conceal on markup markers ;; Conceal on markup markers
(setq org-hide-emphasis-markers t) (org-hide-emphasis-markers t)
(setq org-directory "~/OrgFiles/") (org-directory "~/OrgFiles/")
(setq org-agenda-files (list (concat org-directory "tasks/"))) (org-agenda-files (list (concat org-directory "tasks/")))
(setq org-persist-directory (expand-file-name "org-persist" user-emacs-data)) (org-persist-directory (expand-file-name "org-persist" user-emacs-data))
(setq org-pretty-entities t) (org-pretty-entities t)
(setq org-src-fontify-natively t) (org-src-fontify-natively t)
(setq org-src-tab-acts-natively t) ; Use TAB to indent inside source block (org-src-tab-acts-natively t) ; Use TAB to indent inside source block
(setq org-src-preserve-indentation t) ; Prevent from auto-indent (org-src-preserve-indentation t) ; Prevent from auto-indent
(org-startup-folded 'showall)
:config
(with-eval-after-load 'org (with-eval-after-load 'org
(define-key org-mode-map (kbd "C-j") 'org-return-indent) (define-key org-mode-map (kbd "C-j") 'org-return-indent)
(evil-define-key 'normal org-mode-map (kbd "TAB") 'org-cycle)) (evil-define-key 'normal org-mode-map (kbd "TAB") 'org-cycle))
@ -75,7 +77,7 @@
:after org :after org
:config :config
;; Hardcoding the image dir ;; 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 (setq org-download-heading-lvl nil ; don't use heading when creating files
org-download-timestamp "%Y%m%d-%H%M%S" org-download-timestamp "%Y%m%d-%H%M%S"
@ -265,3 +267,4 @@
(provide 'init-org) (provide 'init-org)