Compare commits
No commits in common. "b8cd22e425cf4f419f616de261a28d687f12a63b" and "1c28932e84191c7bd9a6d80914e8920c9e796bee" have entirely different histories.
b8cd22e425
...
1c28932e84
11 changed files with 29 additions and 108 deletions
|
@ -10,20 +10,29 @@ if test -z "$CONTROLLER"; then
|
|||
fi
|
||||
|
||||
CAPACITY=$(cat "$CONTROLLER/capacity")
|
||||
STATUS=$(cat "$CONTROLLER/status")
|
||||
|
||||
echo -n ' '
|
||||
|
||||
if test "$STATUS" = "Charging"; then
|
||||
echo -n ""
|
||||
else
|
||||
print-battery-icon "$CAPACITY"
|
||||
fi
|
||||
|
||||
# Add terminating newline
|
||||
echo
|
||||
|
||||
# Tooltip
|
||||
echo -n ''
|
||||
print-battery-icon "$CAPACITY"
|
||||
echo " $CAPACITY%"
|
||||
|
||||
if test "$CAPACITY" -ge 90; then
|
||||
echo ''
|
||||
elif test "$CAPACITY" -ge 90; then
|
||||
echo ''
|
||||
elif test "$CAPACITY" -ge 80; then
|
||||
echo ''
|
||||
elif test "$CAPACITY" -ge 70; then
|
||||
echo ''
|
||||
elif test "$CAPACITY" -ge 60; then
|
||||
echo ''
|
||||
elif test "$CAPACITY" -ge 50; then
|
||||
echo ''
|
||||
elif test "$CAPACITY" -ge 40; then
|
||||
echo ''
|
||||
elif test "$CAPACITY" -ge 30; then
|
||||
echo ''
|
||||
elif test "$CAPACITY" -ge 20; then
|
||||
echo ''
|
||||
elif test "$CAPACITY" -ge 10; then
|
||||
echo ''
|
||||
else
|
||||
echo ''
|
||||
fi
|
||||
|
|
|
@ -137,9 +137,7 @@
|
|||
libinput
|
||||
libratbag
|
||||
];
|
||||
print-battery-icon = [ ];
|
||||
controller-battery = [ print-battery-icon ];
|
||||
mouse-battery = [ print-battery-icon ];
|
||||
controller-battery = [ ];
|
||||
_docker-block-external-connections = [
|
||||
iptables
|
||||
gawk
|
||||
|
|
|
@ -1,39 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
MODEL_NAME_FILE=$(rg --files-with-matches G502 /sys/class/power_supply/*/model_name | head -n1)
|
||||
|
||||
if test -z "$MODEL_NAME_FILE"; then
|
||||
echo
|
||||
exit 0
|
||||
fi
|
||||
|
||||
MOUSE=$(dirname "$MODEL_NAME_FILE")
|
||||
|
||||
if test -z "$MOUSE"; then
|
||||
echo
|
||||
exit 0
|
||||
fi
|
||||
|
||||
CAPACITY=$(cat "$MOUSE/capacity")
|
||||
STATUS=$(cat "$MOUSE/status")
|
||||
|
||||
echo -n '🖱️'
|
||||
|
||||
if test "$STATUS" = "Charging"; then
|
||||
echo -n ""
|
||||
else
|
||||
print-battery-icon "$CAPACITY"
|
||||
fi
|
||||
|
||||
if test "$CAPACITY" -lt 50; then
|
||||
echo -n "$CAPACITY%"
|
||||
fi
|
||||
|
||||
echo
|
||||
|
||||
# Tooltip
|
||||
echo -n '🖱️'
|
||||
print-battery-icon "$CAPACITY"
|
||||
echo " $CAPACITY%"
|
|
@ -1,33 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
if test $# -ne 1; then
|
||||
echo "Usage $0" >&2
|
||||
exit 1
|
||||
fi
|
||||
CAPACITY="$1"
|
||||
|
||||
if test "$CAPACITY" -ge 90; then
|
||||
echo -n ''
|
||||
elif test "$CAPACITY" -ge 90; then
|
||||
echo -n ''
|
||||
elif test "$CAPACITY" -ge 80; then
|
||||
echo -n ''
|
||||
elif test "$CAPACITY" -ge 70; then
|
||||
echo -n ''
|
||||
elif test "$CAPACITY" -ge 60; then
|
||||
echo -n ''
|
||||
elif test "$CAPACITY" -ge 50; then
|
||||
echo -n ''
|
||||
elif test "$CAPACITY" -ge 40; then
|
||||
echo -n ''
|
||||
elif test "$CAPACITY" -ge 30; then
|
||||
echo -n ''
|
||||
elif test "$CAPACITY" -ge 20; then
|
||||
echo -n ''
|
||||
elif test "$CAPACITY" -ge 10; then
|
||||
echo -n ''
|
||||
else
|
||||
echo -n ''
|
||||
fi
|
3
switch
3
switch
|
@ -4,9 +4,6 @@ set -euo pipefail
|
|||
|
||||
nix fmt
|
||||
|
||||
# Allow usage of untracked files in nix code
|
||||
git add --intent-to-add .
|
||||
|
||||
git --no-pager diff
|
||||
|
||||
run() {
|
||||
|
|
|
@ -49,7 +49,6 @@
|
|||
services.logind.extraConfig = ''
|
||||
HandlePowerKey=suspend
|
||||
'';
|
||||
services.upower.enable = true;
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
|
|
|
@ -61,8 +61,8 @@ in
|
|||
})
|
||||
(pkgs.fetchFirefoxAddon {
|
||||
name = "youtube_no_translation";
|
||||
url = "https://addons.mozilla.org/firefox/downloads/file/4561536/youtube_no_translation-2.11.0.xpi";
|
||||
hash = "sha256-8VpoUDbvZZf0oYGSHnXEiYDjfcPjQqtbDaxp5ndAJ94=";
|
||||
url = "https://addons.mozilla.org/firefox/downloads/file/4529979/youtube_no_translation-2.7.1.xpi";
|
||||
hash = "sha256-HOLeSWt0phsR/l3FcCRUUFCurU2zyBuZBlynlxPbGqs=";
|
||||
})
|
||||
# (pkgs.fetchFirefoxAddon {
|
||||
# name = "invidious_redirect";
|
||||
|
|
|
@ -110,7 +110,6 @@ in
|
|||
set global scrolloff 10,20
|
||||
set global autoreload yes
|
||||
set global startup_info_version 99999999
|
||||
set global grepcmd 'rg -Hn'
|
||||
|
||||
''
|
||||
+ (import ./colors.nix {
|
||||
|
@ -142,8 +141,6 @@ in
|
|||
aspell
|
||||
aspellDicts.en
|
||||
aspellDicts.pt_BR
|
||||
|
||||
ripgrep
|
||||
];
|
||||
home.activation = {
|
||||
update_kakoune = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||
|
|
|
@ -14,7 +14,6 @@ let
|
|||
terminal = "alacritty";
|
||||
|
||||
_lock = pkgs.writeShellScriptBin "_lock" ''
|
||||
pkill caffeinated || true
|
||||
${pkgs.sway}/bin/swaymsg mode default
|
||||
${pkgs.swaylock}/bin/swaylock -f
|
||||
'';
|
||||
|
@ -161,7 +160,7 @@ let
|
|||
screen_binds = {
|
||||
"XF86MonBrightnessDown" = "exec brightnessctl --min-value=1 set 5%-";
|
||||
"XF86MonBrightnessUp" = "exec brightnessctl --min-value=1 set 5%+";
|
||||
"${mod}+l" = "exec ${lib.getExe _lock}";
|
||||
"${mod}+l" = lib.getExe _lock;
|
||||
};
|
||||
|
||||
other_binds = {
|
||||
|
|
|
@ -38,7 +38,6 @@ in
|
|||
"custom/playerctl"
|
||||
"tray"
|
||||
"custom/controller-battery"
|
||||
"custom/mouse-battery"
|
||||
"custom/caffeine"
|
||||
"pulseaudio"
|
||||
(lib.optional (osConfig.services.vpn.enable or false) "custom/vpn")
|
||||
|
@ -165,11 +164,7 @@ in
|
|||
format = "{}";
|
||||
exec = lib.getExe pkgs.controller-battery;
|
||||
interval = 1;
|
||||
};
|
||||
"custom/mouse-battery" = {
|
||||
format = "{}";
|
||||
exec = lib.getExe pkgs.mouse-battery;
|
||||
interval = 1;
|
||||
tooltip = false;
|
||||
};
|
||||
"custom/caffeine" = {
|
||||
format = "{}";
|
||||
|
|
|
@ -38,7 +38,6 @@ window#waybar.solo {
|
|||
#custom-mpd,
|
||||
#custom-playerctl,
|
||||
#custom-controller-battery,
|
||||
#custom-mouse-battery,
|
||||
#tray,
|
||||
#clock,
|
||||
#network,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue