1
0
mirror of https://github.com/XNM1/linux-nixos-hyprland-config-dotfiles.git synced 2025-09-15 09:45:58 +03:00

changed recorder & fixed clipboard

This commit is contained in:
xnm
2024-05-06 22:44:58 +03:00
parent fd1a80a9c3
commit 2ee6f3e0ec
12 changed files with 31 additions and 39 deletions

View File

@@ -1,3 +1,3 @@
function autostart
pypr & hyprpaper & waybar & poweralertd & wl-paste --watch cliphist store & avizo-service & systemctl --user start psi-notify & hypridle -w
pypr & hyprpaper & waybar & poweralertd & wl-paste --type text --watch cliphist store & wl-paste --type image --watch cliphist store & wl-clip-persist --clipboard regular & avizo-service & systemctl --user start psi-notify & hypridle
end

View File

@@ -1,7 +1,7 @@
function check_recording
set target_process "wf-recorder"
if pgrep $target_process > /dev/null
set target_process wl-screenrec
if pgrep $target_process >/dev/null
echo "{\"text\":\"\", \"tooltip\":\"Recording\", \"alt\":\"Recording\"}"
end
end
end

View File

@@ -1,5 +1,4 @@
function clipboard_clear
rm "$HOME/.cache/cliphist/db"
cb clr -a
dunstify "Clipboard" "Cleared" -t 2000
end
dunstify Clipboard Cleared -t 2000
end

View File

@@ -1,3 +1,3 @@
function clipboard_to_type
cliphist list | rofi -dmenu -p clipboard | cliphist decode | wtype -
end
end

View File

@@ -1,16 +1,18 @@
function record_screen_gif
set target_process "wf-recorder"
set target_process wl-screenrec
if pgrep $target_process > /dev/null
if pgrep $target_process >/dev/null
killall -s SIGINT $target_process
cb cp ~/Pictures/Records/(cd ~/Pictures/Records && ls -tA | head -n1 | awk '{print $NF}')
dunstify -i ~/.config/fish/icons/camera_gif_icon.png -r $(cd ~/Pictures/Records/ && ls -1 | wc -l) "Recording Stopped 󰙧 (GIF)" -t 2000
else
set geometry (slurp)
if not [ -z $geometry ]
set record_name $(echo "recrod-$(date +"%Y-%m-%d--%H:%M:%S").gif")
set record_name $(echo "recrod-$(date +"%Y-%m-%d--%H:%M:%S")")
dunstify -i ~/.config/fish/icons/camera_gif_icon.png -r $(cd ~/Pictures/Records/ && ls -1 | wc -l) "Recording Started  (GIF)" -t 2000
wf-recorder -g "$geometry" -f "$HOME/Pictures/Records/$record_name" -c gif -F fps=30
wl-screenrec -g "$geometry" -f "$HOME/Pictures/Records/$record_name.mp4" --encode-resolution 1920x1080
ffmpeg -i "$HOME/Pictures/Records/$record_name.mp4" "$HOME/Pictures/Records/$record_name.gif"
rm "$HOME/Pictures/Records/$record_name.mp4"
wl-copy -t text/uri-list file://$HOME/Pictures/Records/$record_name.gif\n
dunstify -i ~/.config/fish/icons/camera_gif_icon.png -r $(cd ~/Pictures/Records/ && ls -1 | wc -l) "Recording Stopped 󰙧 (GIF)" -t 2000
end
end
end
end

View File

@@ -1,16 +1,16 @@
function record_screen_mp4
set target_process "wf-recorder"
set target_process wl-screenrec
if pgrep $target_process > /dev/null
if pgrep $target_process >/dev/null
killall -s SIGINT $target_process
cb cp ~/Videos/Records/(cd ~/Videos/Records && ls -tA | head -n1 | awk '{print $NF}')
dunstify -i ~/.config/fish/icons/camera_mp4_icon.png -r $(cd ~/Videos/Records/ && ls -1 | wc -l) "Recording Stopped 󰙧 (MP4)" -t 2000
else
set geometry (slurp)
if not [ -z $geometry ]
set record_name $(echo "recrod-$(date +"%Y-%m-%d--%H:%M:%S").mp4")
set record_name $(echo "recrod-$(date +"%Y-%m-%d--%H:%M:%S")")
dunstify -i ~/.config/fish/icons/camera_mp4_icon.png -r $(cd ~/Videos/Records/ && ls -1 | wc -l) "Recording Started  (MP4)" -t 2000
wf-recorder -g "$geometry" -f "$HOME/Videos/Records/$record_name" -c h264_vaapi -d /dev/dri/renderD128
wl-screenrec -g "$geometry" -f "$HOME/Videos/Records/$record_name.mp4"
wl-copy -t text/uri-list file://$HOME/Videos/Records/$record_name.mp4\n
dunstify -i ~/.config/fish/icons/camera_mp4_icon.png -r $(cd ~/Videos/Records/ && ls -1 | wc -l) "Recording Stopped 󰙧 (MP4)" -t 2000
end
end
end
end

View File

@@ -1,3 +1,3 @@
function screenshot_edit
swappy -f ~/Pictures/Screenshots/(cd ~/Pictures/Screenshots && ls -tA | head -n1 | awk '{print $NF}')
end
end

View File

@@ -1,6 +1,6 @@
source = $HOME/.config/hypr/macchiato.conf
$accent = $teal
$accent = 0xb3$tealAlpha
$accentAlpha = $tealAlpha
$font = JetBrains Mono Regular

View File

@@ -191,7 +191,7 @@
"custom/recording": {
"interval": 1,
"exec-if": "pgrep wf-recorder",
"exec-if": "pgrep wl-screenrec",
"exec": "fish -c check_recording",
"return-type": "json",
},