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"
|
"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": {
|
"flake-utils": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"systems": [
|
"systems": [
|
||||||
@ -751,18 +733,6 @@
|
|||||||
"type": "github"
|
"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": {
|
"nixpkgs-stable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1740743217,
|
"lastModified": 1740743217,
|
||||||
@ -875,22 +845,6 @@
|
|||||||
"type": "github"
|
"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": {
|
"nur": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-parts": "flake-parts",
|
"flake-parts": "flake-parts",
|
||||||
@ -948,8 +902,7 @@
|
|||||||
"nixpkgs": "nixpkgs_5",
|
"nixpkgs": "nixpkgs_5",
|
||||||
"nixpkgs-stable": "nixpkgs-stable",
|
"nixpkgs-stable": "nixpkgs-stable",
|
||||||
"sops-nix": "sops-nix",
|
"sops-nix": "sops-nix",
|
||||||
"stylix": "stylix",
|
"stylix": "stylix"
|
||||||
"tlock": "tlock"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"sops-nix": {
|
"sops-nix": {
|
||||||
@ -1117,27 +1070,6 @@
|
|||||||
"type": "github"
|
"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": {
|
"treefmt-nix": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
|
@ -24,7 +24,6 @@
|
|||||||
stylix.url = "github:danth/stylix";
|
stylix.url = "github:danth/stylix";
|
||||||
ags.url = "github:Aylur/ags";
|
ags.url = "github:Aylur/ags";
|
||||||
ayugram-desktop.url = "github:/ayugram-port/ayugram-desktop/release?submodules=1";
|
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.url = "github:hyprwm/Hyprland";
|
||||||
hyprland-plugins = {
|
hyprland-plugins = {
|
||||||
|
@ -10,6 +10,8 @@
|
|||||||
echo \$surface0: \#${colors.base02}\; >> colors.scss
|
echo \$surface0: \#${colors.base02}\; >> colors.scss
|
||||||
echo \$fg: \#${colors.base05}\; >> colors.scss
|
echo \$fg: \#${colors.base05}\; >> colors.scss
|
||||||
echo \$accent: \#${colors.base0B}\; >> colors.scss
|
echo \$accent: \#${colors.base0B}\; >> colors.scss
|
||||||
|
|
||||||
|
echo \#${colors.base0B}; > accent.css
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
@ -17,5 +19,6 @@
|
|||||||
mkdir $out
|
mkdir $out
|
||||||
cp $src/* $out -r
|
cp $src/* $out -r
|
||||||
mv colors.scss $out
|
mv colors.scss $out
|
||||||
|
mv accent.css $out
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
@ -1,14 +1,30 @@
|
|||||||
import { bind } from "astal"
|
import { bind } from "astal";
|
||||||
import Battery from "gi://AstalBattery"
|
import Battery from "gi://AstalBattery";
|
||||||
|
import accent from "../../accent.css";
|
||||||
|
|
||||||
export default function BatteryLevel() {
|
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"
|
return (
|
||||||
visible={bind(bat, "isPresent")}>
|
<box
|
||||||
<icon icon={bind(bat, "batteryIconName")} />
|
className="Battery"
|
||||||
<label label={bind(bat, "percentage").as(p =>
|
visible={bind(bat, "isPresent")}
|
||||||
`${Math.floor(p * 100)} %`
|
css={percent.as(p => `
|
||||||
)} />
|
background-image: linear-gradient(
|
||||||
</box>
|
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
|
gparted
|
||||||
git-lfs
|
git-lfs
|
||||||
unrar
|
unrar
|
||||||
inputs.tlock.packages.${system}.default
|
|
||||||
hexyl
|
hexyl
|
||||||
jq
|
jq
|
||||||
litecli
|
litecli
|
||||||
trashy
|
trashy
|
||||||
|
dig
|
||||||
|
mtr
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user