Skip to content

Commit

Permalink
Merge branch 'master' into warp
Browse files Browse the repository at this point in the history
  • Loading branch information
myamusashi authored Dec 24, 2024
2 parents 3e107a9 + c87a6ca commit 322057c
Show file tree
Hide file tree
Showing 110 changed files with 3,696 additions and 3,111 deletions.
99 changes: 70 additions & 29 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

131 changes: 69 additions & 62 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,78 +1,85 @@
{
description = "A Bar/Panel for Hyprland with extensive customizability.";

inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
ags.url = "github:Aylur/ags";
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
ags.url = "github:aylur/ags";
astal.url = "github:aylur/astal";
};

outputs = inputs: let
outputs = { self, nixpkgs, ags, astal }: let
systems = [
"x86_64-linux"
"x86_64-darwin"
"aarch64-darwin"
"aarch64-linux"
];
forEachSystem = inputs.nixpkgs.lib.genAttrs systems;
pkgsFor = forEachSystem (
system:
import inputs.nixpkgs {
inherit system;
config.allowUnfree = true;
}
);

devShellFor = system:
inputs.nixpkgs.lib.genAttrs ["default"] (
_:
inputs.nixpkgs.legacyPackages.${system}.mkShell {
buildInputs = [
pkgsFor.${system}.esbuild
pkgsFor.${system}.fish
pkgsFor.${system}.typescript
pkgsFor.${system}.bun
pkgsFor.${system}.libnotify
pkgsFor.${system}.dart-sass
pkgsFor.${system}.fd
pkgsFor.${system}.btop
pkgsFor.${system}.bluez
pkgsFor.${system}.libgtop
pkgsFor.${system}.gobject-introspection
pkgsFor.${system}.glib
pkgsFor.${system}.bluez-tools
pkgsFor.${system}.grimblast
pkgsFor.${system}.gpu-screen-recorder
pkgsFor.${system}.brightnessctl
pkgsFor.${system}.gnome-bluetooth
pkgsFor.${system}.python3
pkgsFor.${system}.matugen
inputs.ags.packages.${system}.agsWithTypes
];
nativeBuildInputs = with pkgsFor.${system}; [
nixfmt-rfc-style
nil
];
shellHook = ''
export GDK_BACKEND=wayland
export GI_TYPELIB_PATH=${pkgsFor.${system}.libgtop}/lib/girepository-1.0:${pkgsFor.${system}.glib}/lib/girepository-1.0:$GI_TYPELIB_PATH
'';
}
);
forEachSystem = nixpkgs.lib.genAttrs systems;
in {
devShells = forEachSystem devShellFor;
packages = forEachSystem (system: let
pkgs = nixpkgs.legacyPackages.${system};
in {
default = ags.lib.bundle {
inherit pkgs;
src = ./.;
name = "hyprpanel"; # name of executable
entry = "app.ts";

# additional libraries and executables to add to gjs' runtime
extraPackages = [
ags.packages.${system}.agsFull
astal.packages.${system}.tray
astal.packages.${system}.hyprland
astal.packages.${system}.io
astal.packages.${system}.apps
astal.packages.${system}.battery
astal.packages.${system}.bluetooth
astal.packages.${system}.mpris
astal.packages.${system}.network
astal.packages.${system}.notifd
astal.packages.${system}.powerprofiles
astal.packages.${system}.wireplumber
pkgs.fish
pkgs.typescript
pkgs.libnotify
pkgs.dart-sass
pkgs.fd
pkgs.btop
pkgs.bluez
pkgs.libgtop
pkgs.gobject-introspection
pkgs.glib
pkgs.bluez-tools
pkgs.grimblast
pkgs.gpu-screen-recorder
pkgs.brightnessctl
pkgs.gnome-bluetooth
(pkgs.python3.withPackages (python-pkgs: with python-pkgs; [
gpustat
dbus-python
pygobject3
]))
pkgs.matugen
pkgs.hyprpicker
pkgs.hyprsunset
pkgs.hypridle
pkgs.wireplumber
pkgs.networkmanager
pkgs.upower
pkgs.gvfs
pkgs.swww
pkgs.pywal
];
};
});

# Define .overlay to expose the package as pkgs.hyprpanel based on the system
overlay = final: prev: {
hyprpanel =
if final ? callPackage
then (final.callPackage ./nix {inherit inputs;}).desktop.script
else inputs.self.packages.${prev.stdenv.system}.default;
hyprpanel = prev.writeShellScriptBin "hyprpanel" ''
if [ "$#" -eq 0 ]; then
exec ${self.packages.${final.stdenv.system}.default}/bin/hyprpanel
else
exec ${astal.packages.${final.stdenv.system}.io}/bin/astal -i hyprpanel "$@"
fi
'';
};
packages = forEachSystem (
system: let
pkgs = pkgsFor.${system};
in {
default = (pkgs.callPackage ./nix {inherit inputs;}).desktop.script;
}
);
};
}
65 changes: 0 additions & 65 deletions nix/default.nix

This file was deleted.

9 changes: 7 additions & 2 deletions scripts/checkUpdates.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,19 @@
check_arch_updates() {
official_updates=0
aur_updates=0
if command -v paru &> /dev/null; then
aur_helper="paru"
else
aur_helper="yay"
fi

if [ "$1" = "-y" ]; then
aur_updates=$(yay -Qum 2>/dev/null | wc -l)
aur_updates=$($aur_helper -Qum 2>/dev/null | wc -l)
elif [ "$1" = "-p" ]; then
official_updates=$(checkupdates 2>/dev/null | wc -l)
else
official_updates=$(checkupdates 2>/dev/null | wc -l)
aur_updates=$(yay -Qum 2>/dev/null | wc -l)
aur_updates=$($aur_helper -Qum 2>/dev/null | wc -l)
fi

total_updates=$((official_updates + aur_updates))
Expand Down
Loading

0 comments on commit 322057c

Please sign in to comment.