Skip to content

Commit

Permalink
chore: latest changes
Browse files Browse the repository at this point in the history
  • Loading branch information
gilacost committed Oct 30, 2024
1 parent 01dc686 commit b68c949
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 47 deletions.
40 changes: 7 additions & 33 deletions conf.d/skhdrc
Original file line number Diff line number Diff line change
@@ -1,40 +1,14 @@
# launchers

cmd - return : /Applications/kitty.app/Contents/MacOS/kitty --session ~/.config/nvim.session -d ~/Repos

cmd + ctrl - f : open -n -a /Applications/Firefox.app

# move window
cmd + ctrl - h : yabai -m window --warp west || { yabai -m window --display west && yabai -m display --focus west }
cmd + ctrl - j : yabai -m window --warp south || { yabai -m window --display south && yabai -m display --focus south }
cmd + ctrl - k : yabai -m window --warp north || { yabai -m window --display north && yabai -m display --focus north }
cmd + ctrl - l : yabai -m window --warp east || { yabai -m window --display east && yabai -m display --focus east }

## balance size of windows
shift + alt - 0 : yabai -m space --balance

## fast focus desktop
#cmd + ctrl - tab : yabai -m space --focus recent
#cmd + ctrl - p : yabai -m space --focus prev
#cmd + ctrl - n : yabai -m space --focus next
#cmd + ctrl - 1 : yabai -m space --focus 1
#cmd + ctrl - 2 : yabai -m space --focus 2
#cmd + ctrl - 3 : yabai -m space --focus 3
#cmd + ctrl - 4 : yabai -m space --focus 4
#cmd + ctrl - 5 : yabai -m space --focus 5
#cmd + ctrl - 6 : yabai -m space --focus 6
#cmd + ctrl - 7 : yabai -m space --focus 7
#cmd + ctrl - 8 : yabai -m space --focus 8
#cmd + ctrl - 9 : yabai -m space --focus 9
#cmd + ctrl - 0 : yabai -m space --focus 10
# caps_lock - single : escape
# caps_lock - hold : ctrl

# send window to desktop and follow focus
alt + cmd + ctrl - tab : yabai -m window --space recent; yabai -m space --focus recent
alt + cmd + ctrl - left : yabai -m window --space prev; yabai -m space --focus prev
alt + cmd + ctrl - right : yabai -m window --space next; yabai -m space --focus next
# tab - single : left_option
# # Tab will behave normally when used with other keys
# tab - held : tab

## toggle window split type
cmd + ctrl - e : yabai -m window --toggle split
#
## float / unfloat window and center on screen
cmd + ctrl - space : yabai -m window --toggle float; yabai -m window --grid 4:4:1:1:2:2
# left_option : alt
# right_option : alt
37 changes: 28 additions & 9 deletions darwin-configuration.nix
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:

{

environment.shells = [ pkgs.zsh ];
# https://github.com/LnL7/nix-darwin/issues/165
environment.etc = {
"sudoers.d/10-nix-commands".text = ''
%admin ALL=(ALL:ALL) NOPASSWD: /run/current-system/sw/bin/*, \
/Users/pepo/.nix-profile/bin/nix, \
/usr/local/bin/*, \
/opt/homebrew/bin/*, \
/nix/store/*/activate, \
/bin/launchctl
%admin ALL=(ALL:ALL) NOPASSWD: /run/current-system/sw/bin/*, \
/Users/pepo/.nix-profile/bin/nix, \
/usr/local/bin/*, \
/opt/homebrew/bin/*, \
/nix/store/*/activate, \
/bin/launchctl
'';
};

Expand All @@ -32,7 +37,12 @@

nix = {
configureBuildUsers = true;
settings = { trusted-users = [ "root" "pepo" ]; };
settings = {
trusted-users = [
"root"
"pepo"
];
};
package = pkgs.nixVersions.latest;
extraOptions = ''
experimental-features = nix-command flakes
Expand Down Expand Up @@ -224,6 +234,7 @@
# }'
enableKeyMapping = true;
userKeyMapping = [
# Other mappings
({
HIDKeyboardModifierMappingSrc = 30064771129;
HIDKeyboardModifierMappingDst = 30064771296;
Expand Down Expand Up @@ -269,9 +280,17 @@
lockfiles = true;
};

brews = [ "qemu" "mas" "asciinema" "fwup" "coreutils" "ansible" ];
brews = [
"qemu"
"mas"
"asciinema"
"fwup"
"coreutils"
"ansible"
];

casks = [
"raspberry-pi-imager"
"logitech-presentation"
"postman"
"tableplus"
Expand Down
4 changes: 3 additions & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ fi
# (if M1) softwareupdate --install-rosetta --agree-to-license

mkdir -p "$HOME/.config/kitty"
mkdir -p "$HOME/.config/zellij"

SCRIPT_DIR=$(dirname "$0")

Expand All @@ -31,7 +32,8 @@ SCRIPT_DIR=$(dirname "$0")

# TODO move this to nix
ln -s "$HOME/Repos/$SCRIPT_DIR/conf.d/terminal/nvim.session" "$HOME/.config/nvim.session"
ln -s "$HOME/Repos/$SCRIPT_DIR/conf.d/terminal/kitty.conf" "$HOME/.config/kitty/kitty.conf"
ln -s "$HOME/Repos/$SCRIPT_DIR/conf.d/terminal" "$HOME/.config/kitty/kitty.conf"
ln -s "$HOME/Repos/$SCRIPT_DIR/conf.d/zellij" "$HOME/.config/zellij"
ln -s "$HOME/Repos/$SCRIPT_DIR/spell" "$HOME/.config/nvim"

# TODO check hostname?
Expand Down
4 changes: 2 additions & 2 deletions modules/editor/nvim/telescope.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
local actions = require('telescope.actions')
local trouble = require("trouble.providers.telescope")
local trouble = require("trouble.sources.telescope")
local telescope = require("telescope")

telescope.setup {
Expand All @@ -11,7 +11,7 @@ telescope.setup {
["<C-k>"] = actions.move_selection_previous,
},
n = {
["<c-t>"] = trouble.open_with_trouble,
["<c-t>"] = trouble.open,
["q"] = actions.close,
},
},
Expand Down
2 changes: 1 addition & 1 deletion modules/git/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ in {

signing = {
key = gitconfig.gpgKey;
signByDefault = true;
signByDefault = false;
};

extraConfig = {
Expand Down
1 change: 1 addition & 0 deletions modules/tools/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
home.packages = with pkgs; [

nixos-generators
kas
neovim-remote
tree-sitter
p7zip
Expand Down
1 change: 1 addition & 0 deletions spell/en.utf-8.add
Original file line number Diff line number Diff line change
Expand Up @@ -3361,3 +3361,4 @@ brightsign
feedPool
comunity
version
impl
2 changes: 1 addition & 1 deletion spell/init.lua

0 comments on commit b68c949

Please sign in to comment.