Skip to content

Commit

Permalink
refactor: remove symlink config for yabai and skhd
Browse files Browse the repository at this point in the history
  • Loading branch information
solidsnakedev committed Oct 20, 2023
1 parent f7bc12e commit 9ff4976
Showing 1 changed file with 29 additions and 104 deletions.
133 changes: 29 additions & 104 deletions home-manager/mac/home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
gnumake
bore-cli
magic-wormhole-rs
commitizen
];


Expand Down Expand Up @@ -82,110 +83,34 @@

};

xdg.configFile."yabai/yabairc".text = ''
# bsp or float (default: float)
yabai -m config layout bsp
# on or off (default: off)
yabai -m config auto_balance on
# New window spawns to the right if vertical split, or bottom if horizontal split
yabai -m config window_placement second_child
# Set all padding and gaps to 20pt (default: 0)
yabai -m config top_padding 12
yabai -m config bottom_padding 12
yabai -m config left_padding 12
yabai -m config right_padding 12
yabai -m config window_gap 12
# set mouse follows focus mode (default: off)
yabai -m config mouse_follows_focus on
yabai -m config focus_follows_mouse off
yabai -m config mouse_drop_action swap
# set mouse interaction modifier key (default: fn)
yabai -m config mouse_modifier alt
# set modifier + left-click drag to move window (default: move)
yabai -m config mouse_action1 move
# set modifier + right-click drag to resize window (default: resize)
yabai -m config mouse_action2 resize
# float system preferences
yabai -m rule --add app="^System Settings$" manage=off
yabai -m rule --add app="^Calculator$" manage=off
yabai -m rule --add app="^Activity Monitor$" manage=off
yabai -m rule --add app="^Mail$" manage=off
yabai -m rule --add app="^PenTablet$" manage=off
yabai -m rule --add app="^Spotify$" manage=off
yabai -m rule --add app="^zoom.us$" manage=off
yabai -m rule --add app="^Calendar$" manage=off
'';

xdg.configFile."skhd/skhdrc".text = ''
alt - j : yabai -m window --focus south
alt - k : yabai -m window --focus north
alt - h : yabai -m window --focus west
alt - l : yabai -m window --focus east
# rotate layout clocwise
shift + alt - r : yabai -m space --rotate 270
# swap layout
shift + alt - s : yabai -m window --swap recent
# maximize a window
shift + alt - m : yabai -m window --toggle zoom-fullscreen
# float / unfloat window and center on screen
shift + alt - t : yabai -m window --toggle float --grid 4:4:1:1:2:2
# Move focus container to workspace
shift + alt - n : yabai -m window --space next; yabai -m space --focus next
# increase window size
shift + alt - h : yabai -m window --resize left:-20:0; yabai -m window --resize right:20:0
shift + alt - j : yabai -m window --resize bottom:0:20
shift + alt - k : yabai -m window --resize top:0:-20
shift + alt - l : yabai -m window --resize right:-20:0; yabai -m window --resize left:20:0
# open iterm
alt - return : open -na /Applications/iTerm.app
'';

# programs.zsh = {
# enable = true;
# shellAliases = {
# ll = "ls -l";
# # update = "sudo nixos-rebuild switch";
# };
# history = {
# size = 10000;
# path = "${config.xdg.dataHome}/zsh/history";
# };
# enableVteIntegration = true;
# # zplug = {
# # enable = true;
# # plugins = [
# # { name = "zsh-users/zsh-autosuggestions"; } # Simple plugin installation
# # { name = "romkatv/powerlevel10k"; tags = [ as:theme depth:1 ]; } # Installations with additional options. For the list of options, please refer to Zplug README.
# # ];
# # };
# };


imports = [
# ./../common-modules/fish.nix
./../common-modules/direnv.nix
./../common-modules/git.nix
./../common-modules/tmux.nix
./../common-modules/bat.nix
./local-modules/neovim.nix
# programs.zsh = {
# enable = true;
# shellAliases = {
# ll = "ls -l";
# # update = "sudo nixos-rebuild switch";
# };
# history = {
# size = 10000;
# path = "${config.xdg.dataHome}/zsh/history";
# };
# enableVteIntegration = true;
# # zplug = {
# # enable = true;
# # plugins = [
# # { name = "zsh-users/zsh-autosuggestions"; } # Simple plugin installation
# # { name = "romkatv/powerlevel10k"; tags = [ as:theme depth:1 ]; } # Installations with additional options. For the list of options, please refer to Zplug README.
# # ];
# # };
# };


imports = [
# ./../common-modules/fish.nix
./../common-modules/direnv.nix
./../common-modules/git.nix
./../common-modules/tmux.nix
./../common-modules/bat.nix
./local-modules/neovim.nix
];

}

0 comments on commit 9ff4976

Please sign in to comment.