Compare commits

..

No commits in common. "6b5270d843139a4529b1f27c6966ece1fa961890" and "3c121195e45c956e0704debb7906d3319a81bd0e" have entirely different histories.

6 changed files with 15 additions and 31 deletions

View File

@ -26,13 +26,6 @@
]; ];
}; };
}; };
hardware.graphics = { hardware.graphics.enable = true;
enable = true;
extraPackages = with pkgs; [
intel-media-driver
intel-vaapi-driver
libvdpau
];
};
services.spice-vdagentd.enable = true; services.spice-vdagentd.enable = true;
} }

View File

@ -4,7 +4,6 @@
rustPlatform = pkgs.rustPlatform; rustPlatform = pkgs.rustPlatform;
fetchFromGitHub = pkgs.fetchFromGitHub; fetchFromGitHub = pkgs.fetchFromGitHub;
}; };
screen-cap = pkgs.callPackage ./screen-cap/default.nix { };
Fmt = pkgs.writeShellApplication { Fmt = pkgs.writeShellApplication {
name = "Fmt"; name = "Fmt";
runtimeInputs = with pkgs; [ runtimeInputs = with pkgs; [

View File

@ -1,17 +0,0 @@
{ pkgs }:
pkgs.writeShellApplication {
name = "screen-cap";
runtimeInputs = with pkgs; [
wl-screenrec
gifski
inotify-tools
libnotify
mktemp
slurp
file
];
text = ''
#!${pkgs.bash}/bin/bash
${builtins.readFile ./screen-cap.bash}
'';
}

View File

@ -74,8 +74,8 @@ bind = SUPERSHIFT,M,exit
# May be videos or screenshots # May be videos or screenshots
bind = SUPER,S,exec,grim -g "$(slurp)" - | swappy -f - -o - | wl-copy bind = SUPER,S,exec,grim -g "$(slurp)" - | swappy -f - -o - | wl-copy
bind = CTRLSUPER,S,exec,grim -g "$(slurp)" - | wl-copy --type image/png bind = CTRLSUPER,S,exec,grim -g "$(slurp)" - | wl-copy --type image/png
bind = SUPERSHIFT,S,exec,screen-cap bind = SUPERSHIFT,S,exec,~/.config/hypr/scripts/screen-cap.bash
bind = SUPERSHIFT,A,exec,screen-cap gif bind = SUPERSHIFT,A,exec,~/.config/hypr/scripts/screen-cap.bash gif
# Mediakey bindings as taken from `wev` # Mediakey bindings as taken from `wev`
bindl = ,XF86AudioPrev,exec,playerctl previous bindl = ,XF86AudioPrev,exec,playerctl previous

View File

@ -1,4 +1,14 @@
set -euoE pipefail #!/usr/bin/env -S nix shell github:nix-community/nixgl#nixGLIntel nixpkgs#bash nixpkgs#wl-screenrec nixpkgs#gifski nixpkgs#inotify-tools nixpkgs#libnotify nixpkgs#mktemp nixpkgs#slurp nixpkgs#slurp --command bash
# Dependencies:
# - wl-screenrec: https://github.com/russelltg/wl-screenrec
# - notification daemon: https://archlinux.org/packages/?name=notification-daemon
# - wl-clipboard: https://github.com/bugaevc/wl-clipboard
# - gifski: https://github.com/sindresorhus/Gifski
#
# Gifski is necessary because `wl-screenrec` doesn't support gifs
# set -euoE pipefail
mk-screen-cap() { mk-screen-cap() {
local program_name="Screen Capture" local program_name="Screen Capture"
@ -30,7 +40,7 @@ mk-screen-cap() {
local geometry local geometry
geometry="$(slurp)" geometry="$(slurp)"
wl-screenrec --filename "$tmp_file" --geometry "$geometry" & nixGLIntel wl-screenrec --filename "$tmp_file" --geometry "$geometry" &
local pid="${!}" local pid="${!}"
printf "%s" "$pid" >"$pid_file" printf "%s" "$pid" >"$pid_file"
printf "Putting pid: '%d' into pid file: '%s'\n" "$pid" "$pid_file" printf "Putting pid: '%d' into pid file: '%s'\n" "$pid" "$pid_file"

View File

@ -47,7 +47,6 @@ in
slurp slurp
unzip unzip
Fmt Fmt
screen-cap
starship starship
nodePackages.prettier nodePackages.prettier
cargo cargo