From ce684a7ba81e1e9e90141d1a2720589798dd112f Mon Sep 17 00:00:00 2001 From: vanderscycle Date: Wed, 25 Dec 2024 18:35:00 -0800 Subject: [PATCH 1/2] added mac specific WM --- .config/aerospace/aerospace.toml | 170 ++++++++++++++++++ .config/sketchybar/sketchybarrc | 1 + .config/skhd/skhdrc | 121 +++++++++++++ .config/yabai/yabairc | 72 ++++++++ nix-darwin/home-modules/languages/default.nix | 1 + nix-darwin/home-modules/languages/toml.nix | 24 +++ .../status-bars/sketchybar/default.nix | 7 + .../window-managers/aerospace/default.nix | 29 +++ .../window-managers/yabai/default.nix | 29 +++ .../henri.vandersleyen/configuration.nix | 5 +- nix-darwin/users/henri.vandersleyen/home.nix | 15 +- 11 files changed, 472 insertions(+), 2 deletions(-) create mode 100644 .config/aerospace/aerospace.toml create mode 100644 .config/sketchybar/sketchybarrc create mode 100644 .config/skhd/skhdrc create mode 100644 .config/yabai/yabairc create mode 100644 nix-darwin/home-modules/languages/toml.nix create mode 100644 nix-darwin/home-modules/status-bars/sketchybar/default.nix create mode 100644 nix-darwin/home-modules/window-managers/aerospace/default.nix create mode 100644 nix-darwin/home-modules/window-managers/yabai/default.nix diff --git a/.config/aerospace/aerospace.toml b/.config/aerospace/aerospace.toml new file mode 100644 index 00000000..9a8866a6 --- /dev/null +++ b/.config/aerospace/aerospace.toml @@ -0,0 +1,170 @@ +# after-startup-command = ['exec-and-forget sketchybar'] + +# Notify Sketchybar about workspace change +exec-on-workspace-change = ['/bin/bash', '-c', + # 'sketchybar --trigger aerospace_workspace_change FOCUSED_WORKSPACE=$AEROSPACE_FOCUSED_WORKSPACE', + 'exec-and-forget borders active_color=0xffe1e3e4 inactive_color=0xff494d64 width=5.0' +] + +# Start AeroSpace at login +start-at-login = false + +# Normalizations. See: https://nikitabobko.github.io/AeroSpace/guide#normalization +enable-normalization-flatten-containers = true +enable-normalization-opposite-orientation-for-nested-containers = true + +# See: https://nikitabobko.github.io/AeroSpace/guide#layouts +# The 'accordion-padding' specifies the size of accordion padding +# You can set 0 to disable the padding feature +accordion-padding = 300 + +# Possible values: tiles|accordion +default-root-container-layout = 'tiles' + +# Possible values: horizontal|vertical|auto +# 'auto' means: wide monitor (anything wider than high) gets horizontal orientation, +# tall monitor (anything higher than wide) gets vertical orientation +default-root-container-orientation = 'auto' + +# Mouse follows focus when focused monitor changes +# Drop it from your config, if you don't like this behavior +# See https://nikitabobko.github.io/AeroSpace/guide#on-focus-changed-callbacks +# See https://nikitabobko.github.io/AeroSpace/commands#move-mouse +# Fallback value (if you omit the key): on-focused-monitor-changed = [] +on-focused-monitor-changed = ['move-mouse monitor-lazy-center'] + +# You can effectively turn off macOS "Hide application" (cmd-h) feature by toggling this flag +# Useful if you don't use this macOS feature, but accidentally hit cmd-h or cmd-alt-h key +# Also see: https://nikitabobko.github.io/AeroSpace/goodness#disable-hide-app +automatically-unhide-macos-hidden-apps = false + +# [[on-window-detected]] +# if.app-id = 'com.apple.systempreferences' +# if.app-name-regex-substring = 'settings' +# if.window-title-regex-substring = 'substring' +# if.workspace = 'workspace-name' +# if.during-aerospace-startup = true +# check-further-callbacks = true +# run = ['layout floating', 'move-node-to-workspace S'] # The callback itself + +[[on-window-detected]] +if.app-name-regex-substring = 'telegram' +run = 'layout floating' + +[[on-window-detected]] +if.app-name-regex-substring = 'finder' +run = 'layout floating' + +# Possible values: (qwerty|dvorak) +# See https://nikitabobko.github.io/AeroSpace/guide#key-mapping +[key-mapping] +preset = 'qwerty' + +# Gaps between windows (inner-*) and between monitor edges (outer-*). +# Possible values: +# - Constant: gaps.outer.top = 8 +# - Per monitor: gaps.outer.top = [{ monitor.main = 16 }, { monitor."some-pattern" = 32 }, 24] +# In this example, 24 is a default value when there is no match. +# Monitor pattern is the same as for 'workspace-to-monitor-force-assignment'. +# See: https://nikitabobko.github.io/AeroSpace/guide#assign-workspaces-to-monitors +[gaps] +inner.horizontal = 40 +inner.vertical = 40 +outer.left = 40 +outer.bottom = 40 +outer.top = 40 +outer.right = 80 + +# 'main' binding mode declaration +# See: https://nikitabobko.github.io/AeroSpace/guide#binding-modes +# 'main' binding mode must be always presented +# Fallback value (if you omit the key): mode.main.binding = {} +[mode.main.binding] + +# All possible keys: +# - Letters. a, b, c, ..., z +# - Numbers. 0, 1, 2, ..., 9 +# - Keypad numbers. keypad0, keypad1, keypad2, ..., keypad9 +# - F-keys. f1, f2, ..., f20 +# - Special keys. minus, equal, period, comma, slash, backslash, quote, semicolon, backtick, +# leftSquareBracket, rightSquareBracket, space, enter, esc, backspace, tab +# - Keypad special. keypadClear, keypadDecimalMark, keypadDivide, keypadEnter, keypadEqual, +# keypadMinus, keypadMultiply, keypadPlus +# - Arrows. left, down, up, right + +# All possible modifiers: cmd, alt, ctrl, shift + +# All possible commands: https://nikitabobko.github.io/AeroSpace/commands + +# See: https://nikitabobko.github.io/AeroSpace/commands#exec-and-forget +# You can uncomment the following lines to open up terminal with alt + enter shortcut (like in i3) +# alt-enter = '''exec-and-forget osascript -e ' +# tell application "Terminal" +# do script +# activate +# end tell' +# ''' + +alt-ctrl-shift-f = 'fullscreen' +alt-ctrl-f = 'layout floating' + +alt-shift-left = 'join-with left' +alt-shift-down = 'join-with down' +alt-shift-up = 'join-with up' +alt-shift-right = 'join-with right' + +# See: https://nikitabobko.github.io/AeroSpace/commands#layout +alt-slash = 'layout tiles horizontal vertical' +alt-comma = 'layout accordion horizontal vertical' + +# See: https://nikitabobko.github.io/AeroSpace/commands#focus +alt-h = 'focus left' +alt-j = 'focus down' +alt-k = 'focus up' +alt-l = 'focus right' + +# See: https://nikitabobko.github.io/AeroSpace/commands#move +alt-shift-h = 'move left' +alt-shift-j = 'move down' +alt-shift-k = 'move up' +alt-shift-l = 'move right' + +# See: https://nikitabobko.github.io/AeroSpace/commands#resize +alt-shift-minus = 'resize smart -50' +alt-shift-equal = 'resize smart +50' + +# See: https://nikitabobko.github.io/AeroSpace/commands#workspace +alt-1 = 'workspace 1' +alt-2 = 'workspace 2' +alt-3 = 'workspace 3' +alt-4 = 'workspace 4' +alt-5 = 'workspace 5' + +# See: https://nikitabobko.github.io/AeroSpace/commands#move-node-to-workspace +alt-shift-1 = 'move-node-to-workspace 1 --focus-follows-window' +alt-shift-2 = 'move-node-to-workspace 2 --focus-follows-window' +alt-shift-3 = 'move-node-to-workspace 3 --focus-follows-window' +alt-shift-4 = 'move-node-to-workspace 4 --focus-follows-window' +alt-shift-5 = 'move-node-to-workspace 5 --focus-follows-window' +alt-shift-6 = 'move-node-to-workspace 6 --focus-follows-window' + +alt-tab = 'workspace-back-and-forth' +alt-shift-tab = 'move-workspace-to-monitor --wrap-around next' + +# See: https://nikitabobko.github.io/AeroSpace/commands#mode +alt-shift-semicolon = 'mode service' +alt-shift-enter = 'mode apps' + +alt-s = 'exec-and-forget open -a /Applications/Safari.app' + + +# 'service' binding mode declaration. +# See: https://nikitabobko.github.io/AeroSpace/guide#binding-modes +[mode.service.binding] +esc = ['reload-config', 'mode main'] +r = ['flatten-workspace-tree', 'mode main'] # reset layout +f = ['layout floating tiling', 'mode main'] # Toggle between floating and tiling layout +backspace = ['close-all-windows-but-current', 'mode main'] + +[mode.apps.binding] +alt-q = ['exec-and-forget open -a /Applications/Kitty.app', 'mode main'] \ No newline at end of file diff --git a/.config/sketchybar/sketchybarrc b/.config/sketchybar/sketchybarrc new file mode 100644 index 00000000..cc88d7e1 --- /dev/null +++ b/.config/sketchybar/sketchybarrc @@ -0,0 +1 @@ +TODO bb \ No newline at end of file diff --git a/.config/skhd/skhdrc b/.config/skhd/skhdrc new file mode 100644 index 00000000..8524945a --- /dev/null +++ b/.config/skhd/skhdrc @@ -0,0 +1,121 @@ +# toggle yabai +hyper - u : ~/.config/skhd/CustomScripts/ToggleWM.sh 1 +hyper - y : ~/.config/skhd/CustomScripts/ToggleWM.sh 0 + +hyper - b : brew services restart sketchybar + +# open apps +# terminal window +hyper - t : alacritty msg create-window + +# finder +hyper - e : open ~/ + +# floating window +hyper - g : yabai -m window --toggle float --grid 5:5:1:1:3:3 + +# rotate tree +hyper - r : yabai -m space --rotate 90 + +# flip The tree vertically +hyper - w : yabai -m space --mirror y-axis + +# fill screen +hyper - return : yabai -m window --toggle zoom-fullscreen +hyper - o : yabai -m window --grid 1:1:0:0:1:1 + +# media controls p [ ] keys +hyper - 0x23 : osascript -e 'tell application "Music" to previous track' +hyper - 0x21 : osascript -e 'tell application "Music" to playpause' +hyper - 0x1E : osascript -e 'tell application "Music" to next track' + +# focus desktop +# shift + rcmd + rctrl + ralt - z : ~/.config/skhd/CustomScripts/SwitchSpace.sh 1 +# shift + rcmd + rctrl + ralt - a : ~/.config/skhd/CustomScripts/SwitchSpace.sh 2 +# shift + rcmd + rctrl + ralt - s : ~/.config/skhd/CustomScripts/SwitchSpace.sh 3 +# shift + rcmd + rctrl + ralt - d : ~/.config/skhd/CustomScripts/SwitchSpace.sh 4 +# shift + rcmd + rctrl + ralt - f : ~/.config/skhd/CustomScripts/SwitchSpace.sh 5 +# shift + rcmd + rctrl + ralt - 1 : ~/.config/skhd/CustomScripts/SwitchSpace.sh 6 +# shift + rcmd + rctrl + ralt - 2 : ~/.config/skhd/CustomScripts/SwitchSpace.sh 7 +# shift + rcmd + rctrl + ralt - 3 : ~/.config/skhd/CustomScripts/SwitchSpace.sh 8 +# shift + rcmd + rctrl + ralt - 4 : ~/.config/skhd/CustomScripts/SwitchSpace.sh 9 +shift + rcmd + rctrl + ralt - z : yabai -m space --focus 1 +shift + rcmd + rctrl + ralt - a : yabai -m space --focus 2 +shift + rcmd + rctrl + ralt - s : yabai -m space --focus 3 +shift + rcmd + rctrl + ralt - d : yabai -m space --focus 4 +shift + rcmd + rctrl + ralt - f : yabai -m space --focus 5 +shift + rcmd + rctrl + ralt - 1 : yabai -m space --focus 6 +shift + rcmd + rctrl + ralt - 2 : yabai -m space --focus 7 +shift + rcmd + rctrl + ralt - 3 : yabai -m space --focus 8 +shift + rcmd + rctrl + ralt - 4 : yabai -m space --focus 9 +shift + rcmd + rctrl + ralt - 5 : yabai -m space --focus 10 +shift + rcmd + rctrl + ralt - 6 : yabai -m space --focus 11 +shift + rcmd + rctrl + ralt - 7 : yabai -m space --focus 12 +shift + rcmd + rctrl + ralt - 8 : yabai -m space --focus 13 +shift + rcmd + rctrl + ralt - 9 : yabai -m space --focus 14 +shift + rcmd + rctrl + ralt - 0 : yabai -m space --focus 15 + +# spotlight +# lcmd - space : ~/Developer/Other/Rofi-macOS/ApplicationPicker.sh + +# stacking +shift + rcmd + rctrl + ralt - left : window=$(yabai -m query --windows --window | jq -r '.id') && yabai -m window west --stack $window || (yabai -m window $window --toggle float && yabai -m window $window --toggle float) +shift + rcmd + rctrl + ralt - right : window=$(yabai -m query --windows --window | jq -r '.id') && yabai -m window east --stack $window || (yabai -m window $window --toggle float && yabai -m window $window --toggle float) +shift + rcmd + rctrl + ralt - up : window=$(yabai -m query --windows --window | jq -r '.id') && yabai -m window north --stack $window || (yabai -m window $window --toggle float && yabai -m window $window --toggle float) +shift + rcmd + rctrl + ralt - down : window=$(yabai -m query --windows --window | jq -r '.id') && yabai -m window south --stack $window || (yabai -m window $window --toggle float && yabai -m window $window --toggle float) + +# scroll through stack +lalt - 0x30 : yabai -m window --focus stack.next || yabai -m window --focus stack.first +lalt + lshift - 0x30 : yabai -m window --focus stack.prev || yabai -m window --focus stack.last + +# modes +# :: default : sketchybar --set island drawing=off +# :: window @ : sketchybar --set island drawing=on +:: default +:: window @ +hyper - n ; window +window < escape ; default + +# focus window (use f16 - f19) +window < h : yabai -m window --focus west || \ + yabai -m window --focus $(yabai -m query --spaces --display west | jq '.[] | select(."is-visible" == true) | ."last-window"') +window < l : yabai -m window --focus east || \ + yabai -m window --focus $(yabai -m query --spaces --display east | jq '.[] | select(."is-visible" == true) | ."first-window"') +window < j : yabai -m window --focus south +window < k : yabai -m window --focus north + +# move window +# same as shift + rcmd + rctrl + ralt+ lcmd - key +window < shift - h : yabai -m window --warp west || \ + ~/.config/skhd/CustomScripts/MoveWindowLeftAndFocus.sh +window < shift - l : yabai -m window --warp east || \ + ~/.config/skhd/CustomScripts/MoveWindowLeftAndFocus.sh +window < shift - k : yabai -m window --warp north +window < shift - j : yabai -m window --warp south + +# move window to desktop +window < z : skhd -k "escape"; ~/.config/skhd/CustomScripts/MoveWindow.sh 1 +window < a : skhd -k "escape"; ~/.config/skhd/CustomScripts/MoveWindow.sh 2 +window < s : skhd -k "escape"; ~/.config/skhd/CustomScripts/MoveWindow.sh 3 +window < d : skhd -k "escape"; ~/.config/skhd/CustomScripts/MoveWindow.sh 4 +window < f : skhd -k "escape"; ~/.config/skhd/CustomScripts/MoveWindow.sh 5 +window < 1 : skhd -k "escape"; ~/.config/skhd/CustomScripts/MoveWindow.sh 6 +window < 2 : skhd -k "escape"; ~/.config/skhd/CustomScripts/MoveWindow.sh 7 +window < 3 : skhd -k "escape"; ~/.config/skhd/CustomScripts/MoveWindow.sh 8 +window < 4 : skhd -k "escape"; ~/.config/skhd/CustomScripts/MoveWindow.sh 9 +window < 5 : skhd -k "escape"; ~/.config/skhd/CustomScripts/MoveWindow.sh 10 +window < 6 : skhd -k "escape"; ~/.config/skhd/CustomScripts/MoveWindow.sh 11 +window < 7 : skhd -k "escape"; ~/.config/skhd/CustomScripts/MoveWindow.sh 12 +window < 8 : skhd -k "escape"; ~/.config/skhd/CustomScripts/MoveWindow.sh 13 +window < 9 : skhd -k "escape"; ~/.config/skhd/CustomScripts/MoveWindow.sh 14 +window < 0 : skhd -k "escape"; ~/.config/skhd/CustomScripts/MoveWindow.sh 15 + +# resize window +window < ctrl - h : yabai -m window --resize left:-20:0 || \ + yabai -m window --resize right:-20:0 +window < ctrl - l : yabai -m window --resize left:20:0 || \ + yabai -m window --resize right:20:0 +window < ctrl - j : yabai -m window --resize top:0:20 || \ + yabai -m window --resize bottom:0:20 +window < ctrl - k : yabai -m window --resize top:0:-20 || \ + yabai -m window --resize bottom:0:-20 \ No newline at end of file diff --git a/.config/yabai/yabairc b/.config/yabai/yabairc new file mode 100644 index 00000000..e5b37280 --- /dev/null +++ b/.config/yabai/yabairc @@ -0,0 +1,72 @@ +#!/usr/bin/env sh + +launchctl unload -F /System/Library/LaunchAgents/com.apple.WindowManager.plist > /dev/null 2>&1 & + +sudo yabai --load-sa +yabai -m signal --add event=dock_did_restart action="sudo yabai --load-sa" +yabai -m signal --add event=display_added action="sleep 1 && $HOME/.config/yabai/create_spaces.sh" +yabai -m signal --add event=display_removed action="sleep 1 && $HOME/.config/yabai/create_spaces.sh" +# yabai -m signal --add event=window_created action="sketchybar --trigger windows_on_spaces" +# yabai -m signal --add event=window_focused action="sketchybar --trigger windows_on_spaces" +# yabai -m signal --add event=window_destroyed action="sketchybar --trigger windows_on_spaces" +# yabai -m signal --add event=window_moved action="sketchybar --trigger windows_on_spaces" + +yabai -m config external_bar all:32:0 +yabai -m config window_border on # enabling this option will also enable blur +yabai -m config window_border_blur off +yabai -m config mouse_follows_focus off +yabai -m config focus_follows_mouse off +yabai -m config window_placement second_child +yabai -m config window_topmost off +yabai -m config window_shadow float +yabai -m config window_opacity on +yabai -m config window_opacity_duration 0.1 +yabai -m config active_window_opacity 1.0 +yabai -m config normal_window_opacity 1.0 +yabai -m config window_border_width 3 +yabai -m config window_border_hidpi off +yabai -m config window_border_radius 3 +yabai -m config window_animation_duration 0.0 +yabai -m config active_window_border_color 0xffcdd6f4 +yabai -m config normal_window_border_color 0xff313244 +yabai -m config insert_feedback_color 0xfffab387 +yabai -m config split_ratio 0.50 +yabai -m config auto_balance off + +yabai -m config layout bsp +yabai -m config top_padding 8 +yabai -m config bottom_padding 8 +yabai -m config left_padding 8 +yabai -m config right_padding 8 +yabai -m config window_gap 6 +# Do not manage some apps which are not resizable +yabai -m rule --add app="^(LuLu|Vimac|Calculator|VLC|System Settings|zoom.us|Photo Booth|Archive Utility|Python|LibreOffice)$" manage=off + +# ===== Rules ================================== + +yabai -m rule --add app="^Finder$" sticky=on layer=above manage=off +yabai -m rule --add app="^choose$" layer=above 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 +yabai -m rule --add label="System Settings" app="^System Preferences$" manage=off +yabai -m rule --add label="App Store" app="^App Store$" manage=off +yabai -m rule --add label="Activity Monitor" app="^Activity Monitor$" manage=off +yabai -m rule --add label="Calculator" app="^Calculator$" manage=off +yabai -m rule --add label="Dictionary" app="^Dictionary$" manage=off +yabai -m rule --add label="Software Update" title="Software Update" manage=off +yabai -m rule --add label="About This Mac" app="System Information" title="About This Mac" manage=off +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="AppCleaner" app="^AppCleaner$" layer=above manage=off + +yabai -m space 1 --label one +yabai -m space 2 --label two +yabai -m space 3 --label three +yabai -m space 4 --label four +yabai -m space 5 --label five +yabai -m space 6 --label six +yabai -m space 7 --label seven +yabai -m space 8 --label eight +yabai -m space 9 --label nine +yabai -m space 10 --label ten + +# yabai -m signal --add event=window_destroyed action="bash ./CustomScripts/window-focus-on-destroy.sh" +yabai -m signal --add event=window_focused action="sketchybar --trigger window_focus" \ No newline at end of file diff --git a/nix-darwin/home-modules/languages/default.nix b/nix-darwin/home-modules/languages/default.nix index d4235a46..6c1ae064 100644 --- a/nix-darwin/home-modules/languages/default.nix +++ b/nix-darwin/home-modules/languages/default.nix @@ -6,6 +6,7 @@ ./latex.nix ./nix.nix ./python.nix + ./toml.nix ./yaml.nix ./jsts.nix ]; diff --git a/nix-darwin/home-modules/languages/toml.nix b/nix-darwin/home-modules/languages/toml.nix new file mode 100644 index 00000000..b391704b --- /dev/null +++ b/nix-darwin/home-modules/languages/toml.nix @@ -0,0 +1,24 @@ +{ + pkgs, + lib, + config, + ... +}: +{ + + options = { + toml.lsp.enable = lib.mkOption { + type = lib.types.bool; + description = "Enables toml"; + default = true; + }; + }; + + config = lib.mkIf config.toml.lsp.enable { + home = { + packages = with pkgs; [ + taplo + ]; + }; + }; +} diff --git a/nix-darwin/home-modules/status-bars/sketchybar/default.nix b/nix-darwin/home-modules/status-bars/sketchybar/default.nix new file mode 100644 index 00000000..379690ad --- /dev/null +++ b/nix-darwin/home-modules/status-bars/sketchybar/default.nix @@ -0,0 +1,7 @@ +{ config, pkgs, ... }: + +{ + home.file = { + ".config/sketchybar".source = "~/Documents/dotfiles/.config/sketchybar"; + }; +} diff --git a/nix-darwin/home-modules/window-managers/aerospace/default.nix b/nix-darwin/home-modules/window-managers/aerospace/default.nix new file mode 100644 index 00000000..34a05416 --- /dev/null +++ b/nix-darwin/home-modules/window-managers/aerospace/default.nix @@ -0,0 +1,29 @@ +{ + pkgs, + lib, + config, + username, + ... +}: +{ + options = { + wm.aerospace.enable = lib.mkOption { + type = lib.types.bool; + description = "Enables aerospace wm "; + default = false; + }; + + wm.aerospace.configPath = lib.mkOption { + type = lib.types.path; + description = "determine the path"; + default = null; + }; + }; + + config = lib.mkIf config.wm.aerospace.enable { + home.file = { + ".config/aerospace".source = /Users/${username}/Documents/dotfiles/.config/aerospace; + # config.wm.aerospace.configPath; + }; + }; +} diff --git a/nix-darwin/home-modules/window-managers/yabai/default.nix b/nix-darwin/home-modules/window-managers/yabai/default.nix new file mode 100644 index 00000000..e52304ac --- /dev/null +++ b/nix-darwin/home-modules/window-managers/yabai/default.nix @@ -0,0 +1,29 @@ +{ + pkgs, + lib, + config, + username, + ... +}: +{ + options = { + wm.yabai.enable = lib.mkOption { + type = lib.types.bool; + description = "Enables yabai wm "; + default = false; + }; + + wm.yabai.configPath = lib.mkOption { + type = lib.types.path; + description = "determine the path"; + default = null; + }; + }; + + config = lib.mkIf config.wm.yabai.enable { + home.file = { + ".config/yabai".source = /Users/${username}/Documents/dotfiles/.config/yabai; + ".config/skhd".source = /Users/${username}/Documents/dotfiles/.config/skhd; + }; + }; +} diff --git a/nix-darwin/users/henri.vandersleyen/configuration.nix b/nix-darwin/users/henri.vandersleyen/configuration.nix index 19e4a3a5..2867a3db 100644 --- a/nix-darwin/users/henri.vandersleyen/configuration.nix +++ b/nix-darwin/users/henri.vandersleyen/configuration.nix @@ -64,6 +64,9 @@ "iterm2" "nikitabobko/tap/aerospace" ]; - brews = [ ]; + brews = [ + "koekeishiya/formulae/yabai" + "koekeishiya/formulae/skhd" + ]; }; } diff --git a/nix-darwin/users/henri.vandersleyen/home.nix b/nix-darwin/users/henri.vandersleyen/home.nix index 0a9efaf5..c141dd2b 100644 --- a/nix-darwin/users/henri.vandersleyen/home.nix +++ b/nix-darwin/users/henri.vandersleyen/home.nix @@ -27,22 +27,35 @@ ../../home-modules/programs/devops.nix ../../home-modules/programs/spotify.nix ../../home-modules/programs/nh.nix + # languages ../../home-modules/languages/nix.nix ../../home-modules/languages/python.nix ../../home-modules/languages/jsts.nix ../../home-modules/languages/bash.nix + # services # ./home-modules/services/appleTouchId.nix + # Window-manager + ../../home-modules/window-managers/aerospace + + # starus-bars + # ../../home-modules/status-bars/sketchybar ]; + # wm + wm.aerospace = { + enable = true; + configPath = Users/${username}/Documents/dotfiles/.config/aerospace; + }; # languages python.lsp.enable = true; jsts.lsp.enable = true; + # programs fish.enable = true; zsh.enable = true; - nh.flakeLocation = "/home/${username}/Documents/dotFiles/nix-darwin"; + nh.flakeLocation = "/Users/${username}/Documents/dotFiles/nix-darwin"; keychain.enable = true; keychain.keys = "/home/henri/.ssh/knak"; From a6391eabb82c3d7ae5ee81c05601690f8542c1d1 Mon Sep 17 00:00:00 2001 From: vanderscycle Date: Wed, 25 Dec 2024 18:54:59 -0800 Subject: [PATCH 2/2] still have to work on it --- .config/aerospace/aerospace.toml | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/.config/aerospace/aerospace.toml b/.config/aerospace/aerospace.toml index 9a8866a6..4a22fed4 100644 --- a/.config/aerospace/aerospace.toml +++ b/.config/aerospace/aerospace.toml @@ -7,7 +7,7 @@ exec-on-workspace-change = ['/bin/bash', '-c', ] # Start AeroSpace at login -start-at-login = false +start-at-login = true # Normalizations. See: https://nikitabobko.github.io/AeroSpace/guide#normalization enable-normalization-flatten-containers = true @@ -68,12 +68,12 @@ preset = 'qwerty' # Monitor pattern is the same as for 'workspace-to-monitor-force-assignment'. # See: https://nikitabobko.github.io/AeroSpace/guide#assign-workspaces-to-monitors [gaps] -inner.horizontal = 40 -inner.vertical = 40 -outer.left = 40 -outer.bottom = 40 -outer.top = 40 -outer.right = 80 +inner.horizontal = 18 +inner.vertical = 18 +outer.left = 18 +outer.bottom = 18 +outer.top = 18 +outer.right = 18 # 'main' binding mode declaration # See: https://nikitabobko.github.io/AeroSpace/guide#binding-modes @@ -140,13 +140,12 @@ alt-3 = 'workspace 3' alt-4 = 'workspace 4' alt-5 = 'workspace 5' -# See: https://nikitabobko.github.io/AeroSpace/commands#move-node-to-workspace +#See: https://nikitabobko.github.io/AeroSpace/commands#move-node-to-workspace alt-shift-1 = 'move-node-to-workspace 1 --focus-follows-window' alt-shift-2 = 'move-node-to-workspace 2 --focus-follows-window' alt-shift-3 = 'move-node-to-workspace 3 --focus-follows-window' alt-shift-4 = 'move-node-to-workspace 4 --focus-follows-window' alt-shift-5 = 'move-node-to-workspace 5 --focus-follows-window' -alt-shift-6 = 'move-node-to-workspace 6 --focus-follows-window' alt-tab = 'workspace-back-and-forth' alt-shift-tab = 'move-workspace-to-monitor --wrap-around next' @@ -156,7 +155,7 @@ alt-shift-semicolon = 'mode service' alt-shift-enter = 'mode apps' alt-s = 'exec-and-forget open -a /Applications/Safari.app' - +alt-p = 'exec-and-forget open -a /Applications/Launchpad.app' # 'service' binding mode declaration. # See: https://nikitabobko.github.io/AeroSpace/guide#binding-modes @@ -167,4 +166,4 @@ f = ['layout floating tiling', 'mode main'] # Toggle between floating and tiling backspace = ['close-all-windows-but-current', 'mode main'] [mode.apps.binding] -alt-q = ['exec-and-forget open -a /Applications/Kitty.app', 'mode main'] \ No newline at end of file +# alt-q = ['exec-and-forget open -a /Applications/Kitty.app', 'mode main'] \ No newline at end of file