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

@@ -82,9 +82,9 @@ The showcased images do not reflect the latest version of the system's appearanc
| Mimetypes | MPV, Imv, Zathura | | Mimetypes | MPV, Imv, Zathura |
| Image Editor | Swappy | | Image Editor | Swappy |
| Screenshot | Grim + Slurp | | Screenshot | Grim + Slurp |
| Recorder | Wf-recorder | | Recorder | Wl-screenrec |
| Color Picker | Hyprpicker | | Color Picker | Hyprpicker |
| Clipboard | Wl-clipboard + Cliphist + Clipboard-jh | | Clipboard | Wl-clipboard + Cliphist + Wl-clip-persist |
| Idle | Hypridle | | Idle | Hypridle |
| Lock | Hyprlock | | Lock | Hyprlock |
| Logout menu | Wlogout | | Logout menu | Wlogout |

View File

@@ -1,3 +1,3 @@
function autostart 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 end

View File

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

View File

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

View File

@@ -1,16 +1,18 @@
function record_screen_gif 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 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 else
set geometry (slurp) set geometry (slurp)
if not [ -z $geometry ] 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 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
end end

View File

@@ -1,16 +1,16 @@
function record_screen_mp4 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 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 else
set geometry (slurp) set geometry (slurp)
if not [ -z $geometry ] 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 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
end end

View File

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

View File

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

View File

@@ -5,12 +5,4 @@
environment.variables.SPOTIFY_PATH = "${pkgs.spotify}/"; environment.variables.SPOTIFY_PATH = "${pkgs.spotify}/";
environment.variables.JDK_PATH = "${pkgs.jdk11}/"; environment.variables.JDK_PATH = "${pkgs.jdk11}/";
environment.variables.NODEJS_PATH = "${pkgs.nodePackages_latest.nodejs}/"; environment.variables.NODEJS_PATH = "${pkgs.nodePackages_latest.nodejs}/";
environment.variables.CI = "1";
# environment.variables.CLIPBOARD_EDITOR = "hx";
environment.variables.CLIPBOARD_NOAUDIO = "1";
# environment.variables.CLIPBOARD_NOGUI = "1";
# environment.variables.CLIPBOARD_NOPROGRESS = "1";
# environment.variables.CLIPBOARD_NOREMOTE = "1";
environment.variables.CLIPBOARD_SILENT = "1";
} }

View File

@@ -37,11 +37,10 @@
imagemagick imagemagick
swappy swappy
ffmpeg_6-full ffmpeg_6-full
# wl-screenrec wl-screenrec
wf-recorder
wl-clipboard wl-clipboard
wl-clip-persist
cliphist cliphist
clipboard-jh
xdg-utils xdg-utils
wtype wtype
wlrctl wlrctl