summaryrefslogtreecommitdiff
path: root/home/apps
diff options
context:
space:
mode:
Diffstat (limited to '')
-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/apps/wofi/default.nix2
-rw-r--r--home/apps/wofi/style.nix2
6 files changed, 152 insertions, 2 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/apps/wofi/default.nix b/home/apps/wofi/default.nix
index 2de9f45..b528f65 100644
--- a/home/apps/wofi/default.nix
+++ b/home/apps/wofi/default.nix
@@ -7,7 +7,7 @@
cfg = config.apps.wofi;
in {
config = mkIf cfg.enable {
- default.appLauncher = lib.mkDefault "wofi --show drun --prompt 'Seach Programs'";
+ default.appLauncher = lib.mkOverride 800 "wofi --show drun --prompt 'Seach Programs' --allow-images --no-actions --normal-window";
programs.wofi = {
enable = true;
diff --git a/home/apps/wofi/style.nix b/home/apps/wofi/style.nix
index 75a0a21..8d1fb75 100644
--- a/home/apps/wofi/style.nix
+++ b/home/apps/wofi/style.nix
@@ -18,7 +18,7 @@ in ''
/* Window */
window {
margin: 0px;
- border: ${borderWidth} solid ${primary};
+ border: none;
border-radius: ${outerRadius};
background-color: ${base};
}