aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Weigl-Bosker <stefan@s00.xyz>2025-03-22 21:13:18 -0400
committerStefan Weigl-Bosker <stefan@s00.xyz>2025-03-22 21:13:18 -0400
commit320f194acd371b401168d0c9aa399918c682c8de (patch)
tree75070a5fcc7ff6c20f7bcc03994c5291bfbb6cca
parent11631fbc5db8954aa5108a371dbf924ef3094141 (diff)
downloadhome-320f194acd371b401168d0c9aa399918c682c8de.tar.gz
foo
-rw-r--r--form/home.nix1
-rw-r--r--modules/default.nix1
-rw-r--r--modules/global.nix17
-rw-r--r--modules/sway/default.nix29
-rw-r--r--modules/tmux/default.nix16
-rw-r--r--modules/tofi.nix52
-rw-r--r--void/home.nix9
-rwxr-xr-xvoid/services/mpdscribble/run3
8 files changed, 111 insertions, 17 deletions
diff --git a/form/home.nix b/form/home.nix
index 1b14a65..fe6d6ee 100644
--- a/form/home.nix
+++ b/form/home.nix
@@ -42,5 +42,6 @@
mako.enable = true;
neovide.enable = true;
zsh.enable = true;
+ tofi.enable = true;
};
}
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;
+ };
+ };
+ };
+}
diff --git a/void/home.nix b/void/home.nix
index 929684f..20f9d30 100644
--- a/void/home.nix
+++ b/void/home.nix
@@ -32,6 +32,12 @@
sway = {
enable = true;
terminal = "foot";
+ startup = [
+ {
+ command = "avizo-service";
+ always = false;
+ }
+ ];
};
i3status = {
@@ -54,6 +60,9 @@
"mpd" = {
run = "${builtins.readFile ./services/mpd/run}";
};
+ "mpdscribble" = {
+ run = "${builtins.readFile ./services/mpdscribble/run}";
+ };
"dbus" = {
run = "${builtins.readFile ./services/dbus/run}";
log = "${builtins.readFile ./services/dbus/log/run}";
diff --git a/void/services/mpdscribble/run b/void/services/mpdscribble/run
new file mode 100755
index 0000000..6884145
--- /dev/null
+++ b/void/services/mpdscribble/run
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+exec chpst -e "$TURNSTILE_ENV_DIR" mpdscribble --no-daemon