summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaghuram Subramani <raghus2247@gmail.com>2024-03-10 11:11:53 +0530
committerRaghuram Subramani <raghus2247@gmail.com>2024-03-10 11:11:53 +0530
commit69abf9e4e25b3c8e3eef954b5b09e6734cfbedf9 (patch)
tree9963927769158bb3e57c5d1772fabd29a33261a5
parentf9342d23a46f2a5e558810404b0dfa0732bd71b3 (diff)
update
-rwxr-xr-xconfig/.bar.sh39
-rw-r--r--config/dotfiles.nix1
-rw-r--r--machines/x/configuration.nix1
-rw-r--r--machines/x/home.nix3
-rw-r--r--modules/wm_utils.nix4
-rw-r--r--packages/dwl.nix2
-rw-r--r--packages/dwlb.nix2
7 files changed, 46 insertions, 6 deletions
diff --git a/config/.bar.sh b/config/.bar.sh
new file mode 100755
index 0000000..2b23972
--- /dev/null
+++ b/config/.bar.sh
@@ -0,0 +1,39 @@
+#!/usr/bin/env bash
+wifi() {
+ iwgetid -r
+}
+
+battery() {
+ c=$(cat /sys/class/power_supply/BAT1/capacity)
+
+ if [[ $c > 85 ]]; then
+ echo " $c"
+ elif [[ $c > 70 ]]; then
+ echo " $c"
+ elif [[ $c > 50 ]]; then
+ echo " $c"
+ elif [[ $c > 30 ]]; then
+ echo " $c"
+ else
+ echo " $c"
+ fi
+}
+
+charging() {
+ if [[ "$(cat /sys/class/power_supply/BAT1/status)" == "Charging" ]]; then
+ echo "+"
+ fi
+}
+
+calendar() {
+ date +'%a, %d %b %Y |  %H:%M'
+}
+
+volume() {
+ pamixer --get-volume
+}
+
+while [[ true ]]; do
+ dwlb -status all "| ^lm(alacritty -e nmtui-connect) $(wifi)^lm() |  $(volume)% | $(battery)%$(charging) |  $(calendar) | λ"
+ sleep 1
+done
diff --git a/config/dotfiles.nix b/config/dotfiles.nix
index 1a89f9b..72564d2 100644
--- a/config/dotfiles.nix
+++ b/config/dotfiles.nix
@@ -4,5 +4,6 @@
home.file = {
".tmux.conf".source = ./.tmux.conf;
".fdignore".source = ./.fdignore;
+ ".bar.sh".source = ./.bar.sh;
};
}
diff --git a/machines/x/configuration.nix b/machines/x/configuration.nix
index 10af0bc..f736043 100644
--- a/machines/x/configuration.nix
+++ b/machines/x/configuration.nix
@@ -12,6 +12,7 @@
"polkit.nix"
"compromyse.nix"
"login.nix"
+ "wm_utils.nix"
"virtualization.nix"
"nvidia.nix"
]);
diff --git a/machines/x/home.nix b/machines/x/home.nix
index 9d0a4ab..fbd2ab9 100644
--- a/machines/x/home.nix
+++ b/machines/x/home.nix
@@ -31,8 +31,7 @@ in {
obs-studio
pavucontrol
- brillo
- playerctl
+ brightnessctl
pamixer
wbg
diff --git a/modules/wm_utils.nix b/modules/wm_utils.nix
index 7ddaca6..b111a20 100644
--- a/modules/wm_utils.nix
+++ b/modules/wm_utils.nix
@@ -1,13 +1,13 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
- networkmanagerapplet
-
polkit_gnome
libnotify
libappindicator
inotify-tools
+
+ wirelesstools
];
}
diff --git a/packages/dwl.nix b/packages/dwl.nix
index a3c46ca..76b10cb 100644
--- a/packages/dwl.nix
+++ b/packages/dwl.nix
@@ -27,7 +27,7 @@ stdenv.mkDerivation (finalAttrs: {
owner = "compromyse";
repo = "dwl";
rev = "master";
- hash = "sha256-C2wB/vCWr3LPvY0JpG6bzlw9fr0yPHccD4HTD+lH0Ac=";
+ hash = "sha256-eApUgB4DMdotIGLrxq9OvqC5cKn+w1lTV0dStDYGm34=";
};
nativeBuildInputs = [
diff --git a/packages/dwlb.nix b/packages/dwlb.nix
index 08dc7c6..60c8786 100644
--- a/packages/dwlb.nix
+++ b/packages/dwlb.nix
@@ -19,7 +19,7 @@ stdenv.mkDerivation (finalAttrs: {
owner = "compromyse";
repo = "dwlb";
rev = "master";
- hash = "sha256-cz3yqughpLdFZY3vIXvkKGVoC4ZrTzZQhaJWQ8XB3kQ=";
+ hash = "sha256-aXBny0OK4RiNwTYdmvDMMXgx4EIc5stUxov/nO7kTAg=";
};
nativeBuildInputs = [