Closed dwilliam62 closed 4 months ago
hyprctl systeminfo Hyprland, built from branch at commit f94264928a8ab4da8759d4ded25a46af44451d38 (). Date: 2024-04-26 Tag: , commits: @COMMITS@
flags: (if any)
System Information: System name: Linux Node name: ddubsos-dev Release: 6.8.7 Version: #1-NixOS SMP PREEMPT_DYNAMIC Wed Apr 17 09:23:43 UTC 2024
GPU information:
os-release: ANSI_COLOR="1;34" BUG_REPORT_URL="https://github.com/NixOS/nixpkgs/issues" BUILD_ID="24.05.20240425.7bb2ccd" DOCUMENTATION_URL="https://nixos.org/learn.html" HOME_URL="https://nixos.org/" ID=nixos IMAGE_ID="" IMAGE_VERSION="" LOGO="nix-snowflake" NAME=NixOS PRETTY_NAME="NixOS 24.05 (Uakari)" SUPPORT_URL="https://nixos.org/community.html" VERSION="24.05 (Uakari)" VERSION_CODENAME=uakari VERSION_ID="24.05"
plugins: hyprtrails by Vaxry ver 1.0 hyprexpo by Vaxry ver 1.0
Seems like you're using NixOS! Me too :)
I just ran into this after an update as well, since the pyprland packaged in Nix is on v2.2.11 and this seems to be fixed in v2.2.12
You should be able to use this (as a temporary fix) wherever you're declaring packages in your config:
environment.systemPackages = with pkgs; [
(pyprland.overrideAttrs (oldAttrs: {
src = fetchFromGitHub {
owner = "hyprland-community";
repo = "pyprland";
rev = "refs/tags/2.2.12";
hash = "sha256-SVly20/+67d0Rr2SuM1n/JfT1SlyKdKRBLDx2okCZRY=";
};
}))
];
or if using home-manager:
home.packages = with pkgs; [
(pyprland.overrideAttrs (oldAttrs: {
src = fetchFromGitHub {
owner = "hyprland-community";
repo = "pyprland";
rev = "refs/tags/2.2.12";
hash = "sha256-SVly20/+67d0Rr2SuM1n/JfT1SlyKdKRBLDx2okCZRY=";
};
}))
];
For me this setup throws a warning when starting but then continues to work properly :)
this is a duplicate of #88 btw :) Thank you for the support @librephoenix
Would it be possible to get a build using the tag or is it something related to nix? I don't see anything special in the Arch package and I get such output:
❯ hyprctl -j version
{
"branch": "",
"commit": "fe7b748eb668136dd0558b7c8279bfcd7ab4d759",
"dirty": false,
"commit_message": "props: bump version to 0.39.1",
"commit_date": "Tue Apr 16 16:01:03 2024",
"tag": "v0.39.1",
"commits": 4460,
"flags": []
}
Poking @NotAShelf for information
Seems like you're using NixOS! Me too :)
Hello yes! for about 6-8 months. My setup is based on ZaneyOS https://gitlab.com/Zaney/zaneyos But I have forked and modified it. I've been a long time fan of pyprland so I added it to mine. This is 1st issue I've ever had with it.
I will try your fix!
Thanks for the quick reply!
This is my pyprland.nix pretty simple I got the config from someone else and just wrapped it here
{ config, pkgs, ... }:
{ home.packages = with pkgs; [ pyprland ];
xdg.configFile."hypr/pyprland.toml".text = '' [pyprland] plugins = [ "toggle_special", "scratchpads", "lost_windows", "monitors", "shift_monitors", "toggle_dpms", "magnify", "expose", "workspaces_follow_focus", ]
[workspaces_follow_focus]
max_workspaces = 9
[expose]
include_special = false
[scratchpads.term]
animation = "fromTop"
command = "kitty --class kitty-dropterm"
class = "kitty-dropterm"
size = "75% 60%"
max_size = "1920px 100%"
[scratchpads.volume]
animation = "fromRight"
command = "pavucontrol"
class = "pavucontrol"
lazy = true
size = "40% 90%"
max_size = "1080px 100%"
unfocus = "hide"
[layout_center]
margin = 60
offset = [0, 30]
next = "movefocus r"
prev = "movefocus l"
next2 = "movefocus d"
prev2 = "movefocus u"
''; }
I am doing something wrong. Still new to NIX
it doesn't build the new version
I don't know anything about nix, but can't the provided flake.nix be useful?
I don't know anything about nix, but can't the provided flake.nix be useful?
That is the flake provided
Before it was just
{ config, pkgs, ... }:
{ home.packages = with pkgs; [ pyprland ];
I will try to figure it out
Thanks
I don't think you are alone in that case, if someone can provide decent instructions to easily get the latest pyprland (or a specific tag) on Nix I'll add it to the wiki.
In case it helps some people: the "version" tag in hyprctl -j version
is required from 2.2.9 to 2.2.11 (included). Later versions assume you are using a bleeding edge version in such case, which is a packaging issue.
fetchFromGitHub will fetch a source based tarball (i.e. contents of this repository on the topmost level) and won't actually expose a package. To use the pyprland package exposed by this flake, you must add it as a flake input and consume the exposed package directly with inputs.pyprland.packages.${pkgs.stdenv.system}.pyprland
.
I can probably work on upstreaming pyprland to nixpkgs, the packaging is somewhat complete and poetry2nix is available in nixpkgs also. Should be trivial to implement an update script to reduce maintenance on my end as I don't use pyprland, and may not always keep myself up to date.
Pyprland is in nixpkgs already: https://github.com/NixOS/nixpkgs/blob/master/pkgs/by-name/py/pyprland/package.nix, though they aren't using pyprland's flake to build it. In the original issue it looks like the nixpkgs package is being used.
Nixpkgs master branch is already using pyprland 2.2.12, but nixos-unstable is still stuck on 2.2.10: https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/by-name/py/pyprland/package.nix
Once unstable updates to 2.2.12 (maybe in a week or so, give or take?), I think this issue will resolve itself.
In any case, the temporary fix I mentioned was to just override the pyprland in nixpkgs with the up-to-date version.
Any issues with installing pyprland directly from pyprland's flake might be something separate?
thanks all It should be a few days or so before the update is there it appears
I am ok to close this issue
NixPkg PR + #92 will fix this issue, closing, thank you all!
Pyprland version 2.2.10
Describe the bug After updating hyprland a working pyrland config fails to load at startup
To Reproduce Steps to reproduce the behavior: run pypr in hyprland.conf pypr at CLI generates this:
Error loading plugin pyprland: Traceback (most recent call last): File "/nix/store/ip72pdqf93vfirszcibsfm3cfp0vs2lf-pyprland-2.2.10/lib/python3.11/site-packages/pyprland/command.py", line 121, in _load_single_plugin await plug.init() File "/nix/store/ip72pdqf93vfirszcibsfm3cfp0vs2lf-pyprland-2.2.10/lib/python3.11/site-packages/pyprland/plugins/pyprland.py", line 12, in init version = (await self.hyprctlJSON("version"))["tag"] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/nix/store/ip72pdqf93vfirszcibsfm3cfp0vs2lf-pyprland-2.2.10/lib/python3.11/site-packages/pyprland/ipc.py", line 59, in wrapper return await func(*args, **kwargs, logger=logger) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/nix/store/ip72pdqf93vfirszcibsfm3cfp0vs2lf-pyprland-2.2.10/lib/python3.11/site-packages/pyprland/ipc.py", line 100, in hyprctlJSON ret = json.loads(resp) ^^^^^^^^^^^^^^^^ File "/nix/store/glfr70gi7hfaj50mwj2431p8bg60fhqw-python3-3.11.9/lib/python3.11/json/init.py", line 346, in loads return _default_decoder.decode(s) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/nix/store/glfr70gi7hfaj50mwj2431p8bg60fhqw-python3-3.11.9/lib/python3.11/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/nix/store/glfr70gi7hfaj50mwj2431p8bg60fhqw-python3-3.11.9/lib/python3.11/json/decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 8 column 16 (char 187)
Expected behavior that is loads properly with the updated hyprland
Configuration (provide following files/samples when [relevant):
I would love to attach the config files but not matter what I do they are rejected by GITHUB. .toml, tar, tgz, etc.. pyprland.toml
File: pyprland.toml [pyprland] plugins = [ "toggle_special", "scratchpads", "lost_windows", "monitors", "shift_monitors", "toggle_dpms", "magnify", "expose", "workspaces_follow_focus", ]
[workspaces_follow_focus] max_workspaces = 9
[expose] include_special = false
[scratchpads.term] animation = "fromTop" command = "kitty --class kitty-dropterm" class = "kitty-dropterm" size = "75% 60%" max_size = "1920px 100%"
[scratchpads.volume] animation = "fromRight" command = "pavucontrol" class = "pavucontrol" lazy = true size = "40% 90%" max_size = "1080px 100%" unfocus = "hide"
[layout_center] margin = 60 offset = [0, 30] next = "movefocus r" prev = "movefocus l" next2 = "movefocus d" prev2 = "movefocus u"
hyprland.conf
exec-once = /nix/store/wmx2x7hc0m0szcb7yzlswnylmv2w5qz8-dbus-1.14.10/bin/dbus-update-activ ation-environment --systemd DISPLAY HYPRLAND_INSTANCE_SIGNATURE WAYLAND_DISPLAY XDG_CURREN T_DESKTOP && systemctl --user stop hyprland-session.target && systemctl --user start hyprl and-session.target plugin=/nix/store/322gih4fc8apd9yg9l10gq71ic5jlygx-hyprtrails-0.1/lib/libhyprtrails.so plugin=/nix/store/vzfqdyrfy052mcw0h23xhijba204vxpm-hyprexpo-0.1/lib/libhyprexpo.so monitor = Virtual-1,1920x1080@60,auto,1
45deg col.inactive_border = rgba(19171ccc) rgba(26232acc) 45deg layout = dwindle resize_on_border = true }
env = WLR_RENDERER_ALLOW_SOFTWARE,1
center m+1 enable_gesture = true # laptop touchpad, 4 fingers gesture_distance = 300 # how far is the "max" gesture_positive = true # positive = swipe down. Negative = swipe up. } }
AY XDG_CURRENT_DESKTOP exec-once = swww init exec-once = pypr exec-once = waybar
exec-once = waybar -c ~/.config/waybar-dw1/config -s ~/.config/waybar-dw1/style.c
ss & exec-once = swaync
exec-once = wallsetter
pms off' resume 'hyprctl dispatch dpms on' before-sleep 'swaylock -f -c 000000' dwindle { pseudotile = true preserve_split = true } master { new_is_master = true } bind = SUPER,Return,exec,alacritty bind = SUPERSHIFT,Return,exec,rofi-launcher bind = SUPERSHIFT,D,exec,rofi-launcher bind = SUPERSHIFT,W,exec,web-search bind = SUPERSHIFT,N,exec,swaync-client -rs bind = SUPER,W,exec,brave
Additional context Add any other context about the problem here.