[SUMIREKO] WM changes

This commit is contained in:
Kat Inskip 2023-03-03 09:56:30 -08:00
parent d2d403fef8
commit 9e95df4dd8
Signed by: kat
GPG key ID: 465E64DECEA8CF0F
6 changed files with 85 additions and 8 deletions

View file

@ -5,7 +5,7 @@ in {
enable = true; enable = true;
skhdConfig = let skhdConfig = let
bindWorkspace = key: workspace: '' bindWorkspace = key: workspace: ''
alt - ${key} : yabai -m space --focus ${workspace} ctrl + alt - ${key} : yabai -m space --focus ${workspace}
shift + alt - ${key} : yabai -m window --space ${workspace} shift + alt - ${key} : yabai -m window --space ${workspace}
''; '';
workspaceBindings = string.concat (list.map (v: bindWorkspace v "${v}") (list.map builtins.toString (list.range 1 9)) workspaceBindings = string.concat (list.map (v: bindWorkspace v "${v}") (list.map builtins.toString (list.range 1 9))
@ -62,8 +62,10 @@ in {
# workspace prev/next - w # workspace prev/next - w
alt - w : yabai -m space --focus prev alt - w : yabai -m space --focus prev
alt + shift - w : yabai -m space --focus next alt + shift - w : yabai -m space --focus next
alt + ctrl - w : yabai -m window --display next alt + ctrl - w : yabai -m window --output next
ctrl + shift - w : yabai -m window --display prev ctrl + shift - w : yabai -m window --output prev
alt - p : yabai -m window --focus stack.prev || yabai -m window --focus prev || yabai -m window --focus last
alt - n : yabai -m window --focus stack.next || yabai -m window --focus next || yabai -m window --focus first
# split managent - a # split managent - a
alt - a : yabai -m window --toggle split alt - a : yabai -m window --toggle split
@ -72,9 +74,9 @@ in {
alt - r : yabai -m space --balance alt - r : yabai -m space --balance
# layout handling (spaces) - t # layout handling (spaces) - t
alt - t : yabai -m space -- layout stack alt - t : yabai -m space --layout stack
alt + shift - t : yabai -m space -- layout bsp alt + shift - t : yabai -m space --layout bsp
alt + ctrl - t : yabai -m space -- layout float alt + ctrl - t : yabai -m space --layout float
# layout handling (windows) - p # layout handling (windows) - p
alt - p : yabai -m window --toggle float alt - p : yabai -m window --toggle float

View file

@ -10,7 +10,7 @@
# modules # modules
spaces = "on"; spaces = "on";
space_icon_strip = " 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22"; space_icon_strip = " ? 11 12 13 14 15 16 17 18 19 20 21 22";
spaces_for_all_displays = "on"; spaces_for_all_displays = "on";
title = "off"; title = "off";
clock = "on"; clock = "on";

10
darwin/wm/stackline.nix Normal file
View file

@ -0,0 +1,10 @@
{pkgs, ...}: {
homebrew.casks = [
"hammerspoon"
];
system.defaults.CustomUserPreferences = {
"org.hammerspoon.Hammerspoon" = {
MJConfigFile = "${pkgs.stackline}/init.lua";
};
};
}

View file

@ -19,7 +19,7 @@ _: {
window_border_hidpi = "on"; window_border_hidpi = "on";
# focus # focus
focus_follows_mouse = "autoraise"; focus_follows_mouse = "off";
mouse_follows_focus = "off"; mouse_follows_focus = "off";
# window # window
@ -35,11 +35,52 @@ _: {
}; };
extraConfig = '' extraConfig = ''
# spaces
function setup_space {
local idx="$1"
local name="$2"
local space=
echo "setup space $idx : $name"
space=$(yabai -m query --spaces --space "$idx")
if [ -z "$space" ]; then
yabai -m space --create
fi
yabai -m space "$idx" --label "$name"
}
setup_space 1 work
setup_space 2 chat
setup_space 3 www
setup_space 4 code
setup_space 5 term
setup_space 6 music
setup_space 7 brain
setup_space 8 office
setup_space 9 email
setup_space 10 misc
# rules # rules
yabai -m rule --add app='System Preferences' manage=off yabai -m rule --add app='System Preferences' manage=off
yabai -m rule --add app='Yubico Authenticator' manage=off yabai -m rule --add app='Yubico Authenticator' manage=off
yabai -m rule --add app='YubiKey Manager' manage=off yabai -m rule --add app='YubiKey Manager' manage=off
yabai -m rule --add app='YubiKey Personalization Tool' manage=off yabai -m rule --add app='YubiKey Personalization Tool' manage=off
yabai -m rule --add app="^Slack$" space=1
yabai -m rule --add app="^Microsoft Teams$" space=1
yabai -m rule --add app="^Discord$" space=2
yabai -m rule --add app="^Element$" space=2
yabai -m rule --add app="^Telegram Desktop$" space=2
yabai -m rule --add app="^Brave Browser$" space=^3
yabai -m rule --add app="^Orion$" space=^3
yabai -m rule --add app="^VSCodium$" space=^4
yabai -m rule --add app="^Spotify$" space=6
yabai -m rule --add app="^Obsidian$" space=7
yabai -m rule --add app="^Microsoft Word$" space=8
yabai -m rule --add app="^Microsoft Powerpoint$" space=8
yabai -m rule --add app="^Microsoft Excel$" space=8
yabai -m rule --add app="^Microsoft Outlook$" space=9
yabai -m rule --add app="^Calendar$" space=9
yabai -m rule --add app="^Mail$" space=9
# signals # signals
yabai -m signal --add event=window_focused action="sketchybar --trigger window_focus" yabai -m signal --add event=window_focused action="sketchybar --trigger window_focus"

View file

@ -14,6 +14,7 @@
userSettings = { userSettings = {
"nix.enableLanguageServer" = true; "nix.enableLanguageServer" = true;
"workbench.colorTheme" = "Quiet Light"; "workbench.colorTheme" = "Quiet Light";
"editor.suggest.preview" = true;
"[nix]" = { "[nix]" = {
"editor.defaultFormatter" = "kamadorueda.alejandra"; "editor.defaultFormatter" = "kamadorueda.alejandra";
"editor.formatOnPaste" = true; "editor.formatOnPaste" = true;
@ -23,6 +24,9 @@
"alejandra.program" = "${pkgs.alejandra}/bin/alejandra"; "alejandra.program" = "${pkgs.alejandra}/bin/alejandra";
"editor.fontFamily" = ''"Iosevka", "Font Awesome 6 Free", "Font Awesome 6 Brands"''; "editor.fontFamily" = ''"Iosevka", "Font Awesome 6 Free", "Font Awesome 6 Brands"'';
"editor.fontLigatures" = true; "editor.fontLigatures" = true;
"terraform.experimentalFeatures.prefillRequiredFields" = true;
"terraform.experimentalFeatures.validateOnSave" = true;
"terraform.codelens.referenceCount" = true;
}; };
}; };
} }

20
packages/stackline.nix Normal file
View file

@ -0,0 +1,20 @@
{
stdenv,
fetchFromGitHub,
}:
stdenv.mkDerivation rec {
pname = "stackline";
version = "2022-11-29";
src = fetchFromGitHub {
owner = "AdamWagner";
repo = "stackline";
rev = "2aa0bd9a27f93bad24b0fd4da38f3c0356414098";
sha256 = "sha256-x7SIgKR6rwkoVVbaAvjFr1N7wTF3atni/d6xGLBBRN4=";
};
installPhase = ''
mkdir -p $out
mv ./* $out/
'';
}