diff --git a/home/doggo/doggo.nix b/home/doggo/doggo.nix index 0cc3c94..69afbe4 100644 --- a/home/doggo/doggo.nix +++ b/home/doggo/doggo.nix @@ -31,6 +31,7 @@ withOpenASAR = true; withEquicord = true; }) + #orbolay # Hud overlay for equicord (https://github.com/Equicord/Equicord/blob/main/src/equicordplugins/orbolayBridge/index.tsx) kdePackages.qtsvg # Needed for icons in KDE Dolphin kdePackages.dolphin kdePackages.ark zip unzip diff --git a/home/doggo/hyprland-config.nix b/home/doggo/hyprland-config.nix index fa4d57f..1cc784a 100644 --- a/home/doggo/hyprland-config.nix +++ b/home/doggo/hyprland-config.nix @@ -51,6 +51,7 @@ in hl.exec_cmd("${uwsm} hyprsunset") hl.exec_cmd("bash -c 'sleep 1.5s && { [ \"$(date +%H)\" -ge 22 ] || [ \"$(date +%H)\" -lt 6 ]; } && hyprctl hyprsunset temperature 3333'") hl.exec_cmd("systemctl --user start hyprpolkitagent") + -- hl.exec_cmd("${uwsm} orbolay") end '') ]; @@ -285,7 +286,28 @@ in pin = false; }; } + /* + { + name = "fix-orbolay"; + match = { + title = "^(orbolay)$"; + }; + no_initial_focus = true; + suppress_event = "activatefocus"; + float = true; + pin = true; + center = true; + no_blur = true; + no_dim = true; + no_follow_mouse = true; + no_shadow = true; + border_size = 0; + no_focus = true; + move = [ "monitor_w" "monitor_h" ]; + size = [ "monitor_w - 5" "monitor_h - 5" ]; + } ]; + */ }; }; } diff --git a/local_packages/orbolay/package.nix b/local_packages/orbolay/package.nix new file mode 100644 index 0000000..4602cd5 --- /dev/null +++ b/local_packages/orbolay/package.nix @@ -0,0 +1,74 @@ +{ + lib, + rustPlatform, + fetchFromGitHub, + fetchurl, + pkg-config, + makeWrapper, + libGL, + fontconfig, + freetype, + libx11, wayland, + libxkbcommon, + libxtst, libxi, libxcb, libxext, libxcursor, + libevdev, +}: + +rustPlatform.buildRustPackage (finalAttrs: { + pname = "orbolay"; + version = "3.4.0"; + + src = fetchFromGitHub { + owner = "SpikeHD"; + repo = "Orbolay"; + tag = "v${finalAttrs.version}"; + hash = "sha256-ZyuFa/GeH5QmONuiqeSrM/st30+gaLV0mzgSCsHrU/k="; + }; + + cargoHash = "sha256-MiwAPSPnugjZnLQBVh3/iJr6Ze28jcldfMITT43iszY="; + + strictDeps = true; + __structuredAttrs = true; + + enableParallelBuilding = true; + + nativeBuildInputs = [ + pkg-config + makeWrapper + ]; + + buildInputs = [ + libGL + fontconfig + freetype + libx11 wayland + libxkbcommon + libxtst libxi libxcb libxext libxcursor + libevdev + ]; + + # Fixes xkbcommon-dl not finding libxkbcommon, and empties WAYLAND_DISPLAY to use Xwayland + postInstall = '' + wrapProgram $out/bin/orbolay \ + --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ + libxkbcommon + ]}" \ + --set WAYLAND_DISPLAY "" + ''; + + env = { + SKIA_BINARIES_URL = "file://${fetchurl { + url = "https://github.com/marc2332/rust-skia/releases/download/0.98.0/skia-binaries-a9bd25883c31d7ac2b2b-x86_64-unknown-linux-gnu-egl-gl-jpegd-jpege-svg-textlayout-vulkan-wayland-webpd-webpe-x11.tar.gz"; + hash = "sha256-0ZHblarMr0gUfMa0ScDS32+CwzKk7/o7NniH9tWYvYs="; + }}"; + }; + + meta = with lib; { + description = "Quick, small, native, multi-platform Discord overlay alternative"; + homepage = "https://github.com/SpikeHD/Orbolay"; + license = licenses.gpl3Only; + platforms = lib.platforms.linux; + mainProgram = "orbolay"; + maintainers = with lib.maintainers; [ Username404-59 ]; + }; +}) \ No newline at end of file