Work on zellij stuff
This commit is contained in:
parent
f141a0ee04
commit
e581c4533e
10 changed files with 533 additions and 24 deletions
|
@ -80,9 +80,19 @@
|
|||
};
|
||||
|
||||
programs.skim = {
|
||||
# https://github.com/lotabout/skim/issues/494
|
||||
enable = false;
|
||||
enableFishIntegration = true;
|
||||
defaultOptions = ["--no-clear-start" "--color=16"];
|
||||
};
|
||||
|
||||
programs.fzf = {
|
||||
# using good ol' fzf until skim sucks less out of the box I guess
|
||||
enable = true;
|
||||
enableFishIntegration = true;
|
||||
defaultOptions = ["--color=16"];
|
||||
defaultCommand = "fd --type f";
|
||||
defaultOptions = ["--height 40%"];
|
||||
fileWidgetOptions = ["--preview 'head {}'"];
|
||||
};
|
||||
|
||||
programs.nix-index = {
|
||||
|
|
|
@ -142,7 +142,9 @@ bind --mode insert --sets-mode default jJ repaint
|
|||
bind --mode insert --sets-mode default Jj repaint
|
||||
bind --mode insert --sets-mode default JJ repaint
|
||||
|
||||
bind -M insert \cg skim-cd-widget
|
||||
if has_command skim
|
||||
bind -M insert \cg skim-cd-widget
|
||||
end
|
||||
|
||||
bind -M insert \cp up-or-search
|
||||
bind -M insert \cn down-or-search
|
||||
|
|
|
@ -37,8 +37,10 @@ set --export --universal BROWSER firefox
|
|||
|
||||
set --export --universal SOPS_AGE_KEY_FILE "$XDG_CONFIG_HOME/sops/age/keys.txt"
|
||||
|
||||
set --export --universal SKIM_ALT_C_COMMAND "fd --hidden --type directory"
|
||||
set --export --universal SKIM_CTRL_T_COMMAND "fd --hidden"
|
||||
if has_command skim
|
||||
set --export --universal SKIM_ALT_C_COMMAND "fd --hidden --type directory"
|
||||
set --export --universal SKIM_CTRL_T_COMMAND "fd --hidden"
|
||||
end
|
||||
|
||||
# colors
|
||||
set -U fish_color_normal normal # default color
|
||||
|
|
|
@ -124,7 +124,7 @@
|
|||
|
||||
editor = {
|
||||
soft-wrap.enable = true;
|
||||
# auto-pairs = true;
|
||||
auto-pairs = false;
|
||||
# auto-save = false;
|
||||
# completion-trigger-len = 1;
|
||||
# color-modes = false;
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
exec-once = [
|
||||
"hyprpaper"
|
||||
"mako"
|
||||
"/usr/lib/polkit-kde-authentication-agent-1"
|
||||
"eww daemon && eww open bar$EWW_BAR_MON"
|
||||
"firefox & wezterm &"
|
||||
(lib.concatStringsSep " " [
|
||||
|
@ -51,11 +50,11 @@
|
|||
"timeout 597 'notify-send -u critical \"Idling in 3 seconds!\"'"
|
||||
"timeout 598 'notify-send -u critical \"Idling in 2 seconds!\"'"
|
||||
"timeout 599 'notify-send -u critical \"Idling in 1 second!\"'"
|
||||
"timeout 600 'swaylock -f'"
|
||||
"timeout 600 'swaylock --daemonize'"
|
||||
"timeout 600 'hyprctl dispatch dpms off'"
|
||||
"resume 'hyprctl dispatch dpms on'"
|
||||
# "resume 'maybe-good-morning'"
|
||||
"before-sleep 'swaylock -f'"
|
||||
"before-sleep 'swaylock --daemonize'"
|
||||
])
|
||||
''swayidle -w timeout 600 'notify-send "Locking in 30 seconds..."' timeout 630 'swaylock -f' timeout 660 'hyprctl dispatch dpms off' resume 'hyprctl dispatch dpms on && maybe-good-morning' before-sleep 'swaylock -f'"''
|
||||
"dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP"
|
||||
|
|
|
@ -155,8 +155,9 @@
|
|||
# kill tab
|
||||
"ctrl+alt+shift+q" = "close_tab";
|
||||
|
||||
"ctrl+shift+j" = "launch --location=hsplit --cwd=current";
|
||||
"ctrl+shift+l" = "launch --location=vsplit --cwd=current";
|
||||
# use zellij for panes
|
||||
# "ctrl+shift+j" = "launch --location=hsplit --cwd=current";
|
||||
# "ctrl+shift+l" = "launch --location=vsplit --cwd=current";
|
||||
|
||||
"ctrl+alt+shift+k" = "move_window up";
|
||||
"ctrl+alt+shift+h" = "move_window left";
|
||||
|
|
|
@ -156,7 +156,7 @@
|
|||
];
|
||||
}
|
||||
{command = "firefox";}
|
||||
{command = "kitty --single-instance";}
|
||||
{command = "wezterm";}
|
||||
];
|
||||
|
||||
modes = {
|
||||
|
|
|
@ -180,16 +180,17 @@
|
|||
mods = 'CTRL',
|
||||
action = wezterm.action.ActivatePaneDirection'Up'
|
||||
},
|
||||
{
|
||||
key = 'j',
|
||||
mods = 'CTRL|SHIFT',
|
||||
action = wezterm.action.SplitVertical{domain='CurrentPaneDomain'}
|
||||
},
|
||||
{
|
||||
key = 'l',
|
||||
mods = 'CTRL|SHIFT',
|
||||
action = wezterm.action.SplitHorizontal{domain='CurrentPaneDomain'}
|
||||
},
|
||||
-- use zellij for panes
|
||||
-- {
|
||||
-- key = 'j',
|
||||
-- mods = 'CTRL|SHIFT',
|
||||
-- action = wezterm.action.SplitVertical{domain='CurrentPaneDomain'}
|
||||
-- },
|
||||
-- {
|
||||
-- key = 'l',
|
||||
-- mods = 'CTRL|SHIFT',
|
||||
-- action = wezterm.action.SplitHorizontal{domain='CurrentPaneDomain'}
|
||||
-- },
|
||||
{
|
||||
key = 'l',
|
||||
mods = 'CTRL|SHIFT|ALT',
|
||||
|
|
|
@ -1,11 +1,505 @@
|
|||
{
|
||||
colors,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
programs.zellij = {
|
||||
# TODO: enable after port config
|
||||
enable = false;
|
||||
# uses home manager's toKDL generator
|
||||
enable = true;
|
||||
enableFishIntegration = true;
|
||||
settings = {
|
||||
pane_frames = false;
|
||||
simplified_ui = true;
|
||||
default_mode = "locked";
|
||||
mouse_mode = true;
|
||||
copy_clipboard = "primary";
|
||||
copy_on_select = true;
|
||||
mirror_session = false;
|
||||
|
||||
keybinds = with builtins; let
|
||||
binder = bind: let
|
||||
keys = elemAt bind 0;
|
||||
action = elemAt bind 1;
|
||||
argKeys = map (k: "\"${k}\"") (lib.lists.flatten [keys]);
|
||||
in {
|
||||
name = "bind ${concatStringsSep " " argKeys}";
|
||||
value = action;
|
||||
};
|
||||
layer = binds: (listToAttrs (map binder binds));
|
||||
in {
|
||||
_props = {clear-defaults = true;};
|
||||
normal = {};
|
||||
locked = layer [
|
||||
[["Ctrl g"] {SwitchToMode = "Normal";}]
|
||||
[["Ctrl L"] {NewPane = "Right";}]
|
||||
[["Ctrl J"] {NewPane = "Down";}]
|
||||
[["Ctrl h"] {MoveFocus = "Left";}]
|
||||
[["Ctrl l"] {MoveFocus = "Right";}]
|
||||
[["Ctrl j"] {MoveFocus = "Down";}]
|
||||
[["Ctrl k"] {MoveFocus = "Up";}]
|
||||
];
|
||||
resize = layer [
|
||||
[["Ctrl n"] {SwitchToMode = "Normal";}]
|
||||
[["h" "Left"] {Resize = "Increase Left";}]
|
||||
[["j" "Down"] {Resize = "Increase Down";}]
|
||||
[["k" "Up"] {Resize = "Increase Up";}]
|
||||
[["l" "Right"] {Resize = "Increase Right";}]
|
||||
[["H"] {Resize = "Decrease Left";}]
|
||||
[["J"] {Resize = "Decrease Down";}]
|
||||
[["K"] {Resize = "Decrease Up";}]
|
||||
[["L"] {Resize = "Decrease Right";}]
|
||||
[["=" "+"] {Resize = "Increase";}]
|
||||
[["-"] {Resize = "Decrease";}]
|
||||
];
|
||||
pane = layer [
|
||||
[["Ctrl p"] {SwitchToMode = "Normal";}]
|
||||
[["h" "Left"] {MoveFocus = "Left";}]
|
||||
[["l" "Right"] {MoveFocus = "Right";}]
|
||||
[["j" "Down"] {MoveFocus = "Down";}]
|
||||
[["k" "Up"] {MoveFocus = "Up";}]
|
||||
[["p"] {SwitchFocus = [];}]
|
||||
[
|
||||
["n"]
|
||||
{
|
||||
NewPane = [];
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[
|
||||
["d"]
|
||||
{
|
||||
NewPane = "Down";
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[
|
||||
["r"]
|
||||
{
|
||||
NewPane = "Right";
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[
|
||||
["x"]
|
||||
{
|
||||
CloseFocus = [];
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[
|
||||
["f"]
|
||||
{
|
||||
ToggleFocusFullscreen = [];
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[
|
||||
["z"]
|
||||
{
|
||||
TogglePaneFrames = [];
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[
|
||||
["w"]
|
||||
{
|
||||
ToggleFloatingPanes = [];
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[
|
||||
["e"]
|
||||
{
|
||||
TogglePaneEmbedOrFloating = [];
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[
|
||||
["c"]
|
||||
{
|
||||
SwitchToMode = "RenamePane";
|
||||
PaneNameInput = 0;
|
||||
}
|
||||
]
|
||||
];
|
||||
move = layer [
|
||||
[["Ctrl h"] {SwitchToMode = "Normal";}]
|
||||
[["n" "Tab"] {MovePane = [];}]
|
||||
[["p"] {MovePaneBackwards = [];}]
|
||||
[["h" "Left"] {MovePane = "Left";}]
|
||||
[["j" "Down"] {MovePane = "Down";}]
|
||||
[["k" "Up"] {MovePane = "Up";}]
|
||||
[["l" "Right"] {MovePane = "Right";}]
|
||||
];
|
||||
tab = layer [
|
||||
[["Ctrl t"] {SwitchToMode = "Normal";}]
|
||||
[
|
||||
["r"]
|
||||
{
|
||||
SwitchToMode = "RenameTab";
|
||||
TabNameInput = 0;
|
||||
}
|
||||
]
|
||||
[["h" "Left" "Up" "k"] {GoToPreviousTab = [];}]
|
||||
[["l" "Right" "Down" "j"] {GoToNextTab = [];}]
|
||||
[
|
||||
["n"]
|
||||
{
|
||||
NewTab = [];
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[
|
||||
["x"]
|
||||
{
|
||||
CloseTab = [];
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[
|
||||
["s"]
|
||||
{
|
||||
ToggleActiveSyncTab = [];
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[
|
||||
["1"]
|
||||
{
|
||||
GoToTab = 1;
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[
|
||||
["2"]
|
||||
{
|
||||
GoToTab = 2;
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[
|
||||
["3"]
|
||||
{
|
||||
GoToTab = 3;
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[
|
||||
["4"]
|
||||
{
|
||||
GoToTab = 4;
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[
|
||||
["5"]
|
||||
{
|
||||
GoToTab = 5;
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[
|
||||
["6"]
|
||||
{
|
||||
GoToTab = 6;
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[
|
||||
["7"]
|
||||
{
|
||||
GoToTab = 7;
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[
|
||||
["8"]
|
||||
{
|
||||
GoToTab = 8;
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[
|
||||
["9"]
|
||||
{
|
||||
GoToTab = 9;
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[["Tab"] {ToggleTab = [];}]
|
||||
];
|
||||
scroll = layer [
|
||||
[["Ctrl s"] {SwitchToMode = "Normal";}]
|
||||
[
|
||||
["e"]
|
||||
{
|
||||
EditScrollback = [];
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[
|
||||
["s"]
|
||||
{
|
||||
SwitchToMode = "EnterSearch";
|
||||
SearchInput = 0;
|
||||
}
|
||||
]
|
||||
[
|
||||
["Ctrl c"]
|
||||
{
|
||||
ScrollToBottom = [];
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[["j" "Down"] {ScrollDown = [];}]
|
||||
[["k" "Up"] {ScrollUp = [];}]
|
||||
[["Ctrl f" "PageDown" "Right" "l"] {PageScrollDown = [];}]
|
||||
[["Ctrl b" "PageUp" "Left" "h"] {PageScrollUp = [];}]
|
||||
[["d"] {HalfPageScrollDown = [];}]
|
||||
[["u"] {HalfPageScrollUp = [];}]
|
||||
# uncomment this and adjust key if using copy_on_select=false
|
||||
# bind "Alt c" { Copy; }
|
||||
];
|
||||
search = layer [
|
||||
[["Ctrl s"] {SwitchToMode = "Normal";}]
|
||||
[
|
||||
["Ctrl c"]
|
||||
{
|
||||
ScrollToBottom = [];
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[["j" "Down"] {ScrollDown = [];}]
|
||||
[["k" "Up"] {ScrollUp = [];}]
|
||||
[["Ctrl f" "PageDown" "Right" "l"] {PageScrollDown = [];}]
|
||||
[["Ctrl b" "PageUp" "Left" "h"] {PageScrollUp = [];}]
|
||||
[["d"] {HalfPageScrollDown = [];}]
|
||||
[["u"] {HalfPageScrollUp = [];}]
|
||||
[["n"] {Search = "down";}]
|
||||
[["p"] {Search = "up";}]
|
||||
[["c"] {SearchToggleOption = "CaseSensitivity";}]
|
||||
[["w"] {SearchToggleOption = "Wrap";}]
|
||||
[["o"] {SearchToggleOption = "WholeWord";}]
|
||||
];
|
||||
entersearch = layer [
|
||||
[["Ctrl c" "Esc"] {SwitchToMode = "Scroll";}]
|
||||
[["Enter"] {SwitchToMode = "Search";}]
|
||||
];
|
||||
renametab = layer [
|
||||
[["Ctrl c"] {SwitchToMode = "Normal";}]
|
||||
[
|
||||
["Esc"]
|
||||
{
|
||||
UndoRenameTab = [];
|
||||
SwitchToMode = "Tab";
|
||||
}
|
||||
]
|
||||
];
|
||||
renamepane = layer [
|
||||
[["Ctrl c"] {SwitchToMode = "Normal";}]
|
||||
[
|
||||
["Esc"]
|
||||
{
|
||||
UndoRenamePane = [];
|
||||
SwitchToMode = "Pane";
|
||||
}
|
||||
]
|
||||
];
|
||||
session = layer [
|
||||
[["Ctrl o"] {SwitchToMode = "Normal";}]
|
||||
[["Ctrl s"] {SwitchToMode = "Scroll";}]
|
||||
[["d"] {Detach = [];}]
|
||||
];
|
||||
tmux = layer [
|
||||
[["["] {SwitchToMode = "Scroll";}]
|
||||
[
|
||||
["Ctrl b"]
|
||||
{
|
||||
Write = 2;
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[
|
||||
["\\\""]
|
||||
{
|
||||
NewPane = "Down";
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[
|
||||
["%"]
|
||||
{
|
||||
NewPane = "Right";
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[
|
||||
["z"]
|
||||
{
|
||||
ToggleFocusFullscreen = [];
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[
|
||||
["c"]
|
||||
{
|
||||
NewTab = [];
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[[","] {SwitchToMode = "RenameTab";}]
|
||||
[
|
||||
["p"]
|
||||
{
|
||||
GoToPreviousTab = [];
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[
|
||||
["n"]
|
||||
{
|
||||
GoToNextTab = [];
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[
|
||||
["Left"]
|
||||
{
|
||||
MoveFocus = "Left";
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[
|
||||
["Right"]
|
||||
{
|
||||
MoveFocus = "Right";
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[
|
||||
["Down"]
|
||||
{
|
||||
MoveFocus = "Down";
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[
|
||||
["Up"]
|
||||
{
|
||||
MoveFocus = "Up";
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[
|
||||
["h"]
|
||||
{
|
||||
MoveFocus = "Left";
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[
|
||||
["l"]
|
||||
{
|
||||
MoveFocus = "Right";
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[
|
||||
["j"]
|
||||
{
|
||||
MoveFocus = "Down";
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[
|
||||
["k"]
|
||||
{
|
||||
MoveFocus = "Up";
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[["o"] {FocusNextPane = [];}]
|
||||
[["d"] {Detach = [];}]
|
||||
[["Space"] {NextSwapLayout = [];}]
|
||||
[
|
||||
["x"]
|
||||
{
|
||||
CloseFocus = [];
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
];
|
||||
"shared_except \"locked\"" = layer [
|
||||
[["Ctrl g"] {SwitchToMode = "Locked";}]
|
||||
[["Ctrl q"] {Quit = [];}]
|
||||
[["Alt n"] {NewPane = [];}]
|
||||
[["Alt h" "Alt Left"] {MoveFocusOrTab = "Left";}]
|
||||
[["Alt l" "Alt Right"] {MoveFocusOrTab = "Right";}]
|
||||
[["Alt j" "Alt Down"] {MoveFocus = "Down";}]
|
||||
[["Alt k" "Alt Up"] {MoveFocus = "Up";}]
|
||||
[["Alt ]" "Alt +"] {Resize = "Increase";}]
|
||||
[["Alt -"] {Resize = "Decrease";}]
|
||||
[["Alt ["] {PreviousSwapLayout = [];}]
|
||||
[["Alt ]"] {NextSwapLayout = [];}]
|
||||
];
|
||||
"shared_except \"normal\" \"locked\"" = layer [
|
||||
[["Enter" "Esc"] {SwitchToMode = "Normal";}]
|
||||
];
|
||||
"shared_except \"pane\" \"locked\"" = layer [
|
||||
[["Ctrl p"] {SwitchToMode = "Pane";}]
|
||||
];
|
||||
"shared_except \"resize\" \"locked\"" = layer [
|
||||
[["Ctrl n"] {SwitchToMode = "Resize";}]
|
||||
];
|
||||
"shared_except \"scroll\" \"locked\"" = layer [
|
||||
[["Ctrl s"] {SwitchToMode = "Scroll";}]
|
||||
];
|
||||
"shared_except \"session\" \"locked\"" = layer [
|
||||
[["Ctrl o"] {SwitchToMode = "Session";}]
|
||||
];
|
||||
"shared_except \"tab\" \"locked\"" = layer [
|
||||
[["Ctrl t"] {SwitchToMode = "Tab";}]
|
||||
];
|
||||
"shared_except \"move\" \"locked\"" = layer [
|
||||
[["Ctrl h"] {SwitchToMode = "Move";}]
|
||||
];
|
||||
"shared_except \"tmux\" \"locked\"" = layer [
|
||||
[["Ctrl b"] {SwitchToMode = "Tmux";}]
|
||||
];
|
||||
};
|
||||
|
||||
theme = "match";
|
||||
|
||||
themes = {
|
||||
match = with colors.withHashPrefix; {
|
||||
fg = fg;
|
||||
bg = bg;
|
||||
|
||||
black = bg;
|
||||
white = fg;
|
||||
|
||||
red = red;
|
||||
green = green;
|
||||
yellow = yellow;
|
||||
blue = blue;
|
||||
magenta = purple;
|
||||
cyan = blue;
|
||||
orange = orange;
|
||||
};
|
||||
};
|
||||
# TODO: port config
|
||||
|
||||
plugins = {
|
||||
# tab-bar = {path = "tab-bar";};
|
||||
# compact-bar = {path = "compact-bar";};
|
||||
};
|
||||
|
||||
ui = {
|
||||
pane_frames = {
|
||||
rounded_corners = true;
|
||||
hide_session_name = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = [outputs.nixosModules.ewwbar];
|
||||
imports = [outputs.nixosModules.ewwbar outputs.nixosModules.pipewire];
|
||||
programs.hyprland.enable = true;
|
||||
environment.systemPackages = with pkgs; [hyprpaper];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue