diff --git a/dotfiles/ghostty/config b/dotfiles/ghostty/config index 5fc1ff8..9609a1c 100644 --- a/dotfiles/ghostty/config +++ b/dotfiles/ghostty/config @@ -1,7 +1,7 @@ font-family = Monocraft Nerd Font background-opacity = 0.8 background-blur = 10 -theme = Sakura +theme = IC Orange PPL mouse-hide-while-typing = true @@ -20,12 +20,12 @@ keybind = cmd+f=toggle_split_zoom keybind = cmd+a>l=next_tab keybind = cmd+a>h=previous_tab -keybind = cmd+r=reload_config +keybind = super+r=reload_config quick-terminal-position = center quick-terminal-screen = main quick-terminal-animation-duration = 0.2 quick-terminal-autohide = true -keybind = cmd+shift+q=toggle_quick_terminal +keybind = super+shift+q=toggle_quick_terminal window-save-state = always diff --git a/dotfiles/kanata/conf.kbd b/dotfiles/kanata/conf.kbd index 8c8c739..856af3c 100755 --- a/dotfiles/kanata/conf.kbd +++ b/dotfiles/kanata/conf.kbd @@ -1,16 +1,16 @@ +#| + Kanata Config + ○ Ergonomic (kinda?) 34-key QWERTY layout + ○ GACS home-row mods + ○ Layers for function, number, media, and symbol keys + ○ Dedicated (and non-intrusive!) standard layout toggle for reliant tasks + ○ Decently commented for beginners and seasoned veterans alike. + + FEEL FREE TO FORK!!! +|# (defcfg - process-unmapped-keys yes - block-unmapped-keys yes concurrent-tap-hold yes movemouse-smooth-diagonals yes - - macos-dev-names-include ( - "0xD4359520DA829EC8" ;; Macbook keyboard - "0x2E7E3EBD4C615B55" ;; Karabiner Driver - "0x379FD7D8D8AE4ACA" ;; Logitech Wave Keys (Bluetooth) - "0x4C044B7D74E4DBB4" ;; Gamestop keeb - "0xC7C83E024FB08653" ;; Razer Hunstman V2 TKL - ) ) #| Trying to be minimal in order to reduce constant editing @@ -41,16 +41,14 @@ cho (chord ch o) chs (chord ch s) chd (chord ch d) - chf (chord ch f) - chj (chord ch j) chk (chord ch k) chl (chord ch l) ch_lmet (chord ch lmet) ch_rmet (chord ch rmet) + ;; Remap Caps to Escape/Nav layer navlayer (layer-while-held nav) - hyper (multi lsft lctl lalt lmet) - meh (multi lsft lctl lalt) - caps (tap-hold $tap-time $hold-time (tap-dance 200 ((multi lctl spc) @meh caps)) @navlayer) + caps (tap-hold $tap-time $hold-time (tap-dance 200 (esc caps)) @navlayer) + ;; Home row mods a (tap-hold $tap-time $hold-time a lctl) s (tap-hold $tap-time $hold-time s lalt) d (tap-hold $tap-time $hold-time d lmet) @@ -59,14 +57,22 @@ k (tap-hold $tap-time $hold-time k lmet) l (tap-hold $tap-time $hold-time l lalt) scln (tap-hold $tap-time $hold-time scln rctl) - numpad (layer-while-held num) + ;; Numpad layer + numpad (layer-while-held num) g (tap-hold $tap-time $hold-time g @numpad) + ;; Function key layer fnkeys (layer-while-held fn) h (tap-hold $tap-time $hold-time h @fnkeys) - v (tap-hold $tap-time $hold-time v @meh) - m (tap-hold $tap-time $hold-time m @meh) + #| + Hyper key when V or M are held down to allow for either hand to + use hyper key for AHK/Raycast shortcuts. + |# + v (tap-hold $tap-time $hold-time v (multi lsft lctl lalt)) + m (tap-hold $tap-time $hold-time m (multi lsft lctl lalt)) + ;; Holding Spacebar activates symbol layer symbols (layer-while-held symbol) spc (tap-hold $tap-time $hold-time spc @symbols) + ;; Media layer when Z or / are held. medialy (layer-while-held md) z (tap-hold $tap-time $hold-time z @medialy) / (tap-hold $tap-time $hold-time / @medialy) @@ -74,43 +80,47 @@ ;; Chord definitions. Kind of weird to read as a layperson ;; so I provided sufficient comments for general understanding. (defchords ch $chord-time - (w ) w - ( e) e - (w e) XX - (i ) i - ( o) o - (i o) XX - (s ) @s - ( d) @d - (s d) ret - (f ) @f - (f d) tab - (j ) @j - (j k) esc - (k ) @k - ( l) @l - (k l) bspc - (lmet ) (tap-dance $tap-time ((multi lsft lctl lalt lmet) lmet)) - ( rmet) (tap-dance $tap-time ((multi lsft lctl lalt lmet) lmet)) + (w ) w ;; W => W + ( e) e ;; E => E + (w e) ret ;; W + E => Enter + (i ) i ;; I => I + ( o) o ;; O => O + (i o) bspc ;; I + O => Backspace + (s ) @s ;; S => S + ( d) @d ;; D => D + (s d) tab ;; S + D => Tab + (k ) @k ;; K => K (See defalias) + ( l) @l ;; L => L (See defalias) + (k l) esc ;; K + L => Escape + (lmet ) (tap-dance $tap-time ((multi lsft lctl lalt lmet) lmet)) ;; LCmd => Hyper Key, LCmd × 2 => LCmd + ( rmet) (tap-dance $tap-time ((multi lsft lctl lalt lmet) lmet)) ;; RCmd => Hyper Key, RAlt × 2 => RCmd + #| + Put simply, the below line allows for toggling a no-bind + layer for when you may require a standard layout (such as + playing Street Fighter, Counter Strike, etc.) by pressing + both Meta keys at the same time. You can toggle back to the + base layer by holding both Meta keys at the same time, as to allow + for normal functionality when holding either key down for a shortcut. + |# (lmet rmet) (tap-hold $tap-time $hold-time @normie (layer-switch base)) ) - +;; Base layer with all binds enabled (deflayer base @caps q @chw @che r t y u @chi @cho p - @a @chs @chd @chf @g @h @chj @chk @chl @scln + @a @chs @chd @f @g @h @j @chk @chl @scln @z x c @v b n @m , . @/ @ch_lmet @spc @ch_rmet ) - +;; Navigation layer (deflayer nav _ - mbck (movemouse-up 3 2) mfwd _ _ _ mlft mrgt (mwheel-up 50 120) (mwheel-down 50 120) - (movemouse-left 3 2) (movemouse-down 3 2) (movemouse-right 3 2) _ home left down up right end + _ (movemouse-up 3 3) _ _ _ _ mlft mrgt pgup pgdn + (movemouse-left 3 3) (movemouse-down 3 3) (movemouse-right 3 3) _ home left down up right end _ _ _ _ _ _ _ _ _ _ _ _ _ ) - +;; Numpad Layer (deflayer num _ _ _ _ _ _ _ 7 8 9 _ @@ -118,7 +128,7 @@ _ _ _ _ _ 1 2 3 _ _ _ _ ) - +;; Function key layer (deflayer fn _ f1 f2 f3 f4 _ _ _ _ _ _ @@ -126,15 +136,16 @@ f9 f10 f11 f12 _ _ _ _ _ _ _ _ ) - +;; Symbol layer (deflayer symbol _ S-1 S-2 S-3 S-4 S-5 S-6 S-7 S-8 S-9 S-0 - S-\ = - S-= S-- ` S-` S-scln ' S-' - _ \ S-[ S-] S-, S-. [ ] _ _ + - S-= S-[ S-] [ ] S-` S-scln S-\ \ + = _ _ ` _ S-- _ _ ' S-' _ _ _ ) - +;; Aformentioned standard layer with combo binds for toggling back +;; to base layer. (deflayer norm esc q w e r t y u i o p @@ -142,11 +153,11 @@ z x c v b n m , . / @ch_lmet spc @ch_rmet ) - +;; Media layer (deflayer md _ _ _ _ _ _ _ _ _ _ _ - prev pp next mute XX XX vold volu brdn brup + prev pp next mute vold volu brdn brup ins del _ _ _ _ _ _ _ _ _ _ _ _ _ ) diff --git a/dotfiles/skhd/skhdrc b/dotfiles/skhd/skhdrc new file mode 100644 index 0000000..5d1bd59 --- /dev/null +++ b/dotfiles/skhd/skhdrc @@ -0,0 +1,43 @@ +# General Movement +0x3A - h : yabai -m window --focus west +0x3A - j : yabai -m window --focus south +0x3A - k : yabai -m window --focus north +0x3A - l : yabai -m window --focus east +shift + alt - h : yabai -m window --swap west +shift + alt - j : yabai -m window --swap south +shift + alt - k : yabai -m window --swap north +shift + alt - l : yabai -m window --swap east + +# Workspace navigation +alt - q : yabai -m space --focus 1 +alt - w : yabai -m space --focus 2 +alt - e : yabai -m space --focus 3 +alt - r : yabai -m space --focus 4 +alt - t : yabai -m space --focus 5 +alt - y : yabai -m space --focus 6 +alt - u : yabai -m space --focus 7 +alt - i : yabai -m space --focus 8 +alt - o : yabai -m space --focus 9 +alt - p : yabai -m space --focus 10 + +shift + alt - 1 : yabai -m window --space 1 +shift + alt - 2 : yabai -m window --space 2 +shift + alt - 3 : yabai -m window --space 3 +shift + alt - 4 : yabai -m window --space 4 +shift + alt - 5 : yabai -m window --space 5 +shift + alt - 6 : yabai -m window --space 6 +shift + alt - 7 : yabai -m window --space 7 +shift + alt - 8 : yabai -m window --space 8 +shift + alt - 9 : yabai -m window --space 9 +shift + alt - 0 : yabai -m window --space 10 + +alt - m : yabai -m window --minimize + +alt - f : yabai -m window --toggle float;\ + yabai -m window --grid 4:4:1:1:2:2 + +shift + alt - f : yabai -m window --focus mouse && \ + yabai -m window --toggle zoom-fullscreen + +# Open apps +alt - t : open -n -a "ghostty" diff --git a/dotfiles/yabai/yabairc b/dotfiles/yabai/yabairc new file mode 100644 index 0000000..793707a --- /dev/null +++ b/dotfiles/yabai/yabairc @@ -0,0 +1,14 @@ +yabai -m config layout bsp +yabai -m config window_placement second_child + +yabai -m config top_padding 10 +yabai -m config bottom_padding 10 +yabai -m config left_padding 10 +yabai -m config right_padding 10 +yabai -m config window_gap 10 + +yabai -m config mouse_follows_focus on +yabai -m config mouse_modifier alt + +yabai -m rule --add app="^System Preferences$" manage=off +yabai -m rule --add app="^KeePassXC$" manage=off diff --git a/flake.nix b/flake.nix index 29d96e4..97e0648 100644 --- a/flake.nix +++ b/flake.nix @@ -31,6 +31,8 @@ neovim # Text editor of choice htop # Resource manager iina # Media player + yabai # Tiling window manager + skhd # Hotkey daemon # raycast # AI chat/Application launcher/Automation tool # kanata # Keyboard remapping tool ]; @@ -40,6 +42,7 @@ taps = []; brews = [ "kanata" + "hugo" "mpv" "lua" "luarocks" @@ -56,13 +59,18 @@ "foobar2000" "android-platform-tools" "zen" - "obs" - "krita" - "sioyek" - "shortcat" ]; }; + + services.yabai = { + enable = true; + extraConfig = builtins.readFile ./dotfiles/yabai/yabairc; + }; + /* services.skhd = { + enable = true; + skhdConfig = builtins.readFile ./dotfiles/skhd/skhdrc; + };*/ system.primaryUser = "erogers"; system.defaults = { dock.autohide = true; diff --git a/home.nix b/home.nix index e33d3ad..983a4d5 100644 --- a/home.nix +++ b/home.nix @@ -17,10 +17,10 @@ home.file = { ".config/ghostty/config" .source = dotfiles/ghostty/config; ".config/kanata/conf.kbd" .source = dotfiles/kanata/conf.kbd; - /* ".config/nvim/init.lua" .source = builtins.fetchurl { + ".config/nvim/init.lua" .source = builtins.fetchurl { url = "https://git.luluslly.xyz/lulusilly/dotfiles/raw/branch/master/.config/nvim/init.lua"; sha256 = "fc7104ae4957a7ff92375557725daf9872f836645556f7940fdd6366b04386e0"; - }; */ + }; }; home.sessionVariables = { @@ -39,11 +39,6 @@ co = "checkout"; }; }; - - programs.direnv = { - enable = true; - nix-direnv.enable = true; - }; programs.home-manager.enable = true; }