nix-config/macos/desktop.nix

132 lines
4.7 KiB
Nix
Raw Permalink Normal View History

{ config, pkgs, ... }:
let choose-pass = pkgs.callPackage ./choose-pass.nix { inherit config pkgs; };
in {
2022-07-11 15:21:47 +02:00
# services.yabai = {
# enable = true;
# package = pkgs.yabai;
# # enableScriptingAddition = true;
# enableScriptingAddition = false;
# config = {
# external_bar = "all:28:0";
# layout = "bsp";
# auto_balance = "off";
# mouse_modifier = "fn";
# mouse_action1 = "move";
# mouse_action2 = "resize";
# mouse_follows_focus = "on";
# focus_follows_mouse = "autoraise";
# window_topmost = "on"; # floating windows always on top
# window_shadow = "float";
# window_opacity = "on";
# active_window_opacity = "1.0";
# normal_window_opacity = "1.0";
# window_border = "on";
# window_border_width = 8;
# active_window_border_color = "0xff458588";
# normal_window_border_color = "0xff504945";
# };
# extraConfig = ''
# yabai -m rule --add app="^choose" manage=off
# '';
# };
services.skhd = {
enable = true;
package = pkgs.skhd;
skhdConfig = ''
# ctrl + alt - return : osascript /Users/rilla/configs/scripts/osascripts/iterm.scpt
ctrl + alt - return : ${pkgs.alacritty}/bin/alacritty
ctrl + alt - 1 : yabai -m space --focus 1
ctrl + alt - 2 : yabai -m space --focus 2
ctrl + alt - 3 : yabai -m space --focus 3
ctrl + alt - 4 : yabai -m space --focus 4
ctrl + alt - 5 : yabai -m space --focus 5
ctrl + alt - 6 : yabai -m space --focus 6
ctrl + alt - 7 : yabai -m space --focus 7
ctrl + alt - 8 : yabai -m space --focus 8
ctrl + alt - 9 : yabai -m space --focus 9
ctrl + alt - 0 : yabai -m space --focus 10
ctrl + alt - n : yabai -m window --focus next || yabai -m window --focus first
ctrl + alt - p : yabai -m window --focus prev || yabai -m window --focus last
ctrl + alt + shift - r : yabai -m space --rotate 90
ctrl + alt + shift - 1 : yabai -m window --space 1
ctrl + alt + shift - 2 : yabai -m window --space 2
ctrl + alt + shift - 3 : yabai -m window --space 3
ctrl + alt + shift - 4 : yabai -m window --space 4
ctrl + alt + shift - 5 : yabai -m window --space 5
ctrl + alt + shift - 6 : yabai -m window --space 6
ctrl + alt + shift - 7 : yabai -m window --space 7
ctrl + alt + shift - 8 : yabai -m window --space 8
ctrl + alt + shift - 9 : yabai -m window --space 9
2022-02-21 17:54:54 +01:00
ctrl + alt + shift - 0 : yabai -m window --space 10
# ctrl + alt + shift - space : yabai -m space --balance
ctrl + alt - space : yabai -m space --layout $(yabai -m query --spaces --space | jq -r 'if .["type"] == "bsp" then "float" else "bsp" end')
ctrl + alt - b : yabai -m space --balance
ctrl + alt + shift - space : yabai -m space --layout bsp
# ctrl + alt + shift - c : yabai -m window --close
ctrl + alt - right : yabai -m space --focus next || yabai -m space --focus first
ctrl + alt - left : yabai -m space --focus prev || yabai -m space --focus last
ctrl + alt - h : yabai -m window --focus west
ctrl + alt - l : yabai -m window --focus east
ctrl + alt - j : yabai -m window --focus south
ctrl + alt - k : yabai -m window --focus north
ctrl + alt + shift - h : yabai -m window --swap west
ctrl + alt + shift - l : yabai -m window --swap east
ctrl + alt + shift - j : yabai -m window --swap south
ctrl + alt + shift - k : yabai -m window --swap north
2022-02-21 17:54:54 +01:00
ctrl + alt - w : yabai -m display --focus 1
ctrl + alt - e : yabai -m display --focus 2
ctrl + alt - g : yabai -m space --toggle gap && yabai -m space --toggle padding
ctrl + alt - x : yabai -m space --mirror y-axis
ctrl + alt - y : yabai -m space --mirror x-axis
ctrl + alt - m : yabai -m window --toggle zoom-fullscreen
ctrl + alt - t : yabai -m window --toggle float
:: choose
ctrl + alt - a ; choose
choose < p : skhd -k 'escape'; ${choose-pass}/bin/choose-pass
choose < escape ; default
play : ${pkgs.mpc_cli}/bin/mpc toggle
'';
};
2022-07-11 15:21:47 +02:00
# services.spacebar = {
# enable = true;
# package = pkgs.spacebar;
# config = {
# position = "top";
# height = 28;
# spacing_left = 25;
# spacing_right = 25;
# text_font = ''"Inter:Regular:12.0"'';
# icon_font = ''"Font Awesome 5 Free:Solid:12.0"'';
# background_color = "0xff282828";
# foreground_color = "0xffebdbb2";
# space_icon_color = "0xff83a598";
# space_icon = "•";
# space_icon_strip = "1 2 3 4 5 6 7 8 9 10";
# power_icon_strip = " ";
# clock_icon = "";
# clock_format = ''"%d/%m/%y %R"'';
# };
# };
}