summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--home/apps/default.nix1
-rw-r--r--home/apps/rofi/config.rasi99
-rw-r--r--home/apps/rofi/default.nix23
-rw-r--r--home/apps/rofi/theme.nix27
-rw-r--r--home/desktops/hyprland/settings.nix40
-rw-r--r--hosts/shinji/default.nix2
-rw-r--r--options.nix1
7 files changed, 182 insertions, 11 deletions
diff --git a/home/apps/default.nix b/home/apps/default.nix
index 58cd117..ebbd605 100644
--- a/home/apps/default.nix
+++ b/home/apps/default.nix
@@ -1,5 +1,6 @@
_: {
imports = [
+ ./rofi
./waybar
./wofi
./alacritty.nix
diff --git a/home/apps/rofi/config.rasi b/home/apps/rofi/config.rasi
new file mode 100644
index 0000000..8d8b1a4
--- /dev/null
+++ b/home/apps/rofi/config.rasi
@@ -0,0 +1,99 @@
+configuration {
+ modi: "drun";
+ drun-match-fields: "name";
+ matching: "glob";
+ sort: true;
+ show-icons: true;
+ font: "JetBrainsMono Nerd Font 10";
+}
+
+@theme "~/.config/rofi/theme.rasi"
+
+window {
+ height: 30em;
+ width: 57em;
+ padding: @border-width;
+ background-color: @primary;
+ border-color: @primary;
+ border-radius: @outer-radius;
+}
+
+mainbox {
+ orientation: horizontal;
+ children: [ "inputbar" , "listbox" ];
+ background-color: @base;
+ border-radius: @outer-radius;
+}
+
+inputbar {
+ width: 27em;
+ children: [ "entry" ];
+ background-image: @background;
+}
+
+entry {
+ enabled: false;
+}
+
+listbox {
+ margin: 1em;
+ children: [ "dummy" , "listview" , "dummy" ];
+ background-color: transparent;
+}
+
+listview {
+ columns: 1;
+ lines: 7;
+ scrollbar: false;
+ expand: false;
+ fixed-height: true;
+ fixed-columns: true;
+ text-color: @text;
+ background-color: transparent;
+}
+
+dummy {
+ background-color: transparent;
+}
+
+element {
+ spacing: 1em;
+ padding: 0.5em 0.5em 0.5em 1.5em;
+ cursor: pointer;
+ text-color: @text;
+ background-color: transparent;
+ border-radius: @inner-radius;
+}
+
+element selected.normal {
+ text-color: @surface;
+ background-color: @primary;
+}
+
+element-icon {
+ size: 2.7em;
+ cursor: inherit;
+ text-color: inherit;
+ background-color: transparent;
+}
+
+element-text {
+ vertical-align: 0.5;
+ horizontal-align: 0.0;
+ text-color: inherit;
+ background-color: transparent;
+}
+
+error-message {
+ text-color: @text;
+ background-color: @base;
+ text-transform: capitalize;
+ children: [ "textbox" ];
+}
+
+textbox {
+ text-color: @error;
+ background-color: inherit;
+ vertical-align: 0.5;
+ horizontal-align: 0.5;
+}
diff --git a/home/apps/rofi/default.nix b/home/apps/rofi/default.nix
new file mode 100644
index 0000000..80c88a2
--- /dev/null
+++ b/home/apps/rofi/default.nix
@@ -0,0 +1,23 @@
+{
+ config,
+ lib,
+ pkgs,
+ ...
+}: let
+ inherit (lib) mkIf;
+ theme = config.theme;
+ cfg = config.apps.rofi;
+in {
+ config = mkIf cfg.enable {
+ default.appLauncher = lib.mkOverride 700 "rofi -show drun";
+
+ home.packages = [
+ pkgs.rofi
+ ];
+
+ home.file = {
+ ".config/rofi/config.rasi".source = ./config.rasi;
+ ".config/rofi/theme.rasi".text = import ./theme.nix {inherit theme;};
+ };
+ };
+}
diff --git a/home/apps/rofi/theme.nix b/home/apps/rofi/theme.nix
new file mode 100644
index 0000000..891b5a3
--- /dev/null
+++ b/home/apps/rofi/theme.nix
@@ -0,0 +1,27 @@
+{theme}: let
+ text = "#${theme.colors.text}";
+ base = "#${theme.colors.base}";
+ surface = "#${theme.colors.surface}";
+ primary = "#${theme.colors.primary}";
+ error = "#${theme.colors.error}";
+ outerGap = "${toString theme.outerGap}px";
+ innerGap = "${toString theme.innerGap}px";
+ outerRadius = "${toString theme.outerRadius}px";
+ innerRadius = "${toString theme.innerRadius}px";
+ borderWidth = "${toString theme.borderWidth}px";
+ wallpaper = theme.wallpaper;
+in ''
+ * {
+ primary: ${primary};
+ error: ${error};
+ base: ${base};
+ surface: ${surface};
+ text: ${text};
+ inner-radius: ${innerRadius};
+ outer-radius: ${outerRadius};
+ inner-gap: ${innerGap};
+ outer-gap: ${outerGap};
+ border-width: ${borderWidth};
+ background: url("${wallpaper}", height);
+ }
+''
diff --git a/home/desktops/hyprland/settings.nix b/home/desktops/hyprland/settings.nix
index 51c8b4d..d285b04 100644
--- a/home/desktops/hyprland/settings.nix
+++ b/home/desktops/hyprland/settings.nix
@@ -65,19 +65,27 @@
enabled = true;
bezier = [
- "windowIn, 0.06, 0.71, 0.25, 1"
- "windowResize, 0.04, 0.67, 0.38, 1"
+ "default, 0.12, 0.92, 0.08, 1.0"
+ "wind, 0.12, 0.92, 0.08, 1.0"
+ "overshot, 0.18, 0.95, 0.22, 1.03"
+ "linear, 1, 1, 1, 1"
];
animation = [
- "windowsIn, 1, 3, windowIn, slide #popin 20%"
- "windowsOut, 1, 3, windowIn, slide #popin 70%"
- "windowsMove, 1, 2.5, windowResize"
- "border, 1, 10, default"
- "borderangle, 1, 8, default"
- "fade, 1, 3, default"
- "workspaces, 1, 6, default"
- "layers, 1, 5, windowIn, slide"
+ "windows, 1, 5, wind, popin 60%"
+ "windowsIn, 1, 6, overshot, popin 60%"
+ "windowsOut, 1, 4, overshot, popin 60%"
+ "windowsMove, 1, 4, overshot, slide"
+ "layers, 1, 4, default, popin"
+ "fadeIn, 1, 7, default"
+ "fadeOut, 1, 7, default"
+ "fadeSwitch, 1, 7, default"
+ "fadeShadow, 1, 7, default"
+ "fadeDim, 1, 7, default"
+ "fadeLayers, 1, 7, default"
+ "workspaces, 1, 5, overshot, slide"
+ "border, 1, 1, linear"
+ "borderangle, 1, 24, linear, loop"
];
};
@@ -101,6 +109,18 @@
"noborder,forclass wofi"
];
+ # Layer rules
+ layerrule = [
+ "blur true, match:namespace wofi"
+ "ignore_alpha 0, match:namespace wofi"
+ "blur true, match:namespace notificaations"
+ "ignore_alpha 0, match:namespace notifications"
+ "blur true, match:namespace swaync-notificaation-window"
+ "ignore_alpha 0, match:namespace swaync-notification-window"
+ "blur true, match:namespace swaync-control-center"
+ "ignore_alpha 0, match:namespace swaync-control-center"
+ ];
+
# XWayland
xwayland = {
force_zero_scaling = "true";
diff --git a/hosts/shinji/default.nix b/hosts/shinji/default.nix
index 31ece3c..d502703 100644
--- a/hosts/shinji/default.nix
+++ b/hosts/shinji/default.nix
@@ -65,7 +65,7 @@
# modules
apps = {
astal.enable = true;
- wofi.enable = true;
+ rofi.enable = true;
hyprlock.enable = true;
kitty.enable = true;
};
diff --git a/options.nix b/options.nix
index 9753f99..a1fce0e 100644
--- a/options.nix
+++ b/options.nix
@@ -466,6 +466,7 @@ in {
hyprlock.enable = mkEnableOption "Enable the hyprlock lockscreen.";
waybar.enable = mkEnableOption "Enable the waybar bar.";
wofi.enable = mkEnableOption "Enable the wofi launcher.";
+ rofi.enable = mkEnableOption "Enable the rofi launcher.";
};
#