Compare commits
2 Commits
053ec2ac32
...
b8fe8d2d0b
Author | SHA1 | Date | |
---|---|---|---|
b8fe8d2d0b | |||
4619ef8c31 |
70
flake.lock
generated
70
flake.lock
generated
@ -263,24 +263,6 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts_2": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": "nixpkgs-lib"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1714641030,
|
||||
"narHash": "sha256-yzcRNDoyVP7+SCNX0wmuDju1NUCt8Dz9+lyUXEI0dbI=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "e5d10a24b66c3ea8f150e47dfdb0416ab7c3390e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": [
|
||||
@ -751,18 +733,6 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-lib": {
|
||||
"locked": {
|
||||
"lastModified": 1714640452,
|
||||
"narHash": "sha256-QBx10+k6JWz6u7VsohfSw8g8hjdBZEf8CFzXH1/1Z94=",
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/NixOS/nixpkgs/archive/50eb7ecf4cd0a5756d7275c8ba36790e5bd53e33.tar.gz"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/NixOS/nixpkgs/archive/50eb7ecf4cd0a5756d7275c8ba36790e5bd53e33.tar.gz"
|
||||
}
|
||||
},
|
||||
"nixpkgs-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1740743217,
|
||||
@ -875,22 +845,6 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_8": {
|
||||
"locked": {
|
||||
"lastModified": 1715534503,
|
||||
"narHash": "sha256-5ZSVkFadZbFP1THataCaSf0JH2cAH3S29hU9rrxTEqk=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "2057814051972fa1453ddfb0d98badbea9b83c06",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nur": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts",
|
||||
@ -948,8 +902,7 @@
|
||||
"nixpkgs": "nixpkgs_5",
|
||||
"nixpkgs-stable": "nixpkgs-stable",
|
||||
"sops-nix": "sops-nix",
|
||||
"stylix": "stylix",
|
||||
"tlock": "tlock"
|
||||
"stylix": "stylix"
|
||||
}
|
||||
},
|
||||
"sops-nix": {
|
||||
@ -1117,27 +1070,6 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"tlock": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts_2",
|
||||
"nixpkgs": "nixpkgs_8"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1716429453,
|
||||
"narHash": "sha256-6raIb7D7B/KQtKy63ixVRAJ7AN30JI7w/XGI2W8fuRk=",
|
||||
"ref": "refs/heads/main",
|
||||
"rev": "5091452ae294c4b424293ae4ffdcdbc8f04601fb",
|
||||
"revCount": 343,
|
||||
"submodules": true,
|
||||
"type": "git",
|
||||
"url": "https://github.com/eklairs/tlock"
|
||||
},
|
||||
"original": {
|
||||
"submodules": true,
|
||||
"type": "git",
|
||||
"url": "https://github.com/eklairs/tlock"
|
||||
}
|
||||
},
|
||||
"treefmt-nix": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
|
@ -24,7 +24,6 @@
|
||||
stylix.url = "github:danth/stylix";
|
||||
ags.url = "github:Aylur/ags";
|
||||
ayugram-desktop.url = "github:/ayugram-port/ayugram-desktop/release?submodules=1";
|
||||
tlock.url = "git+https://github.com/eklairs/tlock?submodules=1";
|
||||
|
||||
hyprland.url = "github:hyprwm/Hyprland";
|
||||
hyprland-plugins = {
|
||||
|
@ -10,6 +10,8 @@
|
||||
echo \$surface0: \#${colors.base02}\; >> colors.scss
|
||||
echo \$fg: \#${colors.base05}\; >> colors.scss
|
||||
echo \$accent: \#${colors.base0B}\; >> colors.scss
|
||||
|
||||
echo \#${colors.base0B}; > accent.css
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
@ -17,5 +19,6 @@
|
||||
mkdir $out
|
||||
cp $src/* $out -r
|
||||
mv colors.scss $out
|
||||
mv accent.css $out
|
||||
'';
|
||||
}
|
||||
|
@ -1,14 +1,30 @@
|
||||
import { bind } from "astal"
|
||||
import Battery from "gi://AstalBattery"
|
||||
import { bind } from "astal";
|
||||
import Battery from "gi://AstalBattery";
|
||||
import accent from "../../accent.css";
|
||||
|
||||
export default function BatteryLevel() {
|
||||
const bat = Battery.get_default()
|
||||
const bat = Battery.get_default();
|
||||
const percent = bind(bat, "percentage").as(p => Math.floor(p * 100));
|
||||
|
||||
return <box className="Battery"
|
||||
visible={bind(bat, "isPresent")}>
|
||||
<icon icon={bind(bat, "batteryIconName")} />
|
||||
<label label={bind(bat, "percentage").as(p =>
|
||||
`${Math.floor(p * 100)} %`
|
||||
)} />
|
||||
</box>
|
||||
return (
|
||||
<box
|
||||
className="Battery"
|
||||
visible={bind(bat, "isPresent")}
|
||||
css={percent.as(p => `
|
||||
background-image: linear-gradient(
|
||||
to right,
|
||||
${accent} 0%,
|
||||
${accent} ${p}%,
|
||||
transparent ${p}%,
|
||||
transparent 100%
|
||||
);
|
||||
background-size: 100% 3px;
|
||||
background-repeat: no-repeat;
|
||||
background-position: bottom;
|
||||
`)}
|
||||
>
|
||||
<icon icon={bind(bat, "batteryIconName")} />
|
||||
<label label={percent.as(p => `${p}%`)} />
|
||||
</box>
|
||||
);
|
||||
}
|
||||
|
@ -13,10 +13,11 @@
|
||||
gparted
|
||||
git-lfs
|
||||
unrar
|
||||
inputs.tlock.packages.${system}.default
|
||||
hexyl
|
||||
jq
|
||||
litecli
|
||||
trashy
|
||||
dig
|
||||
mtr
|
||||
];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user