fix mangal download and use grimblast

This commit is contained in:
Kopatz
2025-04-03 10:30:13 +02:00
parent 9a486f42b2
commit 0ca8bf32c2
3 changed files with 16 additions and 6 deletions

View File

@@ -188,8 +188,7 @@ in
thunar = "${pkgs.xfce.thunar}/bin/thunar"; thunar = "${pkgs.xfce.thunar}/bin/thunar";
wl-copy = "${pkgs.wl-clipboard}/bin/wl-copy"; wl-copy = "${pkgs.wl-clipboard}/bin/wl-copy";
wl-paste = "${pkgs.wl-clipboard}/bin/wl-paste"; wl-paste = "${pkgs.wl-clipboard}/bin/wl-paste";
grim = "${pkgs.grim}/bin/grim"; grimblast = "${pkgs.grimblast}/bin/grimblast";
slurp = "${pkgs.slurp}/bin/slurp";
swww = "${pkgs.swww}/bin/swww"; swww = "${pkgs.swww}/bin/swww";
pdfgrep = "${pkgs.pdfgrep}/bin/pdfgrep"; pdfgrep = "${pkgs.pdfgrep}/bin/pdfgrep";
brightnessctl = "${pkgs.brightnessctl}/bin/brightnessctl"; brightnessctl = "${pkgs.brightnessctl}/bin/brightnessctl";
@@ -210,11 +209,11 @@ in
''$mainMod, S, exec, echo "skip" | nc kopatz.ddns.net 8888'' ''$mainMod, S, exec, echo "skip" | nc kopatz.ddns.net 8888''
"$mainMod, R, exec, ${swww} img $(ls -d /synced/default/dinge/Bg/* | shuf -n 1)" "$mainMod, R, exec, ${swww} img $(ls -d /synced/default/dinge/Bg/* | shuf -n 1)"
"$mainMod, W, exec, ${swww} img ${config.stylix.image}" "$mainMod, W, exec, ${swww} img ${config.stylix.image}"
" , Print, exec, hyprshade off && ${grim} -g \"$(${slurp} -d)\" - | ${wl-copy} && hyprshade auto" " , Print, exec, hyprshade off && ${grimblast} --freeze copy area && hyprshade auto"
'' ''
$mainMod, Print, exec, ${grim} -g "$(${slurp} -d)" /tmp/$(date +'%s_grim.png')'' $mainMod, Print, exec, ${grimblast} --freeze save area /tmp/$(date +'%s_grim.png')''
'' ''
Shift_L, Print, exec, ${grim} -g "$(${slurp} -d)" ~/Pictures/$(date +'%s_grim.png')'' Shift_L, Print, exec, ${grimblast} --freeze save area ~/Pictures/$(date +'%s_grim.png')''
"$mainMod, SPACE, exec, ${rofi} -modi drun -show drun -config ~/.config/rofi/rofidmenu.rasi" "$mainMod, SPACE, exec, ${rofi} -modi drun -show drun -config ~/.config/rofi/rofidmenu.rasi"
" , XF86AudioPlay, exec, ${playerctl} play-pause" " , XF86AudioPlay, exec, ${playerctl} play-pause"
" , XF86AudioNext, exec, ${playerctl} next" " , XF86AudioNext, exec, ${playerctl} next"

View File

@@ -70,6 +70,9 @@ in {
else else
config.age.secrets.kavita.path; config.age.secrets.kavita.path;
}; };
environment.systemPackages = with pkgs; [
libgbm
];
#todo: base url needs new kavita version #todo: base url needs new kavita version
systemd.services = { systemd.services = {

View File

@@ -3,6 +3,8 @@
, buildGoModule , buildGoModule
, fetchFromGitHub , fetchFromGitHub
, installShellFiles , installShellFiles
, libgbm
, makeWrapper
, ,
}: }:
buildGoModule rec { buildGoModule rec {
@@ -23,7 +25,13 @@ buildGoModule rec {
"-w" "-w"
]; ];
nativeBuildInputs = [ installShellFiles ]; buildInputs = [ libgbm ];
runtimeDeps = [ libgbm ];
nativeBuildInputs = [ installShellFiles makeWrapper ];
preFixup = ''
wrapProgram $out/bin/mangal --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ libgbm ]}
'';
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
# Mangal creates a config file in the folder ~/.config/mangal and fails if not possible # Mangal creates a config file in the folder ~/.config/mangal and fails if not possible