test
This commit is contained in:
@@ -22,3 +22,4 @@ result-*
|
|||||||
# Uncomment if you don't want to commit it:
|
# Uncomment if you don't want to commit it:
|
||||||
# nixos/hardware-configuration.nix
|
# nixos/hardware-configuration.nix
|
||||||
|
|
||||||
|
reference/
|
||||||
@@ -12,9 +12,6 @@
|
|||||||
# Shared configuration between NixOS and nix-darwin
|
# Shared configuration between NixOS and nix-darwin
|
||||||
../common.nix
|
../common.nix
|
||||||
|
|
||||||
# skhd hotkey daemon (system service)
|
|
||||||
./skhd.nix
|
|
||||||
|
|
||||||
# If you want to use modules your own flake exports (from modules/darwin):
|
# If you want to use modules your own flake exports (from modules/darwin):
|
||||||
# inputs.self.darwinModules.example
|
# inputs.self.darwinModules.example
|
||||||
|
|
||||||
|
|||||||
-111
@@ -1,111 +0,0 @@
|
|||||||
# Simple Hotkey Daemon configuration for nix-darwin
|
|
||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
super = "lalt";
|
|
||||||
in {
|
|
||||||
services.skhd = {
|
|
||||||
enable = true;
|
|
||||||
package = pkgs.skhd;
|
|
||||||
skhdConfig = ''
|
|
||||||
## Navigation (${super} - ...)
|
|
||||||
# Space Navigation (four spaces per display): ${super} - {1, 2, 3, 4}
|
|
||||||
${super} - 1 : yabai -m space --focus 1
|
|
||||||
${super} - 2 : yabai -m space --focus 2
|
|
||||||
${super} - 3 : yabai -m space --focus 3
|
|
||||||
${super} - 4 : yabai -m space --focus 4
|
|
||||||
${super} - 5 : yabai -m space --focus 5
|
|
||||||
${super} - 6 : yabai -m space --focus 6
|
|
||||||
${super} - 7 : yabai -m space --focus 7
|
|
||||||
${super} - 8 : yabai -m space --focus 8
|
|
||||||
${super} - 9 : yabai -m space --focus 9
|
|
||||||
${super} - 0 : yabai -m space --focus 0
|
|
||||||
|
|
||||||
# Window Navigation (through display borders): ${super} - {h, j, k, l}
|
|
||||||
${super} - h : yabai -m window --focus west || yabai -m display --focus west
|
|
||||||
${super} - j : yabai -m window --focus south || yabai -m display --focus south
|
|
||||||
${super} - k : yabai -m window --focus north || yabai -m display --focus north
|
|
||||||
${super} - l : yabai -m window --focus east || yabai -m display --focus east
|
|
||||||
|
|
||||||
# Float / Unfloat window: ${super} - space
|
|
||||||
# ${super} - space : yabai -m window --toggle float; sketchybar --trigger window_focus
|
|
||||||
|
|
||||||
# Make window zoom to fullscreen: shift + ${super} - f
|
|
||||||
shift + ${super} - f : yabai -m window --toggle zoom-fullscreen; sketchybar --trigger window_focus
|
|
||||||
|
|
||||||
# Make window zoom to parent node: ${super} - f
|
|
||||||
${super} - f : yabai -m window --toggle zoom-parent; sketchybar --trigger window_focus
|
|
||||||
|
|
||||||
## Window Movement (shift + ${super} - ...)
|
|
||||||
# Moving windows in spaces: shift + ${super} - {h, j, k, l}
|
|
||||||
shift + ${super} - h : yabai -m window --warp west || $(yabai -m window --display west && sketchybar --trigger windows_on_spaces && yabai -m display --focus west && yabai -m window --warp last) || yabai -m window --move rel:-10:0
|
|
||||||
shift + ${super} - j : yabai -m window --warp south || $(yabai -m window --display south && sketchybar --trigger windows_on_spaces && yabai -m display --focus south) || yabai -m window --move rel:0:10
|
|
||||||
shift + ${super} - k : yabai -m window --warp north || $(yabai -m window --display north && sketchybar --trigger windows_on_spaces && yabai -m display --focus north) || yabai -m window --move rel:0:-10
|
|
||||||
shift + ${super} - l : yabai -m window --warp east || $(yabai -m window --display east && sketchybar --trigger windows_on_spaces && yabai -m display --focus east && yabai -m window --warp first) || yabai -m window --move rel:10:0
|
|
||||||
|
|
||||||
# Toggle split orientation of the selected windows node: shift + ${super} - s
|
|
||||||
shift + ${super} - s : yabai -m window --toggle split
|
|
||||||
|
|
||||||
# Moving windows between spaces: shift + ${super} - {1, 2, 3, 4, p, n } (Assumes 4 Spaces Max per Display)
|
|
||||||
shift + ${super} - 1 : DISPLAY="$(yabai -m query --displays --display | jq '.index')";\
|
|
||||||
yabai -m window --space $((1+4*($DISPLAY - 1)));\
|
|
||||||
sketchybar --trigger windows_on_spaces
|
|
||||||
|
|
||||||
shift + ${super} - 2 : DISPLAY="$(yabai -m query --displays --display | jq '.index')";\
|
|
||||||
yabai -m window --space $((2+4*($DISPLAY - 1)));\
|
|
||||||
sketchybar --trigger windows_on_spaces
|
|
||||||
|
|
||||||
shift + ${super} - 3 : DISPLAY="$(yabai -m query --displays --display | jq '.index')";\
|
|
||||||
yabai -m window --space $((3+4*($DISPLAY - 1)));\
|
|
||||||
sketchybar --trigger windows_on_spaces
|
|
||||||
|
|
||||||
shift + ${super} - 4 : DISPLAY="$(yabai -m query --displays --display | jq '.index')";\
|
|
||||||
yabai -m window --space $((4+4*($DISPLAY - 1)));\
|
|
||||||
sketchybar --trigger windows_on_spaces
|
|
||||||
|
|
||||||
shift + ${super} - p : yabai -m window --space prev; yabai -m space --focus prev; sketchybar --trigger windows_on_spaces
|
|
||||||
shift + ${super} - n : yabai -m window --space next; yabai -m space --focus next; sketchybar --trigger windows_on_spaces
|
|
||||||
|
|
||||||
# Mirror Space on X and Y Axis: shift + ${super} - {x, y}
|
|
||||||
shift + ${super} - x : yabai -m space --mirror x-axis
|
|
||||||
shift + ${super} - y : yabai -m space --mirror y-axis
|
|
||||||
|
|
||||||
## Stacks (shift + ctrl - ...)
|
|
||||||
# Add the active window to the window or stack to the {direction}: shift + ctrl - {h, j, k, l}
|
|
||||||
shift + ctrl - h : yabai -m window west --stack $(yabai -m query --windows --window | jq -r '.id'); sketchybar --trigger window_focus
|
|
||||||
shift + ctrl - j : yabai -m window south --stack $(yabai -m query --windows --window | jq -r '.id'); sketchybar --trigger window_focus
|
|
||||||
shift + ctrl - k : yabai -m window north --stack $(yabai -m query --windows --window | jq -r '.id'); sketchybar --trigger window_focus
|
|
||||||
shift + ctrl - l : yabai -m window east --stack $(yabai -m query --windows --window | jq -r '.id'); sketchybar --trigger window_focus
|
|
||||||
|
|
||||||
# Stack Navigation: shift + ctrl - {n, p}
|
|
||||||
shift + ctrl - n : yabai -m window --focus stack.next
|
|
||||||
shift + ctrl - p : yabai -m window --focus stack.prev
|
|
||||||
|
|
||||||
## Resize (ctrl + ${super} - ...)
|
|
||||||
# Resize windows: ctrl + ${super} - {h, j, k, l}
|
|
||||||
ctrl + ${super} - h : yabai -m window --resize right:-100:0 || yabai -m window --resize left:-100:0
|
|
||||||
ctrl + ${super} - j : yabai -m window --resize bottom:0:100 || yabai -m window --resize top:0:100
|
|
||||||
ctrl + ${super} - k : yabai -m window --resize bottom:0:-100 || yabai -m window --resize top:0:-100
|
|
||||||
ctrl + ${super} - l : yabai -m window --resize right:100:0 || yabai -m window --resize left:100:0
|
|
||||||
|
|
||||||
# Equalize size of windows: ctrl + ${super} - e
|
|
||||||
ctrl + ${super} - e : yabai -m space --balance
|
|
||||||
|
|
||||||
# Enable / Disable gaps in current workspace: ctrl + ${super} - g
|
|
||||||
ctrl + ${super} - g : yabai -m space --toggle padding; yabai -m space --toggle gap
|
|
||||||
|
|
||||||
# Enable / Disable window borders in current workspace: ctrl + ${super} - b
|
|
||||||
ctrl + ${super} - b : yabai -m config window_border off
|
|
||||||
shift + ctrl + ${super} - b : yabai -m config window_border on
|
|
||||||
|
|
||||||
## Misc
|
|
||||||
# Open new Kitty window
|
|
||||||
${super} - return : kitty
|
|
||||||
# Bring Kitty window to current space
|
|
||||||
${super} - o : yabai -m window $(yabai -m query --windows | jq '.[] | select(.app==".kitty-wrapped") | .id') --space $(yabai -m query --spaces | jq '.[] | select(.has-focus==1) .id')
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
./modules/kitty.nix
|
./modules/kitty.nix
|
||||||
./modules/neovim.nix
|
./modules/neovim.nix
|
||||||
./modules/tmux.nix
|
./modules/tmux.nix
|
||||||
# skhd is a darwin system service, configured in darwin/skhd.nix
|
./modules/skhd.nix
|
||||||
./modules/yabai.nix
|
./modules/yabai.nix
|
||||||
|
|
||||||
# Doom Emacs via nix-doom-emacs-unstraightened
|
# Doom Emacs via nix-doom-emacs-unstraightened
|
||||||
|
|||||||
@@ -0,0 +1,62 @@
|
|||||||
|
# Fish Plugins Available in Nixpkgs
|
||||||
|
|
||||||
|
## Directory Navigation
|
||||||
|
- **z** - Pure-fish z directory jumping
|
||||||
|
- **fish-bd** - Fish plugin to quickly go back to a parent directory up in your current working directory tree
|
||||||
|
|
||||||
|
## Prompts & Themes
|
||||||
|
- **tide** - Ultimate Fish prompt
|
||||||
|
- **pure** - Pretty, minimal and fast Fish prompt, ported from zsh
|
||||||
|
- **hydro** - Ultra-pure, lag-free prompt with async Git status
|
||||||
|
- **bobthefish** - Powerline-style, Git-aware fish theme optimized for awesome
|
||||||
|
- **bobthefisher** - Powerline-style, Git-aware fish theme optimized for awesome (fork of bobthefish)
|
||||||
|
- **transient-fish** - Fish plugin to enable a transient prompt
|
||||||
|
- **gruvbox** - Gruvbox theme for fish shell
|
||||||
|
- **async-prompt** - Make your prompt asynchronous to improve the reactivity
|
||||||
|
|
||||||
|
## Fuzzy Finding & Search
|
||||||
|
- **fzf-fish** - Augment your fish command line with fzf key bindings
|
||||||
|
- **fzf** - Ef-fish-ient fish keybindings for fzf
|
||||||
|
- **fifc** - Fzf powers on top of fish completion engine and allows customizable completion rules
|
||||||
|
|
||||||
|
## Git Integration
|
||||||
|
- **forgit** - Utility tool powered by fzf for using git interactively
|
||||||
|
- **plugin-git** - Git plugin for fish (similar to oh-my-zsh git)
|
||||||
|
- **git-abbr** - Abbreviations for git for the fish shell 🐟
|
||||||
|
|
||||||
|
## Quality of Life
|
||||||
|
- **autopair** - Auto-complete matching pairs in the Fish command line
|
||||||
|
- **done** - Automatically receive notifications when long processes finish
|
||||||
|
- **sponge** - Keeps your fish shell history clean from typos, incorrectly used commands and everything you don't want to store due to privacy reasons
|
||||||
|
- **puffer** - Text Expansions for Fish
|
||||||
|
- **colored-man-pages** - Fish shell plugin to colorize man pages
|
||||||
|
- **pisces** - Paired symbols in the command line
|
||||||
|
- **spark** - Sparklines for Fish
|
||||||
|
- **humantime-fish** - Turn milliseconds into a human-readable string in Fish
|
||||||
|
|
||||||
|
## Shell Compatibility & Utilities
|
||||||
|
- **bass** - Fish function making it easy to use utilities written for Bash in Fish shell
|
||||||
|
- **foreign-env** - Foreign environment interface for Fish shell
|
||||||
|
- **grc** - Grc Colourizer for some commands on Fish shell
|
||||||
|
- **plugin-sudope** - Fish plugin to quickly put 'sudo' in your command
|
||||||
|
- **fishbang** - Bash bang commands for fish
|
||||||
|
- **bang-bang** - Bash style history substitution for Oh My Fish
|
||||||
|
|
||||||
|
## Development Tools
|
||||||
|
- **nvm** - Node.js version manager you'll adore, crafted just for Fish
|
||||||
|
- **sdkman-for-fish** - Adds support for SDKMAN! to fish
|
||||||
|
- **github-copilot-cli-fish** - GitHub Copilot CLI aliases for Fish Shell
|
||||||
|
- **exercism-cli-fish-wrapper** - Fish wrapper for the Exercism CLI
|
||||||
|
- **aws** - Completions and integrations with the AWS CLI
|
||||||
|
|
||||||
|
## Testing & Development
|
||||||
|
- **fishtape** - TAP-based test runner for Fish
|
||||||
|
- **fishtape_3** - 100% pure-Fish test runner
|
||||||
|
- **clownfish** - Fish function to mock the behaviour of commands
|
||||||
|
|
||||||
|
## Productivity & Monitoring
|
||||||
|
- **wakatime-fish** - Fish plugin for wakatime
|
||||||
|
- **fish-you-should-use** - Fish plugin that reminds you to use your aliases
|
||||||
|
|
||||||
|
## Platform-Specific
|
||||||
|
- **macos** - MacOS functions for Fish
|
||||||
@@ -10,186 +10,6 @@
|
|||||||
programs.fish = {
|
programs.fish = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
# ═══════════════════════════════════════════════════════════════════════════
|
|
||||||
# SHELL ALIASES
|
|
||||||
# ═══════════════════════════════════════════════════════════════════════════
|
|
||||||
shellAliases = {
|
|
||||||
# Navigation
|
|
||||||
".." = "cd ..";
|
|
||||||
"..." = "cd ../..";
|
|
||||||
"...." = "cd ../../..";
|
|
||||||
"....." = "cd ../../../..";
|
|
||||||
|
|
||||||
# Listings (eza integration handled by programs.eza)
|
|
||||||
ll = "ls -la";
|
|
||||||
la = "ls -a";
|
|
||||||
lt = "ls --tree";
|
|
||||||
|
|
||||||
# Git shortcuts
|
|
||||||
gs = "git status";
|
|
||||||
gd = "git diff";
|
|
||||||
gds = "git diff --staged";
|
|
||||||
ga = "git add";
|
|
||||||
gc = "git commit";
|
|
||||||
gp = "git push";
|
|
||||||
gl = "git pull";
|
|
||||||
glog = "git log --oneline --graph --decorate";
|
|
||||||
gco = "git checkout";
|
|
||||||
gb = "git branch";
|
|
||||||
|
|
||||||
# Nix shortcuts
|
|
||||||
nix-gc = "nix-collect-garbage -d";
|
|
||||||
nix-search = "nix search nixpkgs";
|
|
||||||
nrs = "sudo nixos-rebuild switch --flake .";
|
|
||||||
drs = "darwin-rebuild switch --flake .";
|
|
||||||
hms = "home-manager switch --flake .";
|
|
||||||
|
|
||||||
# Safety nets
|
|
||||||
rm = "rm -i";
|
|
||||||
cp = "cp -i";
|
|
||||||
mv = "mv -i";
|
|
||||||
|
|
||||||
# Modern replacements (when available)
|
|
||||||
cat = "bat --paging=never";
|
|
||||||
grep = "rg";
|
|
||||||
find = "fd";
|
|
||||||
|
|
||||||
# Misc
|
|
||||||
c = "clear";
|
|
||||||
q = "exit";
|
|
||||||
h = "history";
|
|
||||||
j = "jobs -l";
|
|
||||||
path = "echo $PATH | tr ':' '\\n'";
|
|
||||||
week = "date +%V";
|
|
||||||
myip = "curl -s https://ipinfo.io/ip";
|
|
||||||
};
|
|
||||||
|
|
||||||
# ═══════════════════════════════════════════════════════════════════════════
|
|
||||||
# SHELL ABBREVIATIONS (expand as you type, more powerful than aliases)
|
|
||||||
# ═══════════════════════════════════════════════════════════════════════════
|
|
||||||
shellAbbrs = {
|
|
||||||
# Git abbreviations (expand to full commands)
|
|
||||||
gst = "git status";
|
|
||||||
gaa = "git add --all";
|
|
||||||
gcm = "git commit -m";
|
|
||||||
gca = "git commit --amend";
|
|
||||||
gcan = "git commit --amend --no-edit";
|
|
||||||
gpf = "git push --force-with-lease";
|
|
||||||
grb = "git rebase";
|
|
||||||
grbi = "git rebase -i";
|
|
||||||
gsta = "git stash";
|
|
||||||
gstp = "git stash pop";
|
|
||||||
|
|
||||||
# Docker
|
|
||||||
dps = "docker ps";
|
|
||||||
dpa = "docker ps -a";
|
|
||||||
di = "docker images";
|
|
||||||
dcu = "docker-compose up";
|
|
||||||
dcd = "docker-compose down";
|
|
||||||
|
|
||||||
# Kubernetes
|
|
||||||
k = "kubectl";
|
|
||||||
kg = "kubectl get";
|
|
||||||
kd = "kubectl describe";
|
|
||||||
kl = "kubectl logs";
|
|
||||||
kx = "kubectl exec -it";
|
|
||||||
};
|
|
||||||
|
|
||||||
# ═══════════════════════════════════════════════════════════════════════════
|
|
||||||
# CUSTOM FUNCTIONS
|
|
||||||
# ═══════════════════════════════════════════════════════════════════════════
|
|
||||||
functions = {
|
|
||||||
# Create directory and cd into it
|
|
||||||
mkcd = "mkdir -p $argv[1]; and cd $argv[1]";
|
|
||||||
|
|
||||||
# Quick extract - handles multiple archive formats
|
|
||||||
extract = ''
|
|
||||||
if test -f $argv[1]
|
|
||||||
switch $argv[1]
|
|
||||||
case '*.tar.bz2'
|
|
||||||
tar xjf $argv[1]
|
|
||||||
case '*.tar.gz'
|
|
||||||
tar xzf $argv[1]
|
|
||||||
case '*.tar.xz'
|
|
||||||
tar xJf $argv[1]
|
|
||||||
case '*.bz2'
|
|
||||||
bunzip2 $argv[1]
|
|
||||||
case '*.rar'
|
|
||||||
unrar x $argv[1]
|
|
||||||
case '*.gz'
|
|
||||||
gunzip $argv[1]
|
|
||||||
case '*.tar'
|
|
||||||
tar xf $argv[1]
|
|
||||||
case '*.tbz2'
|
|
||||||
tar xjf $argv[1]
|
|
||||||
case '*.tgz'
|
|
||||||
tar xzf $argv[1]
|
|
||||||
case '*.zip'
|
|
||||||
unzip $argv[1]
|
|
||||||
case '*.Z'
|
|
||||||
uncompress $argv[1]
|
|
||||||
case '*.7z'
|
|
||||||
7z x $argv[1]
|
|
||||||
case '*'
|
|
||||||
echo "'$argv[1]' cannot be extracted via extract()"
|
|
||||||
end
|
|
||||||
else
|
|
||||||
echo "'$argv[1]' is not a valid file"
|
|
||||||
end
|
|
||||||
'';
|
|
||||||
|
|
||||||
# Git clone and cd
|
|
||||||
gcl = ''
|
|
||||||
git clone $argv[1]
|
|
||||||
cd (basename $argv[1] .git)
|
|
||||||
'';
|
|
||||||
|
|
||||||
# Quick backup file
|
|
||||||
bak = "cp $argv[1] $argv[1].bak.(date +%Y%m%d_%H%M%S)";
|
|
||||||
|
|
||||||
# Find process by name
|
|
||||||
psg = "ps aux | grep -v grep | grep -i $argv[1]";
|
|
||||||
|
|
||||||
# Quick HTTP server
|
|
||||||
serve = ''
|
|
||||||
set port (test -n "$argv[1]"; and echo $argv[1]; or echo 8000)
|
|
||||||
echo "Serving on http://localhost:$port"
|
|
||||||
python3 -m http.server $port
|
|
||||||
'';
|
|
||||||
|
|
||||||
# Weather
|
|
||||||
weather = ''
|
|
||||||
set location (test -n "$argv[1]"; and echo $argv[1]; or echo "")
|
|
||||||
curl -s "wttr.in/$location?format=3"
|
|
||||||
'';
|
|
||||||
|
|
||||||
# Quick nix shell
|
|
||||||
nsh = "nix-shell -p $argv";
|
|
||||||
|
|
||||||
# Reload fish config
|
|
||||||
reload = "source ~/.config/fish/config.fish; echo 'Fish config reloaded!'";
|
|
||||||
|
|
||||||
# Show path entries one per line
|
|
||||||
pathlist = "echo $PATH | tr ':' '\\n' | nl";
|
|
||||||
|
|
||||||
# Create a quick note
|
|
||||||
note = ''
|
|
||||||
set note_dir "$HOME/notes"
|
|
||||||
mkdir -p $note_dir
|
|
||||||
set note_file "$note_dir/(date +%Y-%m-%d).md"
|
|
||||||
if test -n "$argv"
|
|
||||||
echo "- (date +%H:%M) $argv" >> $note_file
|
|
||||||
echo "Note added to $note_file"
|
|
||||||
else
|
|
||||||
$EDITOR $note_file
|
|
||||||
end
|
|
||||||
'';
|
|
||||||
|
|
||||||
# Show disk usage for current directory, sorted
|
|
||||||
duf = "du -sh * 2>/dev/null | sort -h";
|
|
||||||
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
# ═══════════════════════════════════════════════════════════════════════════
|
# ═══════════════════════════════════════════════════════════════════════════
|
||||||
# PLUGINS - Curated selection for productivity
|
# PLUGINS - Curated selection for productivity
|
||||||
@@ -202,7 +22,7 @@
|
|||||||
# ── Fuzzy Finding ─────────────────────────────────────────────────────────
|
# ── Fuzzy Finding ─────────────────────────────────────────────────────────
|
||||||
# fzf-fish: Superior fzf integration - Ctrl+R history, Ctrl+Alt+F files, Ctrl+V vars
|
# fzf-fish: Superior fzf integration - Ctrl+R history, Ctrl+Alt+F files, Ctrl+V vars
|
||||||
{
|
{
|
||||||
name = "fuck.fzf.fish";
|
name = "fzf.fish";
|
||||||
src = pkgs.fetchFromGitHub {
|
src = pkgs.fetchFromGitHub {
|
||||||
owner = "PatrickF1";
|
owner = "PatrickF1";
|
||||||
repo = "fzf.fish";
|
repo = "fzf.fish";
|
||||||
@@ -252,6 +72,9 @@
|
|||||||
# INTERACTIVE SHELL INITIALIZATION
|
# INTERACTIVE SHELL INITIALIZATION
|
||||||
# ═══════════════════════════════════════════════════════════════════════════
|
# ═══════════════════════════════════════════════════════════════════════════
|
||||||
interactiveShellInit = ''
|
interactiveShellInit = ''
|
||||||
|
# Set up fzf.fish key bindings (Ctrl+R history, Ctrl+Alt+F files, etc.)
|
||||||
|
fzf_configure_bindings
|
||||||
|
|
||||||
echo "🐟 "(set_color cyan)(whoami)(set_color normal)" @ "(set_color yellow)(hostname -s)(set_color normal)" in "(set_color green)(prompt_pwd)(set_color normal)
|
echo "🐟 "(set_color cyan)(whoami)(set_color normal)" @ "(set_color yellow)(hostname -s)(set_color normal)" in "(set_color green)(prompt_pwd)(set_color normal)
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|||||||
@@ -148,5 +148,6 @@ in {
|
|||||||
# progs
|
# progs
|
||||||
|
|
||||||
zstd
|
zstd
|
||||||
|
bun
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -77,7 +77,7 @@
|
|||||||
enable = true;
|
enable = true;
|
||||||
enableBashIntegration = true;
|
enableBashIntegration = true;
|
||||||
enableZshIntegration = true;
|
enableZshIntegration = true;
|
||||||
enableFishIntegration = true;
|
enableFishIntegration = false; # Using PatrickF1/fzf.fish plugin instead
|
||||||
};
|
};
|
||||||
|
|
||||||
# Eza (modern ls replacement)
|
# Eza (modern ls replacement)
|
||||||
|
|||||||
@@ -1,54 +1,16 @@
|
|||||||
# skhd (Simple Hotkey Daemon) configuration for macOS
|
# skhd (Simple Hotkey Daemon) configuration for macOS
|
||||||
# Uses home-manager's launchd.agents for service management
|
# Uses upstream home-manager's services.skhd module
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
cfg = config.services.skhd;
|
|
||||||
super = "lalt";
|
super = "lalt";
|
||||||
in {
|
in lib.mkIf pkgs.stdenv.isDarwin {
|
||||||
options.services.skhd = {
|
services.skhd = {
|
||||||
enable = lib.mkEnableOption "skhd hotkey daemon";
|
enable = true;
|
||||||
|
config = ''
|
||||||
package = lib.mkPackageOption pkgs "skhd" {};
|
|
||||||
|
|
||||||
config = lib.mkOption {
|
|
||||||
type = with lib.types; nullOr lines;
|
|
||||||
default = null;
|
|
||||||
description = "Contents of skhdrc configuration file.";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
assertions = [
|
|
||||||
{
|
|
||||||
assertion = pkgs.stdenv.isDarwin;
|
|
||||||
message = "services.skhd is only available on macOS";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
home.packages = [cfg.package];
|
|
||||||
|
|
||||||
launchd.agents.skhd = {
|
|
||||||
enable = true;
|
|
||||||
config = {
|
|
||||||
ProgramArguments = ["${cfg.package}/bin/skhd"];
|
|
||||||
ProcessType = "Interactive";
|
|
||||||
KeepAlive = true;
|
|
||||||
RunAtLoad = true;
|
|
||||||
StandardErrorPath = "${config.home.homeDirectory}/Library/Logs/skhd/skhd.err.log";
|
|
||||||
StandardOutPath = "${config.home.homeDirectory}/Library/Logs/skhd/skhd.out.log";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
xdg.configFile."skhd/skhdrc" = lib.mkIf (cfg.config != null) {
|
|
||||||
text = cfg.config;
|
|
||||||
};
|
|
||||||
|
|
||||||
# Default skhd configuration for yabai integration
|
|
||||||
services.skhd.config = lib.mkDefault ''
|
|
||||||
## Navigation (${super} - ...)
|
## Navigation (${super} - ...)
|
||||||
# Space Navigation (four spaces per display): ${super} - {1, 2, 3, 4}
|
# Space Navigation (four spaces per display): ${super} - {1, 2, 3, 4}
|
||||||
${super} - 1 : yabai -m space --focus 1
|
${super} - 1 : yabai -m space --focus 1
|
||||||
|
|||||||
@@ -37,16 +37,41 @@
|
|||||||
# mouse
|
# mouse
|
||||||
yabai -m config mouse_follows_focus off
|
yabai -m config mouse_follows_focus off
|
||||||
yabai -m config focus_follows_mouse off
|
yabai -m config focus_follows_mouse off
|
||||||
yabai -m config mouse_modifier cmd
|
yabai -m config mouse_modifier option
|
||||||
yabai -m config mouse_action1 move
|
yabai -m config mouse_action1 move
|
||||||
yabai -m config mouse_action2 resize
|
yabai -m config mouse_action2 resize
|
||||||
yabai -m config mouse_drop_action swap
|
yabai -m config mouse_drop_action swap
|
||||||
|
|
||||||
# rules
|
# rules - apps to ignore (manage=off)
|
||||||
yabai -m rule --add app="^(Genshin Impact|LuLu|Vimac|Calculator|Software Update|Dictionary|VLC|System Preferences|zoom.us|Photo Booth|Archive Utility|Python|LibreOffice|App Store|Steam|Alfred|Activity Monitor)$" manage=off
|
yabai -m rule --add app="^Genshin Impact$" manage=off
|
||||||
|
yabai -m rule --add app="^LuLu$" manage=off
|
||||||
|
yabai -m rule --add app="^Vimac$" manage=off
|
||||||
|
yabai -m rule --add app="^Calculator$" manage=off
|
||||||
|
yabai -m rule --add app="^Software Update$" manage=off
|
||||||
|
yabai -m rule --add app="^Dictionary$" manage=off
|
||||||
|
yabai -m rule --add app="^VLC$" manage=off
|
||||||
|
yabai -m rule --add app="^System Preferences$" manage=off
|
||||||
|
yabai -m rule --add app="^zoom.us$" manage=off
|
||||||
|
yabai -m rule --add app="^Photo Booth$" manage=off
|
||||||
|
yabai -m rule --add app="^Archive Utility$" manage=off
|
||||||
|
yabai -m rule --add app="^Python$" manage=off
|
||||||
|
yabai -m rule --add app="^LibreOffice$" manage=off
|
||||||
|
yabai -m rule --add app="^App Store$" manage=off
|
||||||
|
yabai -m rule --add app="^Steam$" manage=off
|
||||||
|
yabai -m rule --add app="^Alfred$" manage=off
|
||||||
|
yabai -m rule --add app="^Activity Monitor$" manage=off
|
||||||
|
yabai -m rule --add app="^Raycast$" manage=off
|
||||||
|
|
||||||
|
# Finder dialogs
|
||||||
yabai -m rule --add label="Finder" app="^Finder$" title="(Co(py|nnect)|Move|Info|Pref)" manage=off
|
yabai -m rule --add label="Finder" app="^Finder$" title="(Co(py|nnect)|Move|Info|Pref)" manage=off
|
||||||
|
|
||||||
|
# Safari dialogs
|
||||||
yabai -m rule --add label="Safari" app="^Safari$" title="^(General|(Tab|Password|Website|Extension)s|AutoFill|Se(arch|curity)|Privacy|Advance)$" manage=off
|
yabai -m rule --add label="Safari" app="^Safari$" title="^(General|(Tab|Password|Website|Extension)s|AutoFill|Se(arch|curity)|Privacy|Advance)$" manage=off
|
||||||
|
|
||||||
|
# System dialogs
|
||||||
yabai -m rule --add label="About This Mac" app="System Information" title="About This Mac" manage=off
|
yabai -m rule --add label="About This Mac" app="System Information" title="About This Mac" manage=off
|
||||||
|
|
||||||
|
# Inkscape dialogs
|
||||||
yabai -m rule --add label="Select file to save to" app="^Inkscape$" title="Select file to save to" manage=off
|
yabai -m rule --add label="Select file to save to" app="^Inkscape$" title="Select file to save to" manage=off
|
||||||
'';
|
'';
|
||||||
executable = true;
|
executable = true;
|
||||||
|
|||||||
-111
@@ -1,111 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
super = "lalt";
|
|
||||||
in {
|
|
||||||
services.skhd = {
|
|
||||||
enable = true;
|
|
||||||
package = pkgs.skhd;
|
|
||||||
skhdConfig = ''
|
|
||||||
## Navigation (${super} - ...)
|
|
||||||
# Space Navigation (four spaces per display): ${super} - {1, 2, 3, 4}
|
|
||||||
${super} - 1 : yabai -m space --focus 1
|
|
||||||
${super} - 2 : yabai -m space --focus 2
|
|
||||||
${super} - 3 : yabai -m space --focus 3
|
|
||||||
${super} - 4 : yabai -m space --focus 4
|
|
||||||
${super} - 5 : yabai -m space --focus 5
|
|
||||||
${super} - 6 : yabai -m space --focus 6
|
|
||||||
${super} - 7 : yabai -m space --focus 7
|
|
||||||
${super} - 8 : yabai -m space --focus 8
|
|
||||||
${super} - 9 : yabai -m space --focus 9
|
|
||||||
${super} - 0 : yabai -m space --focus 0
|
|
||||||
|
|
||||||
# Window Navigation (through display borders): ${super} - {h, j, k, l}
|
|
||||||
${super} - h : yabai -m window --focus west || yabai -m display --focus west
|
|
||||||
${super} - j : yabai -m window --focus south || yabai -m display --focus south
|
|
||||||
${super} - k : yabai -m window --focus north || yabai -m display --focus north
|
|
||||||
${super} - l : yabai -m window --focus east || yabai -m display --focus east
|
|
||||||
|
|
||||||
# Float / Unfloat window: ${super} - space
|
|
||||||
# ${super} - space : yabai -m window --toggle float; sketchybar --trigger window_focus
|
|
||||||
|
|
||||||
# Make window zoom to fullscreen: shift + ${super} - f
|
|
||||||
shift + ${super} - f : yabai -m window --toggle zoom-fullscreen; sketchybar --trigger window_focus
|
|
||||||
|
|
||||||
# Make window zoom to parent node: ${super} - f
|
|
||||||
${super} - f : yabai -m window --toggle zoom-parent; sketchybar --trigger window_focus
|
|
||||||
|
|
||||||
## Window Movement (shift + ${super} - ...)
|
|
||||||
# Moving windows in spaces: shift + ${super} - {h, j, k, l}
|
|
||||||
shift + ${super} - h : yabai -m window --warp west || $(yabai -m window --display west && sketchybar --trigger windows_on_spaces && yabai -m display --focus west && yabai -m window --warp last) || yabai -m window --move rel:-10:0
|
|
||||||
shift + ${super} - j : yabai -m window --warp south || $(yabai -m window --display south && sketchybar --trigger windows_on_spaces && yabai -m display --focus south) || yabai -m window --move rel:0:10
|
|
||||||
shift + ${super} - k : yabai -m window --warp north || $(yabai -m window --display north && sketchybar --trigger windows_on_spaces && yabai -m display --focus north) || yabai -m window --move rel:0:-10
|
|
||||||
shift + ${super} - l : yabai -m window --warp east || $(yabai -m window --display east && sketchybar --trigger windows_on_spaces && yabai -m display --focus east && yabai -m window --warp first) || yabai -m window --move rel:10:0
|
|
||||||
|
|
||||||
# Toggle split orientation of the selected windows node: shift + ${super} - s
|
|
||||||
shift + ${super} - s : yabai -m window --toggle split
|
|
||||||
|
|
||||||
# Moving windows between spaces: shift + ${super} - {1, 2, 3, 4, p, n } (Assumes 4 Spaces Max per Display)
|
|
||||||
shift + ${super} - 1 : DISPLAY="$(yabai -m query --displays --display | jq '.index')";\
|
|
||||||
yabai -m window --space $((1+4*($DISPLAY - 1)));\
|
|
||||||
sketchybar --trigger windows_on_spaces
|
|
||||||
|
|
||||||
shift + ${super} - 2 : DISPLAY="$(yabai -m query --displays --display | jq '.index')";\
|
|
||||||
yabai -m window --space $((2+4*($DISPLAY - 1)));\
|
|
||||||
sketchybar --trigger windows_on_spaces
|
|
||||||
|
|
||||||
shift + ${super} - 3 : DISPLAY="$(yabai -m query --displays --display | jq '.index')";\
|
|
||||||
yabai -m window --space $((3+4*($DISPLAY - 1)));\
|
|
||||||
sketchybar --trigger windows_on_spaces
|
|
||||||
|
|
||||||
shift + ${super} - 4 : DISPLAY="$(yabai -m query --displays --display | jq '.index')";\
|
|
||||||
yabai -m window --space $((4+4*($DISPLAY - 1)));\
|
|
||||||
sketchybar --trigger windows_on_spaces
|
|
||||||
|
|
||||||
shift + ${super} - p : yabai -m window --space prev; yabai -m space --focus prev; sketchybar --trigger windows_on_spaces
|
|
||||||
shift + ${super} - n : yabai -m window --space next; yabai -m space --focus next; sketchybar --trigger windows_on_spaces
|
|
||||||
|
|
||||||
# Mirror Space on X and Y Axis: shift + ${super} - {x, y}
|
|
||||||
shift + ${super} - x : yabai -m space --mirror x-axis
|
|
||||||
shift + ${super} - y : yabai -m space --mirror y-axis
|
|
||||||
|
|
||||||
## Stacks (shift + ctrl - ...)
|
|
||||||
# Add the active window to the window or stack to the {direction}: shift + ctrl - {h, j, k, l}
|
|
||||||
shift + ctrl - h : yabai -m window west --stack $(yabai -m query --windows --window | jq -r '.id'); sketchybar --trigger window_focus
|
|
||||||
shift + ctrl - j : yabai -m window south --stack $(yabai -m query --windows --window | jq -r '.id'); sketchybar --trigger window_focus
|
|
||||||
shift + ctrl - k : yabai -m window north --stack $(yabai -m query --windows --window | jq -r '.id'); sketchybar --trigger window_focus
|
|
||||||
shift + ctrl - l : yabai -m window east --stack $(yabai -m query --windows --window | jq -r '.id'); sketchybar --trigger window_focus
|
|
||||||
|
|
||||||
# Stack Navigation: shift + ctrl - {n, p}
|
|
||||||
shift + ctrl - n : yabai -m window --focus stack.next
|
|
||||||
shift + ctrl - p : yabai -m window --focus stack.prev
|
|
||||||
|
|
||||||
## Resize (ctrl + ${super} - ...)
|
|
||||||
# Resize windows: ctrl + ${super} - {h, j, k, l}
|
|
||||||
ctrl + ${super} - h : yabai -m window --resize right:-100:0 || yabai -m window --resize left:-100:0
|
|
||||||
ctrl + ${super} - j : yabai -m window --resize bottom:0:100 || yabai -m window --resize top:0:100
|
|
||||||
ctrl + ${super} - k : yabai -m window --resize bottom:0:-100 || yabai -m window --resize top:0:-100
|
|
||||||
ctrl + ${super} - l : yabai -m window --resize right:100:0 || yabai -m window --resize left:100:0
|
|
||||||
|
|
||||||
# Equalize size of windows: ctrl + ${super} - e
|
|
||||||
ctrl + ${super} - e : yabai -m space --balance
|
|
||||||
|
|
||||||
# Enable / Disable gaps in current workspace: ctrl + ${super} - g
|
|
||||||
ctrl + ${super} - g : yabai -m space --toggle padding; yabai -m space --toggle gap
|
|
||||||
|
|
||||||
# Enable / Disable window borders in current workspace: ctrl + ${super} - b
|
|
||||||
ctrl + ${super} - b : yabai -m config window_border off
|
|
||||||
shift + ctrl + ${super} - b : yabai -m config window_border on
|
|
||||||
|
|
||||||
## Misc
|
|
||||||
# Open new Alacritty window
|
|
||||||
${super} - return : kitty
|
|
||||||
${super} - o : yabai -m window $(yabai -m query --windows | jq '.[] | select(.app==".kitty-wrapped") | .id') --space $(yabai -m query --spaces | jq '.[] | select(.has-focus==1) .id')
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user