From 7b42a09edbf77a23e78a6b3f251215469ce15146 Mon Sep 17 00:00:00 2001 From: Collin Williams <96917990+bluedragon1221@users.noreply.github.com> Date: Tue, 17 Jun 2025 17:55:29 +0000 Subject: changes, jupiter will be broken --- hosts/mercury/home.nix | 1 + modules/desktop/system/environments/sway.nix | 5 +++++ modules/terminal/system/programs/broot.nix | 6 ++++-- modules/terminal/system/programs/fish.nix | 3 +++ modules/terminal/system/programs/helix.nix | 10 ++++++++++ modules/terminal/workflow.md | 8 ++++++++ modules/user/home/default.nix | 3 --- modules/user/system/default.nix | 2 +- 8 files changed, 32 insertions(+), 6 deletions(-) create mode 100644 modules/terminal/workflow.md delete mode 100644 modules/user/home/default.nix diff --git a/hosts/mercury/home.nix b/hosts/mercury/home.nix index f3b0e4c..ed03452 100644 --- a/hosts/mercury/home.nix +++ b/hosts/mercury/home.nix @@ -1,4 +1,5 @@ {pkgs, ...}: { + home.preferXdgDirectories = true; home.packages = with pkgs; [ # GUI apps tor-browser # don't ask diff --git a/modules/desktop/system/environments/sway.nix b/modules/desktop/system/environments/sway.nix index ca5e0f7..df87da4 100644 --- a/modules/desktop/system/environments/sway.nix +++ b/modules/desktop/system/environments/sway.nix @@ -69,6 +69,11 @@ bindsym Mod4+2 workspace number 2 bindsym Mod4+3 workspace number 3 bindsym Mod4+4 workspace number 4 + bindsym Mod4+Shift+1 move container to workspace number 1 + bindsym Mod4+Shift+2 move container to workspace number 2 + bindsym Mod4+Shift+3 move container to workspace number 3 + bindsym Mod4+Shift+4 move container to workspace number 4 + bindsym Mod4+Return exec "${pkgs.foot}/bin/footclient" bindsym Mod4+Shift+Return exec ${pkgs.foot}/bin/foot bindsym Mod4+Space exec ${pkgs.fuzzel}/bin/fuzzel diff --git a/modules/terminal/system/programs/broot.nix b/modules/terminal/system/programs/broot.nix index ed86822..d36a5e5 100644 --- a/modules/terminal/system/programs/broot.nix +++ b/modules/terminal/system/programs/broot.nix @@ -10,9 +10,11 @@ conf = toml'.generate "conf.toml" { verbs = [ { - invocation = "edit"; + name = "open-code"; key = "enter"; - execution = "${pkgs.helix}/bin/hx {file}"; + execution = "$EDITOR +{line} {file}"; + working_dir = "{root}"; + leave_broot = true; } ]; }; diff --git a/modules/terminal/system/programs/fish.nix b/modules/terminal/system/programs/fish.nix index 7501251..7ce525f 100644 --- a/modules/terminal/system/programs/fish.nix +++ b/modules/terminal/system/programs/fish.nix @@ -46,6 +46,8 @@ ${pkgs.starship}/bin/starship init fish | source ${pkgs.broot}/bin/broot --print-shell-function fish | source + ${pkgs.pay-respects}/bin/pay-respects fish --alias | source + # extra bindings bind 'alt-c' cool-cd @@ -78,6 +80,7 @@ in unzip btop jq + pay-respects ]; }; } diff --git a/modules/terminal/system/programs/helix.nix b/modules/terminal/system/programs/helix.nix index 4ba78d0..8c39ec2 100644 --- a/modules/terminal/system/programs/helix.nix +++ b/modules/terminal/system/programs/helix.nix @@ -8,6 +8,16 @@ toml' = pkgs.formats.toml {}; languages = toml'.generate "languages.toml" { + language-server = { + rust-analyzer.command = "${pkgs.rust-analyzer}/bin/rust-analyzer"; + nil.command = "${pkgs.nil}/bin/nil"; + superhtml = { + command = "${pkgs.superhtml}/bin/superhtml"; + args = ["lsp"]; + }; + dhall-lsp-server.command = "${pkgs.dhall-lsp-server}/bin/dhall-lsp-server"; + }; + language = [ { name = "nix"; diff --git a/modules/terminal/workflow.md b/modules/terminal/workflow.md new file mode 100644 index 0000000..f7c80ac --- /dev/null +++ b/modules/terminal/workflow.md @@ -0,0 +1,8 @@ +# Terminal Workflow + +Each project that I'm working on has its own tmux session. +Using a variation of ThePrimeagen's tmux-sessionizer, I can switch to any project with `C-f`. + +Within a session, I use multiple panes and windows to organize my commands. +To open an existing file, get to a shell (either a new window, new pane, or freeing up the current pane), and hit `br` to launch broot. +From there, I can fuzzy find to the file, and hit `enter` to open it in Helix. diff --git a/modules/user/home/default.nix b/modules/user/home/default.nix deleted file mode 100644 index 9394bca..0000000 --- a/modules/user/home/default.nix +++ /dev/null @@ -1,3 +0,0 @@ -{ - home.preferXdgDirectories = true; -} diff --git a/modules/user/system/default.nix b/modules/user/system/default.nix index dad00e0..c558090 100644 --- a/modules/user/system/default.nix +++ b/modules/user/system/default.nix @@ -8,7 +8,7 @@ in { users.users."${cfg.name}" = { isNormalUser = true; description = cfg.name; - extraGroups = ["networkmanager" "disks"] ++ (lib.optional cfg.isAdmin "wheel"); + extraGroups = ["networkmanager" "disks" "input" "video"] ++ (lib.optional cfg.isAdmin "wheel"); hashedPassword = cfg.password; }; -- cgit v1.3.1