diff options
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/default.nix | 1 | ||||
| -rw-r--r-- | modules/global.nix | 17 | ||||
| -rw-r--r-- | modules/sway/default.nix | 29 | ||||
| -rw-r--r-- | modules/tmux/default.nix | 16 | ||||
| -rw-r--r-- | modules/tofi.nix | 52 |
5 files changed, 98 insertions, 17 deletions
diff --git a/modules/default.nix b/modules/default.nix index e2e0bd3..d6cb671 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -6,6 +6,7 @@ ./neovide.nix ./fzf.nix ./i3status.nix + ./tofi.nix ./tmux ./zsh ./sway diff --git a/modules/global.nix b/modules/global.nix index 8146fbe..4fe183c 100644 --- a/modules/global.nix +++ b/modules/global.nix @@ -18,6 +18,17 @@ in example = [ pkgs.cowsay pkgs.lolcat ]; default = []; }; + menu = mkOption { + type = lib.types.submodule { + package = lib.types.package; + dmenu = lib.mkOption { + type = lib.types.pathInStore; + description = "derivation that will behave like dmenu"; + example = pkgs.dmenu; + default = pkgs.tofi; + }; + }; + }; }; config = { @@ -68,11 +79,17 @@ in stateVersion = "24.11"; shell.enableZshIntegration = true; + sessionPath = [ + "$HOME/.local/opt/binaryninja/bin" + "$HOME/scripts" + ]; + packages = with pkgs; [ nerd-fonts.comic-shanns-mono eza ripgrep lean4 + dmenu ] ++ (lib.optional cfg.notNixOS nixgl.auto.nixGLDefault) ++ (lib.optionals cfg.wayland [ diff --git a/modules/sway/default.nix b/modules/sway/default.nix index a0348f3..8ea4e38 100644 --- a/modules/sway/default.nix +++ b/modules/sway/default.nix @@ -12,14 +12,16 @@ in }; startup = lib.mkOption { type = lib.types.listOf (lib.types.submodule { - command = lib.mkOption { - type = lib.types.string; - description = "Command to be executed on startup."; - }; - always = lib.mkOption { - type = lib.types.bool; - default = false; - description = "Whether to run command on each restart"; + options = { + command = lib.mkOption { + type = lib.types.string; + description = "Command to be executed on startup."; + }; + always = lib.mkOption { + type = lib.types.bool; + default = false; + description = "Whether to run command on each restart"; + }; }; }); default = [ ]; @@ -28,9 +30,11 @@ in }; config = { - home.packages = with pkgs; [(writeShellScriptBin "browser" '' - swaymsg 'set $PROP newcont:tabbed ; exec qutebrowser --target window' - '')]; + home.packages = with pkgs; [ + (writeShellScriptBin "browser" '' + swaymsg 'set $PROP newcont:tabbed ; exec qutebrowser --target window' + '') + ]; wayland.windowManager.sway = lib.mkIf cfg.enable { enable = true; package = if cfg.wrapWithNixGL then config.lib.nixGL.wrap pkgs.sway else pkgs.sway; @@ -49,7 +53,8 @@ in }; terminal = "${cfg.terminal}"; - menu = ''wmenu-run -n 4c4c4c -N 0d0d0d -s 8aac8b -S 0d0d0d -l 10 -f "ComicShannsMono Nerd Font Mono 10"''; + # menu = ''wmenu-run -n 4c4c4c -N 0d0d0d -s 8aac8b -S 0d0d0d -l 10 -f "ComicShannsMono Nerd Font Mono 10"''; + menu = "tofi-run | xargs swaymsg exec"; defaultWorkspace = "workspace number 1"; diff --git a/modules/tmux/default.nix b/modules/tmux/default.nix index 88282e8..a74d447 100644 --- a/modules/tmux/default.nix +++ b/modules/tmux/default.nix @@ -32,7 +32,7 @@ in # screen ls colors fixed, zsh autosuggestions broken set -g renumber-windows on - bind r source-file ~/.config/tmux/tmux.conf + bind R source-file ~/.config/tmux/tmux.conf bind w switch-client -T split bind t switch-client -T tab @@ -47,10 +47,10 @@ in bind -T tab i next-window bind -T tab n new-window - bind -T dir o run-shell -b 'fd . $(pwd) -td | fzf --tmux | xargs --no-run-if-empty tmux split-window -h -c' - bind -T dir O run-shell -b 'fd . $(pwd) -td | fzf --tmux | xargs --no-run-if-empty tmux new-window -c' - bind -T file o run-shell -b 'fd . $(pwd) -tf | fzf --tmux | xargs --no-run-if-empty tmux split-window -h -c $(pwd) $EDITOR' - bind -T file O run-shell -b 'fd . $(pwd) -tf | fzf --tmux | xargs --no-run-if-empty tmux new-window -c $(pwd) $EDITOR' + bind -T dir o run-shell -b 'fd . -td | fzf --tmux --scheme=path | xargs --no-run-if-empty tmux split-window -h -c' + bind -T dir O run-shell -b 'fd . -td | fzf --tmux --scheme=path | xargs --no-run-if-empty tmux new-window -c' + bind -T file o run-shell -b 'fd . -tf | fzf --tmux --scheme=path | xargs --no-run-if-empty tmux split-window -h -c $(pwd) $EDITOR' + bind -T file O run-shell -b 'fd . -tf | fzf --tmux --scheme=path | xargs --no-run-if-empty tmux new-window -c $(pwd) $EDITOR' bind -T split i split-window -h bind -T split n split-window @@ -88,6 +88,12 @@ in bind -r E resize-pane -U 10 bind -r I resize-pane -R 10 + bind \[ swap-pane -U + bind \] swap-pane -D + + bind v copy-mode-vi + bind F resize-pane -Z + bind h select-pane -m bind j next-window bind l display-message diff --git a/modules/tofi.nix b/modules/tofi.nix new file mode 100644 index 0000000..424a921 --- /dev/null +++ b/modules/tofi.nix @@ -0,0 +1,52 @@ +{ config, lib, pkgs, ... }: +let + cfg = config.modules.tofi; +in +{ + options.modules.tofi = { + enable = lib.mkEnableOption "tofi"; + }; + + config = lib.mkIf cfg.enable { + home.packages = with pkgs; [ + ]; + programs.tofi = { + enable = true; + settings = { + font = "ComicShannsMono Nerd Font Mono 10"; + "font-size" = 15; + + width = "60%"; + height = "50%"; + + "text-color" = "#cacaca"; + "placeholder-color" = "#0f0f0f"; + + "selection-background" = "#151515FF"; + "selection-color" = "#8aac8b"; + "selection-background-padding"= "0, -1"; + + "text-cursor-style"="bar"; + "text-cursor-color"="#cacaca"; + + "prompt-text"=""; + + "background-color"="#0f0f0f"; + + "outline-width" = 2; + "outline-color" = "#191919"; + + "border-width"=0; + "border-color"="#00000000"; + + + "corner-radius"=8; + + "text-cursor" = true; + "hidden-character" = ""; + terminal = "foot"; + ascii-input = true; + }; + }; + }; +} |