summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Kassouni <alex@kassouni.net>2026-07-25 20:26:11 -0700
committerAlexander Kassouni <alex@kassouni.net>2026-07-25 20:26:11 -0700
commitecec5136f63d32862a42117c957f1f5bab65d13b (patch)
tree8569ae3b4b666505586ac716c98e3d9810a119b0
parent2f815bb8fbf9397c92f0d88b80dd83c6ef5698b7 (diff)
rofi theming, command palette
-rw-r--r--Makefile1
-rw-r--r--flake.lock4
-rw-r--r--users/kassouni/home.nix4
-rw-r--r--users/kassouni/palette/default.nix21
-rw-r--r--users/kassouni/palette/reboot.nix5
-rw-r--r--users/kassouni/palette/screenshot.nix5
-rw-r--r--users/kassouni/palette/shutdown.nix5
-rw-r--r--users/kassouni/rofi.nix79
-rw-r--r--users/kassouni/theme.nix4
9 files changed, 123 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 71c223b..0236ef9 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,7 @@
.PHONY: rebuild format
rebuild:
+ nix flake update xmonad-config
sudo nixos-rebuild switch --flake .
format:
diff --git a/flake.lock b/flake.lock
index ffe79d7..143758a 100644
--- a/flake.lock
+++ b/flake.lock
@@ -208,8 +208,8 @@
"nixpkgs": "nixpkgs_4"
},
"locked": {
- "lastModified": 1784700603,
- "narHash": "sha256-Mz3jt1TbCpd1p4Z8NtHS6dUuby7P4+pSxoHNi+ab/Ys=",
+ "lastModified": 1784875697,
+ "narHash": "sha256-ueJpwT4JUqMwYUWJ6eHBDblK5YfgclshvlQTu2T62ck=",
"path": "/home/kassouni/Developer/xmonad-config",
"type": "path"
},
diff --git a/users/kassouni/home.nix b/users/kassouni/home.nix
index 027a9e3..cfbd86b 100644
--- a/users/kassouni/home.nix
+++ b/users/kassouni/home.nix
@@ -8,6 +8,7 @@
imports = [
./neovim.nix
./fuzzel.nix
+ ./rofi.nix
./ssh.nix
./ayu.nix
./git.nix
@@ -17,6 +18,7 @@
./cursor.nix
./bash.nix
./scripts
+ ./palette
];
xmonad-config = {
@@ -26,6 +28,7 @@
url = "https://i.redd.it/p5flk9uzzxxz.jpg";
sha256 = "1qcl6yh6l24sz3qprj3iyzinj3lyh3c426i6zwambwg816yg3bxs";
};
+ xmobar.font = config.theme.font;
};
home.sessionVariables = {
@@ -48,7 +51,6 @@
claude-code
tldr
curl
- rofi
_1password-gui
opencode
spotify
diff --git a/users/kassouni/palette/default.nix b/users/kassouni/palette/default.nix
new file mode 100644
index 0000000..08c68b1
--- /dev/null
+++ b/users/kassouni/palette/default.nix
@@ -0,0 +1,21 @@
+{ pkgs, lib, ... }:
+let
+ commandFiles = lib.attrNames (
+ lib.filterAttrs (name: type: type == "regular" && name != "default.nix" && lib.hasSuffix ".nix" name)
+ (builtins.readDir ./.)
+ );
+ commands = map (file: pkgs.callPackage (./. + "/${file}") { }) commandFiles;
+ palette = pkgs.symlinkJoin {
+ name = "palette";
+ paths = commands;
+ };
+in
+{
+ home.packages = [
+ (pkgs.writers.writeBashBin "open-palette" ''
+ set -eu
+ choice=$(${pkgs.coreutils}/bin/ls ${palette}/bin | ${pkgs.rofi}/bin/rofi -dmenu -i -p palette)
+ exec "${palette}/bin/$choice"
+ '')
+ ];
+}
diff --git a/users/kassouni/palette/reboot.nix b/users/kassouni/palette/reboot.nix
new file mode 100644
index 0000000..0b5d51f
--- /dev/null
+++ b/users/kassouni/palette/reboot.nix
@@ -0,0 +1,5 @@
+{ writers, systemd }:
+writers.writeBashBin "reboot" ''
+ set -eu
+ ${systemd}/bin/systemctl reboot
+''
diff --git a/users/kassouni/palette/screenshot.nix b/users/kassouni/palette/screenshot.nix
new file mode 100644
index 0000000..2190024
--- /dev/null
+++ b/users/kassouni/palette/screenshot.nix
@@ -0,0 +1,5 @@
+{ writers, maim, xclip }:
+writers.writeBashBin "screenshot" ''
+ set -eu
+ ${maim}/bin/maim -s | ${xclip}/bin/xclip -selection clipboard -t image/png
+''
diff --git a/users/kassouni/palette/shutdown.nix b/users/kassouni/palette/shutdown.nix
new file mode 100644
index 0000000..919cf0a
--- /dev/null
+++ b/users/kassouni/palette/shutdown.nix
@@ -0,0 +1,5 @@
+{ writers, systemd }:
+writers.writeBashBin "shutdown" ''
+ set -eu
+ ${systemd}/bin/systemctl poweroff
+''
diff --git a/users/kassouni/rofi.nix b/users/kassouni/rofi.nix
new file mode 100644
index 0000000..740047b
--- /dev/null
+++ b/users/kassouni/rofi.nix
@@ -0,0 +1,79 @@
+{ config, ... }:
+
+let
+ inherit (config.lib.formats.rasi) mkLiteral;
+ colors = config.colorScheme;
+in
+{
+ programs.rofi = {
+ enable = true;
+ font = "${config.theme.font.family} ${builtins.toString config.theme.font.size}";
+
+ theme = {
+ "*" = {
+ background-color = mkLiteral "transparent";
+ text-color = mkLiteral colors.editor.fg;
+ };
+
+ window = {
+ background-color = mkLiteral colors.ui.popup.bg;
+ border = mkLiteral "2px";
+ border-color = mkLiteral colors.ui.line;
+ border-radius = mkLiteral "8px";
+ padding = mkLiteral "16px";
+ width = mkLiteral "40%";
+ };
+
+ inputbar = {
+ children = map mkLiteral [ "prompt" "entry" ];
+ background-color = mkLiteral colors.ui.panel.bg;
+ border-radius = mkLiteral "4px";
+ padding = mkLiteral "8px";
+ spacing = mkLiteral "8px";
+ };
+
+ prompt = {
+ text-color = mkLiteral colors.common.accent.tint;
+ };
+
+ entry = {
+ placeholder = "Search";
+ placeholder-color = mkLiteral colors.ui.fg;
+ };
+
+ listview = {
+ lines = 8;
+ scrollbar = false;
+ spacing = mkLiteral "2px";
+ margin = mkLiteral "12px 0px 0px 0px";
+ };
+
+ element = {
+ padding = mkLiteral "8px";
+ border-radius = mkLiteral "4px";
+ spacing = mkLiteral "8px";
+ };
+
+ "element normal urgent" = {
+ text-color = mkLiteral colors.common.error;
+ };
+
+ "element normal active" = {
+ text-color = mkLiteral colors.common.accent.tint;
+ };
+
+ "element selected normal" = {
+ background-color = mkLiteral colors.common.accent.tint;
+ text-color = mkLiteral colors.surface.base;
+ };
+
+ element-icon = {
+ size = mkLiteral "1em";
+ };
+
+ element-text = {
+ text-color = mkLiteral "inherit";
+ };
+ };
+ };
+}
diff --git a/users/kassouni/theme.nix b/users/kassouni/theme.nix
index 9d049e7..4c96615 100644
--- a/users/kassouni/theme.nix
+++ b/users/kassouni/theme.nix
@@ -5,8 +5,8 @@
theme = {
font = {
size = lib.mkOption {
- type = lib.types.float;
- default = 12.0;
+ type = lib.types.int;
+ default = 24;
description = "Global font size for all applications";
};