mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 08:43:00 +00:00
sync: from Windows
This commit is contained in:
parent
16d9d1348b
commit
fd3ecfd674
15 changed files with 2581 additions and 29 deletions
|
|
@ -7,7 +7,7 @@ Get-ChildItem -Path $DOTFILES\powershell_private -Filter *.ps1 | ForEach-Object
|
|||
|
||||
# Shell Equivalents #
|
||||
Set-Alias "grep" "Select-String"
|
||||
${function:which} = { (Get-Command $args[0]).Path }
|
||||
${function:which} = { (Get-Command $args[0]) }
|
||||
|
||||
# Shell Configurations #
|
||||
${function:shcfg} = { code $PROFILE }
|
||||
|
|
@ -15,12 +15,6 @@ ${function:reload} = { & $PROFILE }
|
|||
${function:pulldots} = { Set-Location -Path $DOTFILES && git pull }
|
||||
Set-Alias "pwshcfg" "shcfg"
|
||||
|
||||
# C & C++ #
|
||||
# Set-Alias "cl" "clang"
|
||||
# Set-Alias "clpp" "clang++"
|
||||
# ${function:clang} = { clang -std=c99 $args[0] }
|
||||
# ${function:clang++} = { clang -std=c++2b $args[0] }
|
||||
|
||||
# WSL #
|
||||
${function:wsl1} = {wsl.exe --distribution Arch}
|
||||
${function:wsl2} = {wsl.exe --distribution Ubuntu-22.04}
|
||||
|
|
@ -51,19 +45,7 @@ function Get-AppPackageListLocal {
|
|||
}
|
||||
|
||||
# Toggle Theme #
|
||||
function Set-SystemTheme {
|
||||
$regPath = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize"
|
||||
$currentMode = Get-ItemProperty -Path $regPath -Name "AppsUseLightTheme"
|
||||
if ($currentMode.AppsUseLightTheme -eq 1) {
|
||||
Set-ItemProperty -Path $regPath -Name "AppsUseLightTheme" -Value 0
|
||||
Write-Host "已切换到深色模式"
|
||||
}
|
||||
else {
|
||||
Set-ItemProperty -Path $regPath -Name "AppsUseLightTheme" -Value 1
|
||||
Write-Host "已切换到浅色模式"
|
||||
}
|
||||
}
|
||||
Set-Alias "dark-mode" "Set-SystemTheme" # Consistent with macOS (`dark-mode`)
|
||||
Set-Alias "dark-mode" "$DOTFILES/win/cmd/dark-mode.bat" # Consistent with macOS (`dark-mode`)
|
||||
|
||||
# Miscs #
|
||||
|
||||
|
|
|
|||
32
win/ahk/main.ahk
Normal file
32
win/ahk/main.ahk
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
; TODO: Update to AHK v2
|
||||
#[::
|
||||
Run, C:\Users\citoy\AppData\Local\Programs\Microsoft VS Code\Code.exe
|
||||
return
|
||||
#]::
|
||||
Run, C:\Program Files\Neovide\neovide.exe
|
||||
return
|
||||
#b::
|
||||
Run, C:\Program Files\Zotero\zotero.exe
|
||||
return
|
||||
#f::
|
||||
Run, C:\Program Files\GPSoftware\Directory Opus\dopus.exe
|
||||
return
|
||||
#q::
|
||||
Send !{F4}
|
||||
return
|
||||
#r::
|
||||
Run, C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.21.3231.0_x64__8wekyb3d8bbwe\wt.exe
|
||||
return
|
||||
|
||||
#h::
|
||||
Send {Left}
|
||||
return
|
||||
#n::
|
||||
Send {Down}
|
||||
return
|
||||
#e::
|
||||
Send {Up}
|
||||
return
|
||||
#i::
|
||||
Send {Right}
|
||||
return
|
||||
12
win/cmd/dark-mode.bat
Normal file
12
win/cmd/dark-mode.bat
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
@REM encoding: GBK
|
||||
@echo off
|
||||
set regPath="HKCU\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize"
|
||||
for /f "usebackq tokens=2*" %%a in (`reg query %regPath% /v AppsUseLightTheme ^| find "REG_DWORD"`) do set currentMode=%%b
|
||||
|
||||
if "%currentMode%"=="0x1" (
|
||||
reg add %regPath% /v AppsUseLightTheme /t REG_DWORD /d 0 /f >nul
|
||||
echo 已切换到深色模式
|
||||
) else (
|
||||
reg add %regPath% /v AppsUseLightTheme /t REG_DWORD /d 1 /f >nul
|
||||
echo 已切换到浅色模式
|
||||
)
|
||||
2209
win/komorebi/applications.json
Normal file
2209
win/komorebi/applications.json
Normal file
File diff suppressed because it is too large
Load diff
72
win/komorebi/komorebi.ahk
Normal file
72
win/komorebi/komorebi.ahk
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
; Use %KOMOREBI_CONFIG_HOME% Environment Variable to set the path to the config file
|
||||
#Requires AutoHotkey v2.0.2
|
||||
#SingleInstance Force
|
||||
|
||||
Komorebic(cmd) {
|
||||
RunWait(format("komorebic.exe {}", cmd), , "Hide")
|
||||
}
|
||||
|
||||
!q:: Komorebic("close")
|
||||
!m:: Komorebic("minimize")
|
||||
|
||||
; Focus windows
|
||||
#+h:: Komorebic("focus left")
|
||||
#+n:: Komorebic("focus down")
|
||||
#+e:: Komorebic("focus up")
|
||||
#+i:: Komorebic("focus right")
|
||||
|
||||
!+[:: 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")
|
||||
|
||||
; 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")
|
||||
|
||||
; Resize
|
||||
!=:: 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")
|
||||
|
||||
; Window manager options
|
||||
!+r:: Komorebic("retile")
|
||||
!p:: Komorebic("toggle-pause")
|
||||
|
||||
; Layouts
|
||||
!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")
|
||||
|
||||
; 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")
|
||||
76
win/komorebi/komorebi.bar.json
Normal file
76
win/komorebi/komorebi.bar.json
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
{
|
||||
"$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
|
||||
}
|
||||
},
|
||||
"font_family": "JetBrains Mono",
|
||||
"theme": {
|
||||
"palette": "Base16",
|
||||
"name": "Ashes",
|
||||
"accent": "Base0D"
|
||||
},
|
||||
"left_widgets": [
|
||||
{
|
||||
"Komorebi": {
|
||||
"workspaces": {
|
||||
"enable": true,
|
||||
"hide_empty_workspaces": false
|
||||
},
|
||||
"layout": {
|
||||
"enable": true
|
||||
},
|
||||
"focused_window": {
|
||||
"enable": true,
|
||||
"show_icon": true
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"right_widgets": [
|
||||
{
|
||||
"Media": {
|
||||
"enable": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"Storage": {
|
||||
"enable": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"Memory": {
|
||||
"enable": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"Network": {
|
||||
"enable": true,
|
||||
"show_total_data_transmitted": true,
|
||||
"show_network_activity": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"Date": {
|
||||
"enable": true,
|
||||
"format": "DayDateMonthYear"
|
||||
}
|
||||
},
|
||||
{
|
||||
"Time": {
|
||||
"enable": true,
|
||||
"format": "TwentyFourHour"
|
||||
}
|
||||
},
|
||||
{
|
||||
"Battery": {
|
||||
"enable": true
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
58
win/komorebi/komorebi.json
Normal file
58
win/komorebi/komorebi.json
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
{
|
||||
"$schema": "https://raw.githubusercontent.com/LGUG2Z/komorebi/v0.1.30/schema.json",
|
||||
"app_specific_configuration_path": "$Env:USERPROFILE/applications.json",
|
||||
"window_hiding_behaviour": "Cloak",
|
||||
"cross_monitor_move_behaviour": "Insert",
|
||||
"default_workspace_padding": 20,
|
||||
"default_container_padding": 20,
|
||||
"border": true,
|
||||
"border_width": 8,
|
||||
"border_offset": -1,
|
||||
"theme": {
|
||||
"palette": "Base16",
|
||||
"name": "Ashes",
|
||||
"unfocused_border": "Base03",
|
||||
"bar_accent": "Base0D"
|
||||
},
|
||||
"stackbar": {
|
||||
"height": 40,
|
||||
"mode": "OnStack",
|
||||
"tabs": {
|
||||
"width": 300
|
||||
}
|
||||
},
|
||||
"monitors": [
|
||||
{
|
||||
"workspaces": [
|
||||
{
|
||||
"name": "I",
|
||||
"layout": "BSP"
|
||||
},
|
||||
{
|
||||
"name": "II",
|
||||
"layout": "VerticalStack"
|
||||
},
|
||||
{
|
||||
"name": "III",
|
||||
"layout": "HorizontalStack"
|
||||
},
|
||||
{
|
||||
"name": "IV",
|
||||
"layout": "UltrawideVerticalStack"
|
||||
},
|
||||
{
|
||||
"name": "V",
|
||||
"layout": "Rows"
|
||||
},
|
||||
{
|
||||
"name": "VI",
|
||||
"layout": "Grid"
|
||||
},
|
||||
{
|
||||
"name": "VII",
|
||||
"layout": "RightMainVerticalStack"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -11,5 +11,5 @@ vsync = false
|
|||
wsl = true
|
||||
|
||||
[font]
|
||||
normal = ["CaskaydiaCove Nerd Font"] # Will use the bundled Fira Code Nerd Font by default
|
||||
normal = ["CaskaydiaCove Nerd Font", "霞鹜文楷等宽"] # Will use the bundled Fira Code Nerd Font by default
|
||||
size = 14.0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue