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"
${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)
}

View file

@ -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"]

View file

@ -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")

View file

@ -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

View file

@ -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,

View file

@ -1,7 +1,7 @@
;;; 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))

View file

@ -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)

View file

@ -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)