1
0
Fork 0

amethyst, nvim: updates

This commit is contained in:
Daniel Kempkens 2024-06-18 00:02:32 +02:00
parent b90d4fd9ca
commit fe986aec3b
Signed by: daniel
SSH key fingerprint: SHA256:Ks/MyhQYcPRQiwMKLAKquWCdCPe3JXlb1WttgnAoSeM
7 changed files with 106 additions and 65 deletions

View file

@ -7,7 +7,7 @@
statusline (require :nifoc.statusline)
diagnostic vim.diagnostic
gitsigns (require :gitsigns)
gitsigns-ns (api.nvim_create_namespace :gitsigns_extmark_signs_)
gitsigns-ns (api.nvim_create_namespace :gitsigns_signs_)
augroup (vim.api.nvim_create_augroup :NifocStatuscolumn {:clear true})
aucmd vim.api.nvim_create_autocmd]
;; Cache

View file

@ -15,6 +15,7 @@ in
../programs/starship.nix
../programs/zoxide.nix
../programs/amethyst.nix
../programs/wezterm.nix
../programs/nvim

View file

@ -1,61 +0,0 @@
{ pkgs, lib, ... }:
let
settingsFormat = pkgs.formats.toml { };
settings = {
start-at-login = true;
enable-normalization-flatten-containers = false;
enable-normalization-opposite-orientation-for-nested-containers = false;
default-root-container-layout = "tiles";
default-root-container-orientation = "auto";
gaps = {
inner = {
horizontal = 10;
vertical = 10;
};
outer = {
left = 10;
bottom = 10;
top = 10;
right = 10;
};
};
key-mapping = {
preset = "qwerty";
};
mode.main.binding =
let
meh = "ctrl-alt-shift";
in
{
"${meh}-h" = "move left";
"${meh}-j" = "move down";
"${meh}-k" = "move up";
"${meh}-l" = "move right";
"${meh}-w" = "move-node-to-monitor --wrap-around left";
"${meh}-e" = "move-node-to-monitor --wrap-around right";
"${meh}-f" = "fullscreen";
"${meh}-t" = "layout floating tiling";
};
};
in
{
home.packages = [ pkgs.aerospace ];
xdg.configFile."aerospace/aerospace.toml".source = settingsFormat.generate "aerospace.toml" settings;
home.activation.aeorspaceConfig = lib.hm.dag.entryAfter [ "writeBoundary" ] /* bash */ ''
$VERBOSE_ECHO "Reloading configuration"
$DRY_RUN_CMD ${pkgs.aerospace}/bin/aerospace reload-config
'';
}

View file

@ -0,0 +1,97 @@
{ pkgs, ... }:
let
settingsFormat = pkgs.formats.yaml { };
window_padding = 5;
disable-keybinding = { mod = ""; key = ""; };
settings = {
# Settings
layouts = [
"tall"
"fullscreen"
"wide"
"two-pane"
"column"
];
enables-layout-hud = true;
enables-layout-hud-on-space-change = true;
disable-padding-on-builtin-display = false;
window-margins = true;
smart-window-margins = true;
window-margin-size = window_padding;
window-resize-step = 5;
screen-padding-left = 0;
screen-padding-right = 0;
screen-padding-top = 0;
screen-padding-bottom = 0;
window-max-count = 0;
window-minimum-height = 0;
window-minimum-width = 0;
floating-is-blacklist = true;
float-small-windows = true;
floating = [
"at.obdev.LaunchBar"
"com.apple.systempreferences"
"com.eltima.elmedia-setapp"
"com.jonny.mona"
"com.kapeli.dash-setapp"
"com.sindresorhus.Dato-setapp"
];
new-windows-to-main = false;
follow-space-thrown-windows = true;
ignore-menu-bar = false;
hide-menu-bar-icon = false;
mouse-follows-focus = false;
focus-follows-mouse = false;
mouse-swaps-windows = true;
mouse-resizes-windows = false;
restore-layouts-on-launch = true;
debug-layout-info = false;
use-canary-build = false;
# Keybindings
mod1 = [ "option" "shift" ];
mod2 = [ "option" "shift" "control" ];
focus-ccw = { mod = "mod1"; key = "h"; };
focus-cw = { mod = "mod1"; key = "l"; };
focus-main = { mod = "mod1"; key = "m"; };
focus-screen-ccw = { mod = "mod1"; key = "e"; };
focus-screen-cw = { mod = "mod1"; key = "w"; };
swap-ccw = { mod = "mod2"; key = "h"; };
swap-cw = { mod = "mod2"; key = "l"; };
swap-main = { mod = "mod2"; key = "m"; };
swap-screen-ccw = { mod = "mod2"; key = "e"; };
swap-screen-cw = { mod = "mod2"; key = "w"; };
toggle-float = { mod = "mod2"; key = "t"; };
select-tall-layout = { mod = "mod2"; key = "a"; };
select-wide-layout = { mod = "mod2"; key = "s"; };
select-fullscreen-layout = { mod = "mod2"; key = "f"; };
select-column-layout = { mod = "mod2"; key = "c"; };
display-current-layout = { mod = "mod1"; key = "i"; };
reevaluate-windows = { mod = "mod2"; key = "b"; };
throw-space-left = disable-keybinding;
throw-space-right = disable-keybinding;
toggle-tiling = disable-keybinding;
toggle-focus-follows-mouse = disable-keybinding;
relaunch-amethyst = { mod = "mod2"; key = "z"; };
};
in
{
xdg.configFile."amethyst/amethyst.yml".source = settingsFormat.generate "amethyst.yml" settings;
}

View file

@ -111,6 +111,10 @@ in
set user_agent "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.1 Safari/605.1.15"
${lib.getExe pkgs.aria2} -U "$user_agent" --file-allocation none --async-dns=false -x 2 $argv
'';
macos-app-id = /* fish */ ''
osascript -e "id of app \"$argv\""
'';
};
shellInit = /* fish */ ''

View file

@ -28,11 +28,11 @@ in
universal-ctags
# LSP
bash-language-server
#elixir-ls
fennel-ls
lexical
nil
nodePackages.bash-language-server
nodePackages.dockerfile-language-server-nodejs
nodePackages.svelte-language-server
nodePackages.typescript-language-server

View file

@ -16,8 +16,8 @@ in
../darwin/mas.nix
../darwin/skhd.nix
../darwin/yabai.nix
#../darwin/skhd.nix
#../darwin/yabai.nix
];
nix = {