From 497511a4e960dd054441b02497286baf64d2436d Mon Sep 17 00:00:00 2001 From: prescientmoon Date: Sun, 25 Feb 2024 05:51:41 +0100 Subject: [PATCH] Remove eww remains, and fully switch to lazygit --- README.md | 14 +- home/features/cli/fish/default.nix | 4 +- home/features/neovim/config/README.md | 242 -------------------------- home/features/neovim/default.nix | 20 +-- home/features/wayland/global.nix | 4 - modules/README.md | 6 +- modules/home-manager/default.nix | 1 - modules/home-manager/eww-hyprland.nix | 70 -------- 8 files changed, 14 insertions(+), 347 deletions(-) delete mode 100644 home/features/neovim/config/README.md delete mode 100644 modules/home-manager/eww-hyprland.nix diff --git a/README.md b/README.md index 13e63a5..e31f5cb 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/home/features/cli/fish/default.nix b/home/features/cli/fish/default.nix index 0365bdb..642039e 100644 --- a/home/features/cli/fish/default.nix +++ b/home/features/cli/fish/default.nix @@ -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: diff --git a/home/features/neovim/config/README.md b/home/features/neovim/config/README.md deleted file mode 100644 index f00ae3b..0000000 --- a/home/features/neovim/config/README.md +++ /dev/null @@ -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 | -| ----------- | ------------------------------------------------ | ------- | -| \a | [A]lternate file | | -| \rw | [R]eplace [w]ord under cursor in the entire file | | -| \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 | | -| \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 `f` namespace contains keybinds which search for a specific filetype. - -| Keybind | Description | Plugins | -| ----------- | -------------------- | --------- | -| C-p | Find files | | -| C-f | Grep in project | | -| \d | Diagnostics | lspconfig | -| \t | Show builtin pickers | | -| \ft | Typescript Files | | -| \fl | Latex Files | | -| \fp | Purescript Files | | -| \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 `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 | -| \c | [C]ode actions | -| \F | [F]ormat file | -| \li | [l]sp [i]nfo | -| \rn | [R]e[n]ame | -| \wa | [W]orkspace [a]dd folder | -| \wr | [W]orkspace [r]emove folder | -| \wl | [W]orkspace [l]ist folders | - -### Vimux - -Vimux keybinds live in the `v` namespace. Most vimux keybinds are filetype specific. - -| Keybind | Description | -| ----------- | -------------------------- | -| \vc | [V]imux clear | -| \vl | [V]imux rerun last | -| \vp | [V]imux prompt for command | - -### Luasnip - -| Keybind | Description | -| ----------- | ---------------------------- | -| Tab | Jump to next placeholder | -| S-Tab | Jump to previous placeholder | -| \rs | [R]eload [s]nippets | - -### Filetypes - -General filetype local keybinds reside inside the `l` namespace. - -#### Purescript - -| Keybind | Description | -| ----------- | ------------------------- | -| \vb | [V]imux run spago [b]uild | -| \vt | [V]imux run spago [t]est | - -#### Nix - -| Keybind | Description | -| ----------- | ------------------------ | -| \lg | Update [g]it fetch calls | - -#### Idris - -Idris keybinds live in the `I` namespace. - -| Keybind | Description | -| ----------- | ------------------- | -| \IC | Make [c]ase | -| \IL | Make [l]emma | -| \Ic | Add [c]lause | -| \Ie | [E]xpression search | -| \Id | Generate [d]ef | -| \Is | [S]plit case | -| \Ih | Refine [h]ole | - -#### Lua - -| Keybind | Description | -| ----------- | --------------------------------- | -| \lf | Run [f]ile | -| \ls | Import [f]ile and call .[s]etup() | - -### Hydra - -| Keybind | Description | -| ---------- | ------------------- | -| C-W | Enter [w]indow mode | -| \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 | -| \yg | [Y]ank remote [g]it url | gitlinker | -| r[a][b] | Change surrounding pair from a to b | mini.surround | -| d[a] | Delete surrounding pair of a | mini.surround | -| s[m][a] | Surround the motion m with a | mini.surround | -| 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 | -| \p | [P]aste imge from clipboard | clipboard-image.nvim | -| \L | [L]azy ui | lazy.nvim | -| C-h/j/k/l | Navigate panes | vim-tmux-navigator | -| \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 | -| lc | Open [l]ocal [c]argo.toml | rust-tools | - -### Undocumented - -#### Iron.nvim - -Iron.nvim commands rest in the `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 `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. diff --git a/home/features/neovim/default.nix b/home/features/neovim/default.nix index 07d7ee2..72a98da 100644 --- a/home/features/neovim/default.nix +++ b/home/features/neovim/default.nix @@ -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 "" "Neogit" "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"; diff --git a/home/features/wayland/global.nix b/home/features/wayland/global.nix index 4fa8c09..89c363f 100644 --- a/home/features/wayland/global.nix +++ b/home/features/wayland/global.nix @@ -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"; diff --git a/modules/README.md b/modules/README.md index 21058d4..3a877f9 100644 --- a/modules/README.md +++ b/modules/README.md @@ -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) | diff --git a/modules/home-manager/default.nix b/modules/home-manager/default.nix index 7d39b1e..aa9812d 100644 --- a/modules/home-manager/default.nix +++ b/modules/home-manager/default.nix @@ -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; diff --git a/modules/home-manager/eww-hyprland.nix b/modules/home-manager/eww-hyprland.nix deleted file mode 100644 index 62c7900..0000000 --- a/modules/home-manager/eww-hyprland.nix +++ /dev/null @@ -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" ]; - }; - }; -}