added modules to waybar
This commit is contained in:
@@ -3,9 +3,11 @@
|
||||
# Or execute your favorite apps at launch like this:
|
||||
|
||||
# exec-once = uwsm app -- waybar
|
||||
exec-once = uwsm app -- nm-applet
|
||||
# exec-once = uwsm app -- nextcloud --background
|
||||
exec-once = uwsm app -- nm-applet
|
||||
exec-once = uwsm app -- rclone mount google_drive: ~/gdrive
|
||||
exec-once = uwsm app -- protonvpn-app
|
||||
exec-once = uwsm app -- hyprpaper
|
||||
exec-once = uwsm app -- sh -c "/usr/bin/discord discord --enable-features=UseOzonePlatform --ozone-platform=wayland --start-minimized &> /dev/null"
|
||||
exec-once = uwsm app -- /usr/bin/discord --enable-features=UseOzonePlatform --ozone-platform=wayland --start-minimized &> /dev/null
|
||||
exec-once = uwsm app -- sleep 5 && ~/.config/hypr/scripts/replay-ctrl.sh start
|
||||
# exec-once = uwsm app -- /usr/lib/xdg-desktop-portal-hyprland
|
||||
|
@@ -1,10 +1,12 @@
|
||||
|
||||
$mainMod = SUPER # Sets "Windows" key as main modifier
|
||||
|
||||
bind = , PRINT, exec, gscreenshot -c -s
|
||||
bind = , PRINT, exec, grim -g "$(slurp)" - | wl-copy &
|
||||
bindr = ALT SHIFT, z, exec, ~/.config/hypr/scripts/replay-ctrl.sh save &
|
||||
# bind = , PRINT, exec, gscreenshot -c -s
|
||||
bind = $mainMod, RETURN, exec, $terminal
|
||||
bind = $mainMod SHIFT, Q, killactive,
|
||||
bind = $mainMod CTRL, L, exec, hyprlock
|
||||
bind = $mainMod CTRL, L, exec, hyprlock &
|
||||
bind = $mainMod, E, exec, $fileManager
|
||||
bind = $mainMod, V, togglefloating,
|
||||
bind = $mainMod, F, fullscreen,
|
||||
|
70
hypr/scripts/replay-ctrl.sh
Executable file
70
hypr/scripts/replay-ctrl.sh
Executable file
@@ -0,0 +1,70 @@
|
||||
#!/bin/sh
|
||||
|
||||
PROGRAM_NAME="gpu-screen-recorder"
|
||||
PID_FILE="/tmp/gpu-screen-recorder.pid"
|
||||
|
||||
start() {
|
||||
if [ -f "$PID_FILE" ]; then
|
||||
PID=$(cat "$PID_FILE")
|
||||
if ps -p "$PID" > /dev/null; then
|
||||
notify-send -u low "$PROGRAM_NAME" "$PROGRAM_NAME is already active."
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
video_path="$HOME/Videos/replay/"
|
||||
mkdir -p "$video_path"
|
||||
notify-send -u low "$PROGRAM_NAME" "$PROGRAM_NAME is starting ..."
|
||||
gpu-screen-recorder -w screen -f 60 -a default_output -c mkv -bm qp -cr full -tune quality -k av1_10bit -q high -r 120 -replay-storage ram -ab 320 -o "$video_path" &
|
||||
echo $! > "$PID_FILE"
|
||||
}
|
||||
|
||||
stop() {
|
||||
if [ -f "$PID_FILE" ]; then
|
||||
PID=$(cat "$PID_FILE")
|
||||
if ps -p "$PID" > /dev/null; then
|
||||
kill "$PID"
|
||||
rm "$PID_FILE"
|
||||
notify-send -u low "$PROGRAM_NAME" "$PROGRAM_NAME has been stopped."
|
||||
else
|
||||
rm "$PID_FILE" # Stale PID file
|
||||
notify-send -u low "$PROGRAM_NAME" "$PROGRAM_NAME is not running."
|
||||
fi
|
||||
else
|
||||
notify-send -u low "$PROGRAM_NAME" "$PROGRAM_NAME is not running."
|
||||
fi
|
||||
}
|
||||
|
||||
save() {
|
||||
if [ -f "$PID_FILE" ]; then
|
||||
PID=$(cat "$PID_FILE")
|
||||
if ps -p "$PID" > /dev/null; then
|
||||
pkill -SIGUSR1 -f gpu-screen-recorder && sleep 0.5 && notify-send -u low "$PROGRAM_NAME" "Saving replay..."
|
||||
else
|
||||
# The process is not running, but the PID file exists.
|
||||
# This can happen if the process crashed.
|
||||
# We'll remove the stale PID file.
|
||||
rm "$PID_FILE"
|
||||
notify-send -u low "$PROGRAM_NAME" "$PROGRAM_NAME is not running."
|
||||
fi
|
||||
else
|
||||
notify-send -u low "$PROGRAM_NAME" "$PROGRAM_NAME is not running."
|
||||
fi
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
save)
|
||||
save
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|save}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit 0
|
7
hypr/scripts/restart_xdg-desktop-portal-hyprland.sh
Executable file
7
hypr/scripts/restart_xdg-desktop-portal-hyprland.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
sleep 1
|
||||
killall -e xdg-desktop-portal-hyprland
|
||||
killall xdg-desktop-portal
|
||||
/usr/lib/xdg-desktop-portal-hyprland &
|
||||
sleep 2
|
||||
/usr/lib/xdg-desktop-portal &
|
Reference in New Issue
Block a user