Configuration files for my GNU/Linux installation.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
dotfiles/nix-darwin/modules/yabai.nix

42 lines
1.2 KiB

{ config, pkgs, ... }:
let
split_ratio = "0.50";
4 months ago
gap_padding = "0";
in
{
# Create configuration files for yabai and skhd
home.file.".yabairc" = {
executable = true;
text = ''
#!/usr/bin/env sh
# load scripting addition
sudo yabai --load-sa
yabai -m signal --add event=dock_did_restart action="sudo yabai --load-sa"
# global settings
yabai -m config layout bsp
yabai -m config window_placement second_child
yabai -m config split_ratio ${split_ratio}
yabai -m config auto_balance on
# Set all padding and gaps
yabai -m config top_padding ${gap_padding}
yabai -m config bottom_padding ${gap_padding}
yabai -m config left_padding ${gap_padding}
yabai -m config right_padding ${gap_padding}
yabai -m config window_gap ${gap_padding}
# mouse stuff
# yabai -m config mouse_follows_focus on
4 months ago
yabai -m config focus_follows_mouse autofocus
4 months ago
# Move window with mouse
yabai -m config mouse_modifier cmd
yabai -m config mouse_action1 move
yabai -m config mouse_action2 resize
'';
};
}