mirror of
https://github.com/tuxdotrs/tpanel.git
synced 2025-10-10 12:51:54 +05:30
fix: icons not appearing
This commit is contained in:
2
app.ts
2
app.ts
@@ -3,7 +3,7 @@ import style from "./style.scss";
|
|||||||
import windows from "./windows";
|
import windows from "./windows";
|
||||||
import GLib from "gi://GLib?version=2.0";
|
import GLib from "gi://GLib?version=2.0";
|
||||||
|
|
||||||
const icons = `${GLib.get_current_dir()}/assets/icons`;
|
const icons = `${GLib.get_user_config_dir()}/tpanel/assets/icons`;
|
||||||
|
|
||||||
App.start({
|
App.start({
|
||||||
css: style,
|
css: style,
|
||||||
|
56
flake.nix
56
flake.nix
@@ -22,21 +22,49 @@
|
|||||||
pkgs = nixpkgs.legacyPackages.${system};
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
in {
|
in {
|
||||||
packages.${system} = {
|
packages.${system} = {
|
||||||
default = ags.lib.bundle {
|
default = let
|
||||||
inherit pkgs;
|
tpanel = ags.lib.bundle {
|
||||||
src = ./.;
|
inherit pkgs;
|
||||||
name = "tpanel";
|
src = ./.;
|
||||||
entry = "app.ts";
|
name = "tpanel";
|
||||||
gtk4 = true;
|
entry = "app.ts";
|
||||||
|
gtk4 = true;
|
||||||
|
|
||||||
extraPackages = with ags.packages.${system}; [
|
extraPackages = with ags.packages.${system}; [
|
||||||
hyprland
|
hyprland
|
||||||
apps
|
apps
|
||||||
battery
|
battery
|
||||||
tray
|
tray
|
||||||
network
|
network
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
in
|
||||||
|
pkgs.runCommand "tpanel" {
|
||||||
|
nativeBuildInputs = [pkgs.makeWrapper];
|
||||||
|
} ''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
|
||||||
|
# Copy the bundled app
|
||||||
|
cp -r ${tpanel}/* $out/
|
||||||
|
|
||||||
|
mv $out/bin/tpanel $out/bin/.tpanel-unwrapped
|
||||||
|
|
||||||
|
makeWrapper $out/bin/.tpanel-unwrapped $out/bin/tpanel \
|
||||||
|
--run 'ICONS_DIR="$HOME/.config/tpanel/assets/icons"
|
||||||
|
|
||||||
|
# Check if icons directory needs to be set up
|
||||||
|
if [ ! -d "$ICONS_DIR" ]; then
|
||||||
|
# Create necessary directories
|
||||||
|
mkdir -p "$ICONS_DIR"
|
||||||
|
|
||||||
|
# Copy icon files if source exists and destination is empty
|
||||||
|
if [ -d "'"$out"'/share/assets/icons" ]; then
|
||||||
|
cp -r "'"$out"'/share/assets/icons/"* "$ICONS_DIR/"
|
||||||
|
echo "Installed tpanel icons to $ICONS_DIR"
|
||||||
|
fi
|
||||||
|
fi'
|
||||||
|
|
||||||
|
'';
|
||||||
|
|
||||||
astal = astal.packages.${system};
|
astal = astal.packages.${system};
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user