diff --git a/home/alex/home.nix b/home/alex/home.nix index 48cc283..a5a313c 100644 --- a/home/alex/home.nix +++ b/home/alex/home.nix @@ -7,6 +7,7 @@ ./services/polybar ./services/dunst ./services/udiskie + ./services/picom ]; home = { diff --git a/home/alex/programs/shell/default.nix b/home/alex/programs/shell/default.nix index b614b70..2a7adf6 100644 --- a/home/alex/programs/shell/default.nix +++ b/home/alex/programs/shell/default.nix @@ -1,7 +1,11 @@ { config, lib, pkgs, ... }: { - home.shellAliases = { suspend = "systemctl hibernate"; }; + home.shellAliases = { + suspend = "systemctl hibernate"; + nrs = "sudo nixos-rebuild switch --flake ."; + nrb = "sudo nixos-rebuild build --flake ."; + }; programs.zsh = { enable = true; diff --git a/home/alex/services/picom/default.nix b/home/alex/services/picom/default.nix new file mode 100644 index 0000000..047a0af --- /dev/null +++ b/home/alex/services/picom/default.nix @@ -0,0 +1,15 @@ +{ config, lib, pkgs, ... }: + +{ + config.services.picom = { + enable = true; + activeOpacity = 1.0; + inactiveOpacity = 0.8; + backend = "glx"; + fade = true; + fadeDelta = 5; + opacityRules = [ "100:name *= 'i3lock'" ]; + shadow = true; + shadowOpacity = 0.75; + }; +} diff --git a/home/alex/services/polybar/config.ini b/home/alex/services/polybar/config.ini index 2cedc8a..112a45f 100644 --- a/home/alex/services/polybar/config.ini +++ b/home/alex/services/polybar/config.ini @@ -52,7 +52,7 @@ font-0 = monospace;2 modules-left = xworkspaces xwindow modules-center = systray -modules-right = filesystem pulseaudio xkeyboard memory cpu wlan eth date +modules-right = filesystem pulseaudio xkeyboard memory cpu battery wlan eth backlight date cursor-click = pointer cursor-scroll = ns-resize @@ -73,6 +73,62 @@ type = internal/tray format-margin = 8pt tray-spacing = 16pt +[module/battery] +type = internal/battery + +; This is useful in case the battery never reports 100% charge +; Default: 100 +full-at = 99 + +; format-low once this charge percentage is reached +; Default: 10 +; New in version 3.6.0 +low-at = 10 + +; Use the following command to list batteries and adapters: +; $ ls -1 /sys/class/power_supply/ +battery = BAT0 +adapter = ADP0 + +; If an inotify event haven't been reported in this many +; seconds, manually poll for new values. +; +; Needed as a fallback for systems that don't report events +; on sysfs/procfs. +; +; Disable polling by setting the interval to 0. +; +; Default: 5 +poll-interval = 5 + +[module/backlight] +type = internal/xbacklight + +; XRandR output to get get values from +; Default: the monitor defined for the running bar +;output = DP-4 + +; Create scroll handlers used to set the backlight value +; Default: true +enable-scroll = true + +; Available tags: +;