Adding transient nixvim configs, dwl, dwl patches
This commit is contained in:
8
flake.lock
generated
8
flake.lock
generated
@@ -609,11 +609,11 @@
|
||||
"neovim-config": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1757956531,
|
||||
"narHash": "sha256-qfkl4aiAkzb2H4LY2L6ZAqHs5YrAfPEr1qLvDrxcbJ0=",
|
||||
"lastModified": 1758129669,
|
||||
"narHash": "sha256-JrWvWU1dzEK57xfvDGGYYRZypxxcgU9Va8Ip6fErBP4=",
|
||||
"ref": "New-Master",
|
||||
"rev": "a9e3cd2d6814b678cc2da6d639bcd1c0251b4ae1",
|
||||
"revCount": 37,
|
||||
"rev": "20165cfee159465cf243999372531dbe20161663",
|
||||
"revCount": 40,
|
||||
"type": "git",
|
||||
"url": "https://git.th3r00t.net/th3r00t/nvim-config.git"
|
||||
},
|
||||
|
||||
37
flake.nix
37
flake.nix
@@ -45,6 +45,13 @@
|
||||
];
|
||||
});
|
||||
})
|
||||
(final: prev: {
|
||||
dwl = prev.dwl.overrideAttrs {
|
||||
patches = [
|
||||
./modules/dwl/patches/focusdir.patch
|
||||
];
|
||||
};
|
||||
})
|
||||
];
|
||||
in {
|
||||
nixosConfigurations.xps13 = nixpkgs.lib.nixosSystem {
|
||||
@@ -67,11 +74,11 @@
|
||||
./home/xps13.nix
|
||||
nix-index-database.homeModules.nix-index
|
||||
];
|
||||
# home.file.".config/nvim" = {
|
||||
# source = inputs.neovim-config;
|
||||
# recursive = true;
|
||||
# # executable = true;
|
||||
# };
|
||||
home.file.".config/nvim" = {
|
||||
source = inputs.neovim-config;
|
||||
recursive = true;
|
||||
# executable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
@@ -95,11 +102,11 @@
|
||||
./home/server.nix
|
||||
nix-index-database.homeModules.nix-index
|
||||
];
|
||||
# home.file.".config/nvim" = {
|
||||
# source = inputs.neovim-config;
|
||||
# recursive = true;
|
||||
# # executable = true;
|
||||
# };
|
||||
home.file.".config/nvim" = {
|
||||
source = inputs.neovim-config;
|
||||
recursive = true;
|
||||
# executable = true;
|
||||
};
|
||||
};
|
||||
# home-manager.users.th3r00t = import ./home.nix;
|
||||
}
|
||||
@@ -124,11 +131,11 @@
|
||||
./home/server.nix
|
||||
nix-index-database.homeModules.nix-index
|
||||
];
|
||||
# home.file.".config/nvim" = {
|
||||
# source = inputs.neovim-config;
|
||||
# recursive = true;
|
||||
# # executable = true;
|
||||
# };
|
||||
home.file.".config/nvim" = {
|
||||
source = inputs.neovim-config;
|
||||
recursive = true;
|
||||
# executable = true;
|
||||
};
|
||||
};
|
||||
# home-manager.users.th3r00t = import ./home.nix;
|
||||
}
|
||||
|
||||
27
home/.config/kitty/themes/cyberdream.conf
Normal file
27
home/.config/kitty/themes/cyberdream.conf
Normal file
@@ -0,0 +1,27 @@
|
||||
# cyberdream theme for kitty
|
||||
background #16181a
|
||||
foreground #ffffff
|
||||
cursor #ffffff
|
||||
cursor_text_color #16181a
|
||||
selection_background #3c4048
|
||||
color0 #16181a
|
||||
color8 #3c4048
|
||||
color1 #ff6e5e
|
||||
color9 #ff6e5e
|
||||
color2 #5eff6c
|
||||
color10 #5eff6c
|
||||
color3 #f1ff5e
|
||||
color11 #f1ff5e
|
||||
color4 #5ea1ff
|
||||
color12 #5ea1ff
|
||||
color5 #bd5eff
|
||||
color13 #bd5eff
|
||||
color6 #5ef1ff
|
||||
color14 #5ef1ff
|
||||
color7 #ffffff
|
||||
color15 #ffffff
|
||||
selection_foreground #ffffff
|
||||
active_tab_foreground #000000
|
||||
active_tab_background #ffbd5e
|
||||
inactive_tab_foreground #ffffff
|
||||
inactive_tab_background #16181a
|
||||
BIN
home/Wallpapers/cybercity.gif
Normal file
BIN
home/Wallpapers/cybercity.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 277 KiB |
@@ -27,8 +27,8 @@
|
||||
../modules/shells.nix
|
||||
../modules/tmux.nix
|
||||
../modules/ranger.nix
|
||||
inputs.nixvim.homeModules.nixvim
|
||||
../modules/nixvim/nixvim.nix
|
||||
# inputs.nixvim.homeModules.nixvim
|
||||
# ../modules/nixvim/nixvim.nix
|
||||
];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
@@ -88,12 +88,12 @@
|
||||
)
|
||||
)
|
||||
pyenv
|
||||
# neovim provided by nixvim
|
||||
neovim
|
||||
zig
|
||||
syncthing
|
||||
lazygit
|
||||
gopls
|
||||
pyright
|
||||
# pyright
|
||||
ncurses
|
||||
rustup
|
||||
wayvnc
|
||||
|
||||
@@ -7,6 +7,11 @@
|
||||
recursive = true;
|
||||
executable = true;
|
||||
};
|
||||
home.file.".config/kitty/themes" = {
|
||||
source = ./.config/kitty/themes;
|
||||
recursive = true;
|
||||
# executable = true;
|
||||
};
|
||||
home.file.".config/waybar/power_menu.xml" = {
|
||||
source = ./.config/waybar/power_menu.xml;
|
||||
recursive = true;
|
||||
@@ -236,7 +241,8 @@
|
||||
update_check_interval = 7;
|
||||
};
|
||||
# https://github.com/kovidgoyal/kitty-themes/tree/master/themes
|
||||
themeFile = "tokyo_night_night";
|
||||
# themeFile = "tokyo_night_night";
|
||||
# Custom cyberdream theme copied via home.file
|
||||
shellIntegration = {
|
||||
enableZshIntegration = true;
|
||||
enableFishIntegration = true;
|
||||
@@ -245,6 +251,9 @@
|
||||
shell zsh
|
||||
dynamic_background_opacity yes
|
||||
background_opacity 0.7
|
||||
|
||||
# Import cyberdream theme
|
||||
include ./themes/cyberdream.conf
|
||||
'';
|
||||
};
|
||||
foot = {
|
||||
|
||||
98
modules/dwl/patches/focusdir.patch
Normal file
98
modules/dwl/patches/focusdir.patch
Normal file
@@ -0,0 +1,98 @@
|
||||
From a0e71a687b7fcaebdaf1da80c09bf5563bff46b1 Mon Sep 17 00:00:00 2001
|
||||
From: ldev <ldev@ldev.eu.org>
|
||||
Date: Mon, 12 Feb 2024 21:50:24 +0100
|
||||
Subject: [PATCH] focusdir
|
||||
|
||||
---
|
||||
config.def.h | 4 ++++
|
||||
dwl.c | 45 +++++++++++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 49 insertions(+)
|
||||
|
||||
diff --git a/config.def.h b/config.def.h
|
||||
index 9009517..2a1a82e 100644
|
||||
--- a/config.def.h
|
||||
+++ b/config.def.h
|
||||
@@ -124,6 +124,10 @@ static const Key keys[] = {
|
||||
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_Return, spawn, {.v = termcmd} },
|
||||
{ MODKEY, XKB_KEY_j, focusstack, {.i = +1} },
|
||||
{ MODKEY, XKB_KEY_k, focusstack, {.i = -1} },
|
||||
+ { MODKEY|WLR_MODIFIER_CTRL, XKB_KEY_h, focusdir, {.ui = 0} },
|
||||
+ { MODKEY|WLR_MODIFIER_CTRL, XKB_KEY_l, focusdir, {.ui = 1} },
|
||||
+ { MODKEY|WLR_MODIFIER_CTRL, XKB_KEY_k, focusdir, {.ui = 2} },
|
||||
+ { MODKEY|WLR_MODIFIER_CTRL, XKB_KEY_j, focusdir, {.ui = 3} },
|
||||
{ MODKEY, XKB_KEY_i, incnmaster, {.i = +1} },
|
||||
{ MODKEY, XKB_KEY_d, incnmaster, {.i = -1} },
|
||||
{ MODKEY, XKB_KEY_h, setmfact, {.f = -0.05f} },
|
||||
diff --git a/dwl.c b/dwl.c
|
||||
index bf02a6d..64d5de7 100644
|
||||
--- a/dwl.c
|
||||
+++ b/dwl.c
|
||||
@@ -1,6 +1,7 @@
|
||||
/*
|
||||
* See LICENSE file for copyright and license details.
|
||||
*/
|
||||
+#include <limits.h>
|
||||
#include <getopt.h>
|
||||
#include <libinput.h>
|
||||
#include <linux/input-event-codes.h>
|
||||
@@ -268,6 +269,7 @@ static Monitor *dirtomon(enum wlr_direction dir);
|
||||
static void focusclient(Client *c, int lift);
|
||||
static void focusmon(const Arg *arg);
|
||||
static void focusstack(const Arg *arg);
|
||||
+static void focusdir(const Arg *arg);
|
||||
static Client *focustop(Monitor *m);
|
||||
static void fullscreennotify(struct wl_listener *listener, void *data);
|
||||
static void handlesig(int signo);
|
||||
@@ -1271,6 +1273,49 @@ focusstack(const Arg *arg)
|
||||
focusclient(c, 1);
|
||||
}
|
||||
|
||||
+void focusdir(const Arg *arg)
|
||||
+{
|
||||
+ /* Focus the left, right, up, down client relative to the current focused client on selmon */
|
||||
+ Client *c, *sel = focustop(selmon);
|
||||
+ if (!sel || sel->isfullscreen)
|
||||
+ return;
|
||||
+
|
||||
+ int dist=INT_MAX;
|
||||
+ Client *newsel = NULL;
|
||||
+ int newdist=INT_MAX;
|
||||
+ wl_list_for_each(c, &clients, link) {
|
||||
+ if (!VISIBLEON(c, selmon))
|
||||
+ continue; /* skip non visible windows */
|
||||
+
|
||||
+ if (arg->ui == 0 && sel->geom.x <= c->geom.x) {
|
||||
+ /* Client isn't on our left */
|
||||
+ continue;
|
||||
+ }
|
||||
+ if (arg->ui == 1 && sel->geom.x >= c->geom.x) {
|
||||
+ /* Client isn't on our right */
|
||||
+ continue;
|
||||
+ }
|
||||
+ if (arg->ui == 2 && sel->geom.y <= c->geom.y) {
|
||||
+ /* Client isn't above us */
|
||||
+ continue;
|
||||
+ }
|
||||
+ if (arg->ui == 3 && sel->geom.y >= c->geom.y) {
|
||||
+ /* Client isn't below us */
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ dist=abs(sel->geom.x-c->geom.x)+abs(sel->geom.y-c->geom.y);
|
||||
+ if (dist < newdist){
|
||||
+ newdist = dist;
|
||||
+ newsel=c;
|
||||
+ }
|
||||
+ }
|
||||
+ if (newsel != NULL){
|
||||
+ focusclient(newsel, 1);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+
|
||||
/* We probably should change the name of this, it sounds like
|
||||
* will focus the topmost client of this mon, when actually will
|
||||
* only return that client */
|
||||
--
|
||||
2.43.0
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
{ config, pkgs, lib, inputs, ... }:
|
||||
{
|
||||
imports = [
|
||||
../which-key.nix
|
||||
./which-key.nix
|
||||
./options.nix
|
||||
];
|
||||
programs.nixvim = {
|
||||
enable = true;
|
||||
enableMan = true;
|
||||
colorschemes = {
|
||||
cyberdream = {
|
||||
enable = true;
|
||||
@@ -22,7 +24,7 @@
|
||||
theme = "dashboard";
|
||||
};
|
||||
fzf-lua = {
|
||||
lazyLoad.enable = true;
|
||||
enable = true;
|
||||
settings = {
|
||||
files = {
|
||||
color_icons = true;
|
||||
@@ -31,7 +33,7 @@
|
||||
__raw = "[[-type f -not -path '*.git/objects*' -not -path '*.env*']]";
|
||||
};
|
||||
multiprocess = true;
|
||||
prompt = " ";"
|
||||
prompt = " ";
|
||||
};
|
||||
winopts = {
|
||||
col = 0.3;
|
||||
|
||||
50
modules/nixvim/options.nix
Normal file
50
modules/nixvim/options.nix
Normal file
@@ -0,0 +1,50 @@
|
||||
{ config, pkgs, lib, inputs, ... }:
|
||||
{
|
||||
programs.nixvim.globalOpts = {
|
||||
mapleader = " ";
|
||||
netrw_keepdir = 1;
|
||||
netrw_winsize = 18;
|
||||
netrw_banner = 0;
|
||||
netrw_localcopydircmd = "cp -avr";
|
||||
netrw_liststyle = 3;
|
||||
netrw_browse_split = 4;
|
||||
ranger_map_keys = 0;
|
||||
ranger_replace_netrw = 1;
|
||||
cmdheight = 1;
|
||||
};
|
||||
|
||||
programs.nixvim.opts = {
|
||||
number = true;
|
||||
relativenumber = true;
|
||||
cursorline = true;
|
||||
smartcase = true;
|
||||
ignorecase = true;
|
||||
splitright = true;
|
||||
splitbelow = true;
|
||||
wrap = false;
|
||||
tabstop = 2;
|
||||
shiftwidth = 2;
|
||||
expandtab = true;
|
||||
scrolloff = 8;
|
||||
sidescrolloff = 8;
|
||||
signcolumn = "yes";
|
||||
updatetime = 300;
|
||||
timeoutlen = 500;
|
||||
mouse = "a";
|
||||
laststatus = 3;
|
||||
showmode = true;
|
||||
foldmethod = "expr";
|
||||
foldexpr = "nvim_treesitter#foldexpr()";
|
||||
foldlevelstart = 99;
|
||||
foldenable = true;
|
||||
wildmenu = true;
|
||||
wildoptions = "pum";
|
||||
termguicolors = true;
|
||||
winborder = "rounded";
|
||||
clipboard = "unnamedplus";
|
||||
completeopt = "menuone";
|
||||
sessionoptions="blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions";
|
||||
undofile = true;
|
||||
undodir = "${config.home.homeDirectory}/.local/state/nvim/undo";
|
||||
};
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
{ config, pkgs, lib, inputs, ... }:
|
||||
{
|
||||
programs.nixvim.plugins.which-key = {
|
||||
lazyLoad.enable = true;
|
||||
enable = true;
|
||||
settings = {
|
||||
delay = 200;
|
||||
expand = 1;
|
||||
|
||||
Reference in New Issue
Block a user