Remove asciinema logging
This commit is contained in:
parent
3b16b3440e
commit
2e01fe5514
5 changed files with 0 additions and 51 deletions
|
@ -1,32 +0,0 @@
|
||||||
#!/usr/bin/env sh
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
if [ -x "$(command -v asciinema)" ] \
|
|
||||||
&& [ -z "$ASCIINEMA_REC" ] \
|
|
||||||
&& [ -n "$ASCIINEMA_LOG" ]
|
|
||||||
then
|
|
||||||
ASCIINEMA_LOG_DIR="$HOME/.cache/logs"
|
|
||||||
mkdir -p "$ASCIINEMA_LOG_DIR"
|
|
||||||
_file_name_date=$(date +%Y-%m-%d_%H%M%S)
|
|
||||||
|
|
||||||
if [ "$ASCIINEMA_LOG" = "raw" ]
|
|
||||||
then
|
|
||||||
export ASCIINEMA_LOG_FILE="$ASCIINEMA_LOG_DIR/asciinema-$_file_name_date.txt"
|
|
||||||
asciinema rec --quiet --raw "$ASCIINEMA_LOG_FILE"
|
|
||||||
exit 0 # Parent script should exit
|
|
||||||
fi
|
|
||||||
if [ "$ASCIINEMA_LOG" = "video" ]
|
|
||||||
then
|
|
||||||
export ASCIINEMA_LOG_FILE="$ASCIINEMA_LOG_DIR/asciinema-$_file_name_date.cast"
|
|
||||||
asciinema rec --quiet --idle-time-limit=3 -t "Terminal log on $_file_name_date" "$ASCIINEMA_LOG_FILE"
|
|
||||||
exit 0 # Parent script should exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Invalid value for ASCIINEMA_LOG: $ASCIINEMA_LOG"
|
|
||||||
echo "Valid values are: raw, video"
|
|
||||||
echo "Your session will not be recorded"
|
|
||||||
exit 1 # Parent script should not exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
exit 1 # Parent script should not exit
|
|
|
@ -16,8 +16,6 @@ if [ -z "$action" ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
notify-send "$(user-cleaner)"
|
|
||||||
|
|
||||||
case "$action" in
|
case "$action" in
|
||||||
backup-shutdown) _menu_shutdown_backup && systemctl poweroff -i ;;
|
backup-shutdown) _menu_shutdown_backup && systemctl poweroff -i ;;
|
||||||
shutdown) systemctl poweroff -i ;;
|
shutdown) systemctl poweroff -i ;;
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
#!/usr/bin/env sh
|
|
||||||
|
|
||||||
echo "Running user-cleaner..."
|
|
||||||
|
|
||||||
# clean old logs
|
|
||||||
log_dir="$HOME/.cache/logs"
|
|
||||||
if [ -d "$log_dir" ]
|
|
||||||
then
|
|
||||||
echo "Cleaning old logs..."
|
|
||||||
find "$log_dir" -type f -mtime +3 -print -delete
|
|
||||||
find "$log_dir" -type f -mtime +1 -size -25k -print -delete
|
|
||||||
fi
|
|
|
@ -1,7 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
export AUTOSTART_DISPLAY="Hyprland"
|
export AUTOSTART_DISPLAY="Hyprland"
|
||||||
export ASCIINEMA_LOG="video"
|
|
||||||
|
|
||||||
export MONITOR_PRIMARY="DisplayPort-0"
|
export MONITOR_PRIMARY="DisplayPort-0"
|
||||||
export MONITOR_SECONDARY="HDMI-A-0"
|
export MONITOR_SECONDARY="HDMI-A-0"
|
||||||
|
|
|
@ -111,7 +111,3 @@ source source-remote-file \
|
||||||
|
|
||||||
[ -x "$(command -v direnv)" ] && eval "$(direnv hook zsh)"
|
[ -x "$(command -v direnv)" ] && eval "$(direnv hook zsh)"
|
||||||
[ -x "$(command -v starship)" ] && eval "$(starship init zsh)"
|
[ -x "$(command -v starship)" ] && eval "$(starship init zsh)"
|
||||||
|
|
||||||
asciinema-log && exit
|
|
||||||
|
|
||||||
true # Don't start with 1 as exit code
|
|
||||||
|
|
Loading…
Reference in a new issue