diff --git a/home/linux/desktop/hyprland/conf/hyprland.conf b/home/linux/desktop/hyprland/conf/hyprland.conf index 951e685e..dd4e40a5 100644 --- a/home/linux/desktop/hyprland/conf/hyprland.conf +++ b/home/linux/desktop/hyprland/conf/hyprland.conf @@ -94,7 +94,6 @@ $term = kitty $app_launcher = ~/.config/hypr/scripts/menu $volume = ~/.config/hypr/scripts/volume $backlight = ~/.config/hypr/scripts/brightness -$screenshot = ~/.config/hypr/scripts/screenshot $lockscreen = ~/.config/hypr/scripts/lockscreen $wlogout = ~/.config/hypr/scripts/wlogout $colorpicker = ~/.config/hypr/scripts/colorpicker @@ -137,9 +136,9 @@ bind=,XF86AudioPlay,exec,mpc toggle bind=,XF86AudioStop,exec,mpc stop # -- Screenshots -- -bind=,Print,exec,$screenshot --now -bind=SUPER,Print,exec,$screenshot --win -bind=CTRL,Print,exec,$screenshot --area +bind=,Print,exec,hyprshot -m output -o ~/Pictures/Screenshots -- imv +bind=SUPER,Print,exec,hyprshot -m window -o ~/Pictures/Screenshots -- imv +bind=CTRL,Print,exec,hyprshot -m region -o ~/Pictures/Screenshots -- imv # Focus bind=SUPER,left,movefocus,l diff --git a/home/linux/desktop/hyprland/conf/scripts/screenshot b/home/linux/desktop/hyprland/conf/scripts/screenshot deleted file mode 100755 index 851f3341..00000000 --- a/home/linux/desktop/hyprland/conf/scripts/screenshot +++ /dev/null @@ -1,55 +0,0 @@ -#!/usr/bin/env bash - -## Script to take screenshots with grim, slurp (in Wayland) - -iDIR="$HOME/.config/hypr/mako/icons" - -time=$(date +%Y-%m-%d-%H-%M-%S) -dir="$(xdg-user-dir PICTURES)/Screenshots" # need -file="Screenshot_${time}_${RANDOM}.png" - -# notify and view screenshot -notify_cmd_shot="notify-send -h string:x-canonical-private-synchronous:shot-notify -u low -i ${iDIR}/picture.png" -notify_view () { - ${notify_cmd_shot} "Copied to clipboard." - imv ${dir}/"$file" - if [[ -e "$dir/$file" ]]; then - ${notify_cmd_shot} "Screenshot Saved." - else - ${notify_cmd_shot} "Screenshot Deleted." - fi -} - -# take shots -shotnow () { - cd ${dir} && grim - | tee "$file" | wl-copy - notify_view -} - -shotwin () { - w_pos=$(hyprctl activewindow | grep 'at:' | cut -d':' -f2 | tr -d ' ' | tail -n1) - w_size=$(hyprctl activewindow | grep 'size:' | cut -d':' -f2 | tr -d ' ' | tail -n1 | sed s/,/x/g) - cd ${dir} && grim -g "$w_pos $w_size" - | tee "$file" | wl-copy - notify_view -} - -shotarea () { - cd ${dir} && grim -g "$(slurp -b 1B1F28CC -c E06B74ff -s C778DD0D -w 2)" - | tee "$file" | wl-copy - notify_view -} - -if [[ ! -d "$dir" ]]; then - mkdir -p "$dir" -fi - -if [[ "$1" == "--now" ]]; then - shotnow -elif [[ "$1" == "--area" ]]; then - shotarea -elif [[ "$1" == "--win" ]]; then - shotwin -else - echo -e "Available Options : --now --win --area" -fi - -exit 0 diff --git a/home/linux/desktop/hyprland/values/packages.nix b/home/linux/desktop/hyprland/values/packages.nix index b8d7970e..58672e51 100644 --- a/home/linux/desktop/hyprland/values/packages.nix +++ b/home/linux/desktop/hyprland/values/packages.nix @@ -1,4 +1,8 @@ -{pkgs, ...}: { +{ + pkgs, + pkgs-unstable, + ... +}: { home.packages = with pkgs; [ waybar # the status bar swaybg # the wallpaper @@ -8,10 +12,10 @@ wl-clipboard # copying and pasting hyprpicker # color picker - wf-recorder # creen recording + pkgs-unstable.hyprshot # screen shot grim # taking screenshots slurp # selecting a region to screenshot - # TODO replace by `flameshot gui --raw | wl-copy` + wf-recorder # creen recording mako # the notification daemon, the same as dunst