1
Fork 0

Remove eww remains, and fully switch to lazygit

This commit is contained in:
prescientmoon 2024-02-25 05:51:41 +01:00
parent a789b7ca25
commit 497511a4e9
Signed by: prescientmoon
SSH key fingerprint: SHA256:UUF9JT2s8Xfyv76b8ZuVL7XrmimH4o49p4b+iexbVH4
8 changed files with 14 additions and 347 deletions

View file

@ -97,6 +97,7 @@ Here's some things you might want to check out:
- [Starship](https://starship.rs/) — shell prompt
- [Ranger](https://github.com/ranger/ranger) — file manager
- [Catgirl](https://git.causal.agency/catgirl/about/) — irc client
- [lazygit](https://github.com/jesseduffield/lazygit) — git tui
- Self management:
- [Smos](https://github.com/NorfairKing/smos) — selfhosted comprehensive self-management system
- [Intray](https://github.com/NorfairKing/intray) — selfhosted GTD capture tool
@ -112,11 +113,17 @@ Most services are served over [tailscale](https://tailscale.com/), using certifi
- [Smos](https://github.com/NorfairKing/smos) — a comprehensive self-management system.
- [Intray](https://github.com/NorfairKing/intray) — GTD capture tool.
- [Actual](https://actualbudget.org/) — budgeting tool.
- [Commarss](https://github.com/Athou/commafeed) — rss reader
- [Prometheus](https://github.com/prometheus/prometheus) — metric collector
- [Grafana](https://github.com/grafana/grafana) — pretty dashboards
- [Homer](https://github.com/bastienwirtz/homer) — server homepage
## Hall of fame
Includes links to stuff which used to be in the previous section but is not used anymore. Only created this section in June 2023, so stuff I used earlier might not be here. Sorted with the most recently dropped things at the top.
- [eww](https://github.com/elkowar/eww) - experimented with eww for a bit, but setup was painful and bars are a bit useless
- [Neogit](https://github.com/NeogitOrg/neogit) — was a bit slow / clunky, so I switched to [lazygit](https://github.com/jesseduffield/lazygit)
- [Slambda](https://github.com/Mateiadrielrafael/slambda) — custom keyboard chording utility. I retired the project in favour of [kanta](https://github.com/jtroo/kanata)
- [GPG](https://gnupg.org/) + [pass](https://www.passwordstore.org/) — I switched to [vaultwarden](https://github.com/dani-garcia/vaultwarden/)
- [Agenix](https://github.com/ryantm/agenix) & [homeage](https://github.com/jordanisaacs/homeage) — I switched to [sops-nix](https://github.com/Mic92/sops-nix)
@ -129,10 +136,3 @@ Includes links to stuff which used to be in the previous section but is not used
- [Rofi](https://github.com/davatorium/rofi) — program launcher. I switched to [Wofi](https://sr.ht/~scoopta/wofi/).
- [Spectacle](https://apps.kde.org/spectacle/) — screenshot tool. I switched to [Grimblast](https://github.com/hyprwm/contrib/tree/main/grimblast).
- [Chrome](https://www.google.com/chrome/) — web browser. I switched to `firefox` because it offers a better HM module.
## Future
Tooling I might use in the future:
- [nix-darwin](https://github.com/LnL7/nix-darwin) - like nixos but for macs
- [eww](https://github.com/elkowar/eww) - widget framework

View file

@ -15,8 +15,8 @@ let
"\\e\\[69\\;5u" = "edit_command_buffer";
# C-enter to run command through a pager
"\\e\\[13\\;2u" = "commandline -a ' | $PAGER' && commandline -f execute";
# C-g to open neogit
"\\cg" = "nvim +Neogit";
# C-g to open lazygit
"\\cg" = "lazygit";
};
mkKeybind = key: value:

View file

@ -1,242 +0,0 @@
# Neovim config
## Articles
- [Textobjects](https://blog.carbonfive.com/vim-text-objects-the-definitive-guide/)
- [Registers](https://www.brianstorti.com/vim-registers/)
- [Markers](https://vim.fandom.com/wiki/Using_marks)
## Keybinds
I feel like macro recording is a rare thing, so I moved it to `yq/yQ`. This frees up `q` as a "namespace" of sorts for other default vim keybinds I want to move out. For example, I use `J` for diagnostics, so I moved the default action from `J` to `qj`.
> Things written using italics are chords
> (aka all the keys need to be pressed at the same time)
### Base
| Keybind | Description | Plugins |
| ----------- | ------------------------------------------------ | ------- |
| \<leader>a | [A]lternate file | |
| \<leader>rw | [R]eplace [w]ord under cursor in the entire file | |
| \<leader>sw | toggle word [w]rap and visual-line keybinds | |
| Q | [Q]uit all buffers | |
| [d | Previous [d]iagnostic | |
| d] | Next [d]iagnostic | |
| J | Hover over diagnostic | |
| yq | Merge with next line | |
| \<leader>D | [D]iagnostic loclist | |
| _jk_ | Exit insert mode | |
| _jo_ | Save file | |
| S-Enter | Newline without continuing comment | |
### Textobjects
| Keybinds | Description | Plugins |
| -------- | -------------------------- | ------- |
| aq | [A]round [q]uotes | |
| iq | [I]nside [q]uotes | |
| aa | [A]round [a]phostrophes | |
| ia | [I]nside [a]phostrophes | |
| ar | [A]round squa[r]e brackets | |
| ir | [I]nside squa[r]e brackets | |
### Treesitter
| Keybinds | Description |
| -------- | ------------------------------- |
| ]f | Go to next [f]unction start |
| ]F | Go to next [f]unction end |
| [f | Go to previous [f]unction start |
| [F | Go to previous [f]unction end |
| ]c | Go to next [c]lass start |
| ]C | Go to next [c]lass end |
| [c | Go to previous [c]lass start |
| [C | Go to previous [c]lass end |
#### Textobjects
| Keybinds | Description |
| -------- | ------------------- |
| af | [A]round [f]unction |
| if | [I]nside [f]unction |
| ac | [A]round [c]lass |
| ic | [I]nside [c]lass |
### Telescope
The `<leader>f` namespace contains keybinds which search for a specific filetype.
| Keybind | Description | Plugins |
| ----------- | -------------------- | --------- |
| C-p | Find files | |
| C-f | Grep in project | |
| \<leader>d | Diagnostics | lspconfig |
| \<leader>t | Show builtin pickers | |
| \<leader>ft | Typescript Files | |
| \<leader>fl | Latex Files | |
| \<leader>fp | Purescript Files | |
| \<leader>fn | Nix Files | |
### Cmp
| Keybind | Description |
| ------- | ------------------------ |
| C-d | Scroll completion up |
| C-s | Scroll completion down |
| Enter | Accept current competion |
### Lsp
The lsp configuration introduces the namespace `<leader>w` used for workspace manipulation.
| Keybind | Description |
| ----------- | --------------------------- |
| gd | [G]o to [d]efinition |
| gr | [G]o to [r]eferences |
| gi | [G]o to [i]mplementation |
| K | Hover |
| L | Signature help |
| \<leader>c | [C]ode actions |
| \<leader>F | [F]ormat file |
| \<leader>li | [l]sp [i]nfo |
| \<leader>rn | [R]e[n]ame |
| \<leader>wa | [W]orkspace [a]dd folder |
| \<leader>wr | [W]orkspace [r]emove folder |
| \<leader>wl | [W]orkspace [l]ist folders |
### Vimux
Vimux keybinds live in the `<leader>v` namespace. Most vimux keybinds are filetype specific.
| Keybind | Description |
| ----------- | -------------------------- |
| \<leader>vc | [V]imux clear |
| \<leader>vl | [V]imux rerun last |
| \<leader>vp | [V]imux prompt for command |
### Luasnip
| Keybind | Description |
| ----------- | ---------------------------- |
| Tab | Jump to next placeholder |
| S-Tab | Jump to previous placeholder |
| \<leader>rs | [R]eload [s]nippets |
### Filetypes
General filetype local keybinds reside inside the `<leader>l` namespace.
#### Purescript
| Keybind | Description |
| ----------- | ------------------------- |
| \<leader>vb | [V]imux run spago [b]uild |
| \<leader>vt | [V]imux run spago [t]est |
#### Nix
| Keybind | Description |
| ----------- | ------------------------ |
| \<leader>lg | Update [g]it fetch calls |
#### Idris
Idris keybinds live in the `<leader>I` namespace.
| Keybind | Description |
| ----------- | ------------------- |
| \<leader>IC | Make [c]ase |
| \<leader>IL | Make [l]emma |
| \<leader>Ic | Add [c]lause |
| \<leader>Ie | [E]xpression search |
| \<leader>Id | Generate [d]ef |
| \<leader>Is | [S]plit case |
| \<leader>Ih | Refine [h]ole |
#### Lua
| Keybind | Description |
| ----------- | --------------------------------- |
| \<leader>lf | Run [f]ile |
| \<leader>ls | Import [f]ile and call .[s]etup() |
### Hydra
| Keybind | Description |
| ---------- | ------------------- |
| C-W | Enter [w]indow mode |
| \<leader>v | Enter [v]enn mode |
#### Window mode
| Keybind | Description |
| --------- | ---------------------------------------- |
| h/j/k/l | Move cursor by window in given direction |
| H/J/K/L | Move window in given direction |
| C-h/j/k/l | Resize window in given direction |
| = | Equalize |
| s | Split horizontally |
| v | Split vertically |
| o | Close all other |
| q | Close window |
#### Venn mode
| Keybind | Description |
| ------- | --------------------------------- |
| H/J/K/L | Continue arrow in given direction |
| f | Surround selected region with box |
### Firenvim
The following keybinds are available only when running inside firenvim:
| Keybind | Description |
| ------- | ------------- |
| C-z | Expand window |
### Small plugin keybinds
| Keybind | Description | Plugins |
| --------------------- | ----------------------------------- | -------------------- |
| gcc | Comment line | nvim-comment |
| gc | Comment selection | nvim-comment |
| C-g | Open neo[g]it | neogit |
| \<leader>yg | [Y]ank remote [g]it url | gitlinker |
| <tab>r[a][b] | Change surrounding pair from a to b | mini.surround |
| <tab>d[a] | Delete surrounding pair of a | mini.surround |
| <tab>s[m][a] | Surround the motion m with a | mini.surround |
| <tab>s[a] | Surround selected code with a | mini.surround |
| g= | Evaluate text | mini.operators |
| gm | Duplicate text | mini.operators |
| gr | Replace text with register | mini.operators |
| gx | Exchange text | mini.operators |
| C-F | Interactive file broswer | mini.files |
| s | Flash [s]earch | flash |
| S | Flash treesitter [s]elect | flash |
| r | remote [f]lash | flash |
| R | remote treesitter [f]lash | flash |
| C-s | Toggle flash [s]earch | flash |
| C-n | Open filetree | nvim-tree |
| \<leader>p | [P]aste imge from clipboard | clipboard-image.nvim |
| \<leader>L | [L]azy ui | lazy.nvim |
| C-h/j/k/l | Navigate panes | vim-tmux-navigator |
| \<leader\>H | Add file to harpoon | harpoon |
| C-a | Harpoon quick menu | harpoon |
| C-s q/w/e/r/a/s/d/f/z | Open harpoon file with index 0-9 | harpoon |
| <leader>lc | Open [l]ocal [c]argo.toml | rust-tools |
### Undocumented
#### Iron.nvim
Iron.nvim commands rest in the `<leader>i` namespace. There is a lot of them, and I rarely use this plugin, so I won't document them here just yet.
#### Magma
Magma commands live under the namespace `<leader>M`. I barely use this plugin, so I won't document my keybinds just yet.
#### Gitsigns
I use a slightly modified version of the default keybinds, and I've been too lazy to document everything.

View file

@ -375,7 +375,7 @@ let
event = "BufReadPost";
opts.enabled = true;
# TODO: blacklist harpoon, NeogitStatus
# TODO: blacklist harpoon
};
# }}}
# {{{ harpoon
@ -414,24 +414,6 @@ let
];
};
# }}}
# {{{ neogit
neogit = {
package = "TimUntersberger/neogit";
dependencies.lua = [ "plenary" ];
cond = blacklist [ "vscode" "firenvim" ];
cmd = "Neogit"; # We sometimes spawn this directly from fish using a keybind
keys = nmap "<c-g>" "<cmd>Neogit<cr>" "Open neo[g]it";
opts = true; # Here so the tempest runtime will call .setup
config.autocmds = {
event = "FileType";
pattern = "NeogitStatus";
group = "NeogitStatusDisableFolds";
action.vim.opt.foldenable = false;
};
};
# }}}
# {{{ telescope
telescope = {
package = "nvim-telescope/telescope.nvim";

View file

@ -7,15 +7,11 @@
./anyrun.nix
../desktop
../desktop/eww
];
# TODO: set up
# - volume/backlight controls
# - bar
# - configure hyprland colors using base16 stuff
# - look into swaylock or whatever people use
# - multiple keyboard layouts
home.sessionVariables = {
NIXOS_OZONES_WL = "1";

View file

@ -23,7 +23,10 @@ This directory contains custom module definitions used throughout my config.
## Nixos modules
There are no nixos modules at the moment!
| Name | Attribute | Description | Dependencies |
| ---------------------------- | ----------------- | ---------------------------------------- | ------------ |
| [pounce](./nixos/pounce.nix) | `services.pounce` | Module for pounce & calico configuration | |
| [nginx](./nixos/nginx.nix) | `satellite.proxy` | Helpers for nginx configuration | |
## Home-manager modules
@ -31,7 +34,6 @@ There are no nixos modules at the moment!
| ------------------------------------------------- | ----------------------- | --------------------------------------------------------------------------------- | ------------------------------------------------------------- |
| [discord](./home-manager/discord.nix) | `programs.discord` | Additional discord options | |
| [firefox](./home-manager/firefox) | `programs.firefox.apps` | Hacky system for wrapping websites into desktop apps by hiding the firefox tabbar | |
| [eww-hyprland](./home-manager/eww-hyprland.nix) | `programs.eww-hyprland` | `eww` service for `hyprland` | |
| [hyprpaper](./home-manager/hyprpaper.nix) | `services.hyprpaper` | Wallpaper service for `hyprland` | |
| [monitors](./home-manager/monitors.nix) | `satellite.monitors` | WM generic monitor configuration | |
| [persistence](./home-manager/persistence.nix) | `satellite.persistence` | Syntactic wrapper around impermanence | [impermanence](https://github.com/nix-community/impermanence) |

View file

@ -8,7 +8,6 @@
monitors = import ./monitors.nix;
satellite-dev = import ./satellite-dev.nix;
satellite-persistence = import ./persistence.nix;
eww-hyprland = import ./eww-hyprland.nix;
# Should upstream
discord = import ./discord.nix;

View file

@ -1,70 +0,0 @@
# A big chunk of this was taken from fuxefan's config:
# https://github.com/fufexan/dotfiles/blob/main/home/programs/eww/default.nix
{ config
, pkgs
, lib
, ...
}:
let
reloadScript = pkgs.writeShellScript "reload_eww" ''
${pkgs.systemd}/bin/systemctl
'';
cfg = config.programs.eww-hyprland;
in
{
options.programs.eww-hyprland = {
enable = lib.mkEnableOption "eww Hyprland config";
package = lib.mkOption {
type = lib.types.nullOr lib.types.package;
default = pkgs.eww-wayland;
defaultText = lib.literalExpression "pkgs.eww-wayland";
description = "Eww package to use.";
};
autoReload = lib.mkOption {
type = lib.types.bool;
default = false;
defaultText = lib.literalExpression "false";
description = "Whether to restart the eww daemon and windows on change.";
};
dependencies = lib.mkOption {
type = lib.types.listOf lib.types.package;
default = [ ];
defaultText = lib.literalExpression "[]";
description = "Extra packages eww should have access to.";
};
extraConfig = lib.mkOption {
type = lib.types.lines;
default = null;
description = "Extra configuration for eww.";
};
};
config = lib.mkIf cfg.enable {
home.packages = [ cfg.package ];
# remove nix files
xdg.configFile."eww/eww.yuck" = {
text = cfg.extraConfig or "";
onChange = lib.mkIf cfg.autoReload reloadScript.outPath;
};
systemd.user.services.eww = {
Unit = {
Description = "Eww Daemon";
PartOf = [ "graphical-session.target" ];
};
Service = {
Environment = "PATH=/run/wrappers/bin:${lib.makeBinPath cfg.dependencies}";
ExecStart = "${cfg.package}/bin/eww daemon --no-daemonize";
Restart = "on-failure";
};
Install.WantedBy = [ "graphical-session.target" ];
};
};
}