aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorArpit Chakladar <54011232+arpitchakladar@users.noreply.github.com>2025-07-14 02:32:19 +0530
committerArpit Chakladar <54011232+arpitchakladar@users.noreply.github.com>2025-07-14 02:32:19 +0530
commitde166231fa4954a2cdc68265da9fbaf072c0d3b1 (patch)
tree278affcc512bad2441cf965b8ab629aedea4378d /modules
parent3b09a24e0a5733f4fb527120a9c710f511862023 (diff)
downloadhome-manager-config-de166231fa4954a2cdc68265da9fbaf072c0d3b1.tar.gz
home-manager-config-de166231fa4954a2cdc68265da9fbaf072c0d3b1.zip
Added neofetch and restarting polybar on bspwm loaded.
Diffstat (limited to 'modules')
-rw-r--r--modules/graphical/bspwm/default.nix1
-rw-r--r--modules/graphical/default.nix2
-rw-r--r--modules/graphical/polybar/bar/main.nix4
-rw-r--r--modules/graphical/polybar/default.nix2
-rw-r--r--modules/graphical/sxhkd/default.nix2
-rw-r--r--modules/tools/default.nix2
-rw-r--r--modules/tools/neofetch/default.nix13
-rw-r--r--modules/tools/rofi/default.nix15
-rw-r--r--modules/tools/rofi/theme.mustache.rasi82
9 files changed, 119 insertions, 4 deletions
diff --git a/modules/graphical/bspwm/default.nix b/modules/graphical/bspwm/default.nix
index 24b15fd..657b129 100644
--- a/modules/graphical/bspwm/default.nix
+++ b/modules/graphical/bspwm/default.nix
@@ -36,6 +36,7 @@
for monitor in $(xrandr -q | grep -w 'connected' | cut -d' ' -f1); do
bspc monitor "$monitor" -d '1' '2' '3' '4' '5' '6'
done
+polybar-msg cmd restart
'';
};
}
diff --git a/modules/graphical/default.nix b/modules/graphical/default.nix
index 7154f55..37fc04b 100644
--- a/modules/graphical/default.nix
+++ b/modules/graphical/default.nix
@@ -20,7 +20,7 @@
${if config.tools.feh.enable then
"${pkgs.feh}/bin/feh --bg-scale ${../../assets/skeleton-mage.png}"
else "xsetroot -solid \"${config.scheme.withHashtag.base00}\""}
-exec ${pkgs.bspwm}/bin/bspwm
+${pkgs.bspwm}/bin/bspwm
";
};
}
diff --git a/modules/graphical/polybar/bar/main.nix b/modules/graphical/polybar/bar/main.nix
index 06fa63f..c52c3f7 100644
--- a/modules/graphical/polybar/bar/main.nix
+++ b/modules/graphical/polybar/bar/main.nix
@@ -7,7 +7,9 @@ in {
width = "100%:-20";
fixed-center = false;
height = 35;
- override-redirect = true;
+ override-redirect = false;
+ wm-restack = "bspwm";
+ enable-ipc = true;
border-top-size = 1;
border-bottom-size = 1;
diff --git a/modules/graphical/polybar/default.nix b/modules/graphical/polybar/default.nix
index 7b02088..a181779 100644
--- a/modules/graphical/polybar/default.nix
+++ b/modules/graphical/polybar/default.nix
@@ -8,7 +8,7 @@
];
services.polybar.script = "
export PATH=${pkgs.coreutils}/bin/:$PATH
-${config.services.polybar.package}/bin/polybar main
+${config.services.polybar.package}/bin/polybar main &
";
services.polybar.config = lib.mkMerge [
(import ./bar { inherit config lib; })
diff --git a/modules/graphical/sxhkd/default.nix b/modules/graphical/sxhkd/default.nix
index 1b362cf..a65d3fa 100644
--- a/modules/graphical/sxhkd/default.nix
+++ b/modules/graphical/sxhkd/default.nix
@@ -21,7 +21,7 @@
(createKeybinding
"r"
"Application launcher."
- "rofi")
+ "rofi -show drun")
(createKeybinding
"t"
diff --git a/modules/tools/default.nix b/modules/tools/default.nix
index 20b661d..631bacc 100644
--- a/modules/tools/default.nix
+++ b/modules/tools/default.nix
@@ -9,8 +9,10 @@
./htop
./kitty
./lsd
+ ./neofetch
./neovim
./nnn
+ ./rofi
./zsh
];
}
diff --git a/modules/tools/neofetch/default.nix b/modules/tools/neofetch/default.nix
new file mode 100644
index 0000000..b9afc33
--- /dev/null
+++ b/modules/tools/neofetch/default.nix
@@ -0,0 +1,13 @@
+{ config, lib, pkgs, ... }:
+
+{
+ options.tools.neofetch = {
+ enable = lib.mkEnableOption "Enables neofetch.";
+ };
+
+ config = lib.mkIf config.tools.neofetch.enable {
+ home.packages = with pkgs; [
+ neofetch
+ ];
+ };
+}
diff --git a/modules/tools/rofi/default.nix b/modules/tools/rofi/default.nix
new file mode 100644
index 0000000..9f2bcd2
--- /dev/null
+++ b/modules/tools/rofi/default.nix
@@ -0,0 +1,15 @@
+{ pkgs, lib, config, ... }:
+
+{
+ options.tools.rofi = {
+ enable = lib.mkEnableOption "Enables rofi.";
+ };
+
+ config = lib.mkIf config.tools.rofi.enable {
+ programs.rofi.enable = true;
+ programs.rofi.font = "${config.fonts.normal} ${toString config.fonts.size}";
+ # programs.rofi.theme = config.scheme {
+ # template = builtins.readFile ./theme.mustache.rasi;
+ # };
+ };
+}
diff --git a/modules/tools/rofi/theme.mustache.rasi b/modules/tools/rofi/theme.mustache.rasi
new file mode 100644
index 0000000..02cdaf3
--- /dev/null
+++ b/modules/tools/rofi/theme.mustache.rasi
@@ -0,0 +1,82 @@
+configuration {
+ drun {
+ display-name: " ";
+ }
+
+ run {
+ display-name: " ";
+ }
+
+ window {
+ display-name: " ";
+ }
+
+ ssh {
+ display-name: " ";
+ }
+
+ timeout {
+ delay: 10;
+ action: "kb-cancel";
+ }
+}
+
+* {
+ border: 1;
+ margin: 0;
+ padding: 0;
+ spacing: 0;
+
+ bg: #{{base00-hex}};
+ bg-alt: #{{base01-hex}};
+ fg: #{{base07-hex}};
+ fg-alt: #{{base03-hex}};
+
+ background-color: @bg;
+ text-color: @fg;
+}
+
+window {
+ transparency: "real";
+ border-color: #{{base03-hex}};
+}
+
+mainbox {
+ children: [inputbar, listview];
+}
+
+inputbar {
+ background-color: @bg-alt;
+ children: [prompt, entry];
+}
+
+entry {
+ background-color: inherit;
+ padding: 12px 3px;
+}
+
+prompt {
+ background-color: inherit;
+ padding: 12px;
+}
+
+listview {
+ lines: 8;
+}
+
+element {
+ children: [element-text];
+}
+
+element-icon {
+ padding: 10px 10px;
+}
+
+element-text {
+ padding: 10px 10px;
+ text-color: @fg-alt;
+}
+
+element-text selected {
+ text-color: @fg;
+}