diff --git a/flake.nix b/flake.nix index 9f726e4..c2ac45a 100644 --- a/flake.nix +++ b/flake.nix @@ -92,7 +92,7 @@ ./modules/games/darwin.nix ./modules/applications/darwin.nix ./modules/desktop/de/darwin.nix - ./modules/desktop/de/yabai.nix + ./modules/desktop/de/aerospace.nix ./modules/desktop/programs/sketchybar.nix ./modules/hardware/darwin.nix ./modules/nix/darwin.nix diff --git a/modules/desktop/de/yabai.nix b/modules/desktop/de/yabai.nix deleted file mode 100644 index fea6961..0000000 --- a/modules/desktop/de/yabai.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ config, pkgs, lib, ... }: - -{ - services.yabai = { - enable = true; - enableScriptingAddition = true; - extraConfig = builtins.readFile ../../../stow/.config/yabai/yabairc; - }; - - system.defaults.spaces.spans-displays = lib.mkForce false; - - environment.systemPackages = with pkgs; [ - skhd - matugen - ]; - - homebrew.brews = [ - "FelixKratz/formulae/borders" - ]; -} diff --git a/stow/.config/nvim/lazy-lock.json b/stow/.config/nvim/lazy-lock.json index a9248d3..3317892 100644 --- a/stow/.config/nvim/lazy-lock.json +++ b/stow/.config/nvim/lazy-lock.json @@ -5,7 +5,7 @@ "friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" }, "fzf-lua": { "branch": "main", "commit": "db3ccffe79480543d8e0f7b0cac0d9b220f9486e" }, "gitsigns.nvim": { "branch": "main", "commit": "1ee5c1fd068c81f9dd06483e639c2aa4587dc197" }, - "lazy-lsp.nvim": { "branch": "master", "commit": "d74741ce1a588fe11900b5bcd5cd160b04998f60" }, + "lazy-lsp.nvim": { "branch": "master", "commit": "5ea87155f84629b0bd90853a0d035422d7acd3a5" }, "lazy.nvim": { "branch": "main", "commit": "1ea3c4085785f460fb0e46d2fe1ee895f5f9e7c1" }, "lualine.nvim": { "branch": "master", "commit": "b8c23159c0161f4b89196f74ee3a6d02cdc3a955" }, "mini.icons": { "branch": "main", "commit": "284798619aed9f4c1ac1b9417b9a5e3b4b85ef3a" }, diff --git a/stow/.config/nvim/lua/nico/lazy/lsp.lua b/stow/.config/nvim/lua/nico/lazy/lsp.lua index 234326d..314905b 100644 --- a/stow/.config/nvim/lua/nico/lazy/lsp.lua +++ b/stow/.config/nvim/lua/nico/lazy/lsp.lua @@ -6,9 +6,7 @@ return { }, config = function() require("fidget").setup {} - require("lazy-lsp").setup { - use_vim_lsp_config = true - } + require("lazy-lsp").setup {} vim.lsp.enable({ 'gopls', -- go diff --git a/stow/.config/sketchybar/plugins/space.sh b/stow/.config/sketchybar/plugins/space.sh deleted file mode 120000 index 9836491..0000000 --- a/stow/.config/sketchybar/plugins/space.sh +++ /dev/null @@ -1 +0,0 @@ -aerospace.sh \ No newline at end of file diff --git a/stow/.config/sketchybar/plugins/space.sh b/stow/.config/sketchybar/plugins/space.sh new file mode 100755 index 0000000..b9bf8f6 --- /dev/null +++ b/stow/.config/sketchybar/plugins/space.sh @@ -0,0 +1,13 @@ +#!/usr/local/bin/bash + +# The $SELECTED variable is available for space components and indicates if +# the space invoking this script (with name: $NAME) is currently selected: +# https://felixkratz.github.io/SketchyBar/config/components#space----associate-mission-control-spaces-with-an-item + +#sketchybar --set "$NAME" background.drawing="$SELECTED" + +if [ $SELECTED = 'true' ]; then + sketchybar --set "$NAME" background.color=0xfff48fb1 +else + sketchybar --set "$NAME" background.color=0xffffffff +fi diff --git a/stow/.config/sketchybar/sketchybarrc b/stow/.config/sketchybar/sketchybarrc index 3f89abf..60e45a2 100755 --- a/stow/.config/sketchybar/sketchybarrc +++ b/stow/.config/sketchybar/sketchybarrc @@ -66,32 +66,6 @@ for sid in $(aerospace list-workspaces --all); do done # background.corner_radius=0 \ - - -# Yabai Workspace Indictators -# -SPACE_ICONS=("1" "2" "3" "4" "5" "6" "7" "8" "9") -for i in "${!SPACE_ICONS[@]}" -do - sid="$(($i+1))" - space=( - space="$sid" - icon="${SPACE_ICONS[i]}" - background.drawing=true \ - icon.drawing=false \ - background.height=28 \ - background.border_width=0 \ - background.padding_right=0 \ - background.padding_left=0 \ - label.color=$PRIMARY_COLOUR \ - label="$sid" \ - script="$PLUGIN_DIR/space.sh" - click_script="yabai -m space --focus $sid" - ) - sketchybar --add space space."$sid" left --set space."$sid" "${space[@]}" -done - - # Focused window title sketchybar --add item front_app left \ --set front_app icon="󱂬 " \ diff --git a/stow/.config/skhd/skhdrc b/stow/.config/skhd/skhdrc index efd256d..7a22dd5 100644 --- a/stow/.config/skhd/skhdrc +++ b/stow/.config/skhd/skhdrc @@ -1,52 +1,2 @@ -# -# Applications -# - -alt + shift - b : /Applications/Zen.app/Contents/MacOS/zen --new-window # new browser window -alt - s : screencapture -i -c # screenshot -alt + shift - f : open ~ # new finder window - -# -# Yabai -# - -# Workspaces -alt - 1 : yabai -m space --focus 1 -alt - 2 : yabai -m space --focus 2 -alt - 3 : yabai -m space --focus 3 -alt - 4 : yabai -m space --focus 4 -alt - 5 : yabai -m space --focus 5 -alt - 6 : yabai -m space --focus 6 -alt - 7 : yabai -m space --focus 7 -alt - 8 : yabai -m space --focus 8 -alt - 9 : yabai -m space --focus 9 - -alt + shift - 1 : yabai -m window --space 1 --focus -alt + shift - 2 : yabai -m window --space 2 --focus -alt + shift - 3 : yabai -m window --space 3 --focus -alt + shift - 4 : yabai -m window --space 4 --focus -alt + shift - 5 : yabai -m window --space 5 --focus -alt + shift - 6 : yabai -m window --space 6 --focus -alt + shift - 7 : yabai -m window --space 7 --focus -alt + shift - 8 : yabai -m window --space 8 --focus -alt + shift - 9 : yabai -m window --space 9 --focus - -# Focus next space by mission-control index if one exists, otherwise focus the first space -alt - home : yabai -m space --focus next || yabai -m space --focus first -# Focus previous space by mission-control index if one exists, otherwise focus the last space -alt - end : yabai -m space --focus prev || yabai -m space --focus last - -# Layout/Focus -alt - c : yabai -m space --rotate 90 -alt - f : yabai -m window --toggle zoom-fullscreen -alt - space : yabai -m window --toggle float - -alt - h : yabai -m window --focus west -alt - j : yabai -m window --focus south -alt - k : yabai -m window --focus north -alt - l : yabai -m window --focus east - -alt + shift - h : yabai -m window --swap west -alt + shift - j : yabai -m window --swap south -alt + shift - k : yabai -m window --swap north -alt + shift - l : yabai -m window --swap east +alt + shift - b : /opt/homebrew/bin/firefox --new-window +alt + shift - f : open ~ diff --git a/stow/.config/yabai/yabairc b/stow/.config/yabai/yabairc deleted file mode 100644 index 371c12f..0000000 --- a/stow/.config/yabai/yabairc +++ /dev/null @@ -1,64 +0,0 @@ -# Scripting Addon -# https://github.com/koekeishiya/yabai/wiki/Installing-yabai-(latest-release)#configure-scripting-addition - -yabai -m signal --add event=dock_did_restart action="sudo yabai --load-sa" -sudo yabai --load-sa - - -# Remove existing signals (in case of restart) -yabai -m signal --remove "sketchybar_space_change" 2>/dev/null -yabai -m signal --remove "sketchybar_front_app" 2>/dev/null - -# Sketchybar Intergration -yabai -m signal --add event=space_changed action="sketchybar --trigger space_change" label="sketchybar_space_change" -yabai -m signal --add event=window_focused action="sketchybar --trigger front_app_switched" label="sketchybar_front_app" - -# autostart -sketchybar & disown -borders & disown -sh ~/.cache/matugen-jankyborders.sh & disown -skhd & disown - -# space labels -yabai -m space 1 --label browser -yabai -m space 2 --label terminal -yabai -m space 3 --label spare -yabai -m space 4 --label gaming -yabai -m space 5 --label social -yabai -m space 6 --label music - -# layout -yabai -m config layout bsp -yabai -m config split_ratio 0.5 - -# padding -yabai -m config top_padding 6 -yabai -m config bottom_padding 12 -yabai -m config left_padding 12 -yabai -m config right_padding 12 -yabai -m config window_gap 12 - -# mouse support -yabai -m config mouse_modifier alt # set mouse interaction modifier key -yabai -m config mouse_action1 move # set modifier + left-click drag to move window -yabai -m config mouse_action2 resize # set modifier + right-click drag to resize window -yabai -m config focus_follows_mouse autofocus # disabled while holding mouse modifier (eg. for menubar) -yabai -m config mouse_follows_focus on - -# appearance -yabai -m config window_shadow float # window shadow only on floating windows - -yabai -m config window_opacity on -yabai -m config active_window_opacity 1.0 -yabai -m config normal_window_opacity 0.95 - -# window rules -yabai -m rule --add app="^(Calculator|System Preferences|System Settings|Archive Utility)$" manage=off -yabai -m rule --add title="^Preferences" manage=off -yabai -m rule --add title="^Settings" manage=off -yabai -m rule --add app="^Steam$" manage=off -yabai -m rule --add app="^Weather$" manage=off -# Anki card preview & Anki browser -yabai -m rule --add title="^Preview" manage=off -yabai -m rule --add title="^Anki" manage=off -yabai -m rule --add title="^Browse" manage=off