Compare commits
2 commits
baf95f3e8e
...
415744cfa8
| Author | SHA1 | Date | |
|---|---|---|---|
| 415744cfa8 | |||
| 43cb3eeb5a |
3 changed files with 16 additions and 4 deletions
|
|
@ -1,13 +1,15 @@
|
|||
{ pkgs, ... }:
|
||||
let
|
||||
charge-limit-apply = pkgs.writeShellScriptBin "charge-limit-apply" ''
|
||||
set -e
|
||||
if [ "$1" != "80" ] && [ "$1" != "100" ]; then
|
||||
echo "Usage: charge-limit-apply <80|100>" >&2
|
||||
exit 1
|
||||
fi
|
||||
${pkgs.fw-ectool}/bin/ectool fwchargelimit "$1"
|
||||
${pkgs.fw-ectool}/bin/ectool --interface=lpc fwchargelimit "$1"
|
||||
echo "$1" > /run/fw-charge-limit
|
||||
chmod 644 /run/fw-charge-limit
|
||||
echo "Charge limit set to $1%"
|
||||
'';
|
||||
|
||||
charge-limit-menu = pkgs.writeShellScriptBin "charge-limit-menu" ''
|
||||
|
|
@ -16,6 +18,7 @@ let
|
|||
"80%") /run/wrappers/bin/sudo ${charge-limit-apply}/bin/charge-limit-apply 80 ;;
|
||||
"100%") /run/wrappers/bin/sudo ${charge-limit-apply}/bin/charge-limit-apply 100 ;;
|
||||
esac
|
||||
sleep 1
|
||||
'';
|
||||
|
||||
waybar-battery = pkgs.writeShellScriptBin "waybar-battery" ''
|
||||
|
|
@ -82,7 +85,7 @@ in
|
|||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
ExecStart = "${pkgs.writeShellScript "fw-charge-limit-init" ''
|
||||
${pkgs.fw-ectool}/bin/ectool fwchargelimit 80
|
||||
${pkgs.fw-ectool}/bin/ectool --interface=lpc fwchargelimit 80
|
||||
echo 80 > /run/fw-charge-limit
|
||||
chmod 644 /run/fw-charge-limit
|
||||
''}";
|
||||
|
|
|
|||
|
|
@ -55,7 +55,16 @@ in
|
|||
libreoffice
|
||||
libsForQt5.qtgraphicaleffects
|
||||
mako
|
||||
moonlight-qt
|
||||
(pkgs.symlinkJoin {
|
||||
name = "moonlight-qt-wrapped";
|
||||
paths = [ pkgs.moonlight-qt ];
|
||||
buildInputs = [ pkgs.makeWrapper ];
|
||||
postBuild = ''
|
||||
wrapProgram $out/bin/moonlight \
|
||||
--set SDL_VIDEODRIVER x11 \
|
||||
--set QT_QPA_PLATFORM xcb
|
||||
'';
|
||||
})
|
||||
nautilus
|
||||
netflix
|
||||
networkmanagerapplet
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@
|
|||
"exec": "waybar-battery",
|
||||
"return-type": "json",
|
||||
"interval": 10,
|
||||
"on-click": "foot -a launcher -e charge-limit-menu"
|
||||
"on-click-right": "foot -a launcher -e charge-limit-menu"
|
||||
},
|
||||
"disk": {
|
||||
"interval": 5,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue