diff options
author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2024-06-18 15:34:10 +0200 |
---|---|---|
committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2024-06-18 15:34:10 +0200 |
commit | b0cf79d522a609eda250629386eb45c2978ef2d8 (patch) | |
tree | 32b13bd478d83141a87e6a4527bf57e2e47149c2 | |
parent | 9639cc439cfd4950e0a2c2b86e3b7ed8b334dc9f (diff) |
checkpoint
-rwxr-xr-x | bin/guiscripts/record | 20 | ||||
-rwxr-xr-x | bin/menuscripts/keyadd | 2 | ||||
-rwxr-xr-x | config/common/tmux/tmux.conf | 2 | ||||
-rw-r--r-- | config/essentials/zsh/.zshrc | 2 |
4 files changed, 20 insertions, 6 deletions
diff --git a/bin/guiscripts/record b/bin/guiscripts/record index 778e02e..df4b6e6 100755 --- a/bin/guiscripts/record +++ b/bin/guiscripts/record @@ -11,6 +11,8 @@ lock="/tmp/record.lock" # - xdotool: active # - xdg-user-dir +audio= + # $1: width # $2: height # $3: x @@ -30,10 +32,9 @@ record_cmd() herbe "started recording." & w=$(($3 + $3 % 2)) h=$(($4 + $4 % 2)) - ffmpeg \ + ffmpeg $audio \ -v 16 \ -r 30 \ - -f pulse -ac 2 -i default \ -f x11grab \ -s "${w}x${h}" \ -i ":0.0+$1,$2" \ @@ -57,9 +58,21 @@ else fi mkdir -p "$dir" +if [ "$1" = "-a" ] +then + audio="-f pulse -ac 2 -i default" + shift +fi + +if [ "$1" = "-l" ] +then + find vids/records/ -type f | sort | tail -n 1 + exit +fi + current=$(date +%F_%H-%M-%S) -[ "$1" ] && option="$1" || option="$(printf 'active\nwindow\npart\nstop\nfull\n' | commander -c)" +[ "$1" ] && option="$1" || option="$(printf 'active\nwindow\npart\nstop\nfull\naudio' | commander -c)" case "$option" in active) record_cmd $(xwininfo -id "$(xdotool getactivewindow)" | @@ -82,5 +95,6 @@ case "$option" in ;; stop) kill "$(pgrep ffmpeg | xargs ps | grep 'x11grab' | awk '{print $1}')"; rm -f "$lock" ;; full) record_cmd 0 0 1920 1080 $dir $current ;; + audio) $0 -a; exit ;; help|*) >&2 printf 'record [dir] (active|window|part|stop|full)\n' ;; esac diff --git a/bin/menuscripts/keyadd b/bin/menuscripts/keyadd index 12519ec..4e7949f 100755 --- a/bin/menuscripts/keyadd +++ b/bin/menuscripts/keyadd @@ -2,7 +2,7 @@ log() { - notify-send -t 1000 "keyadd" "$1" + notify-send -t 1000 "keyadd" "$1" & >&2 printf '%s\n' "$1" } diff --git a/config/common/tmux/tmux.conf b/config/common/tmux/tmux.conf index 9300c97..8cf10e5 100755 --- a/config/common/tmux/tmux.conf +++ b/config/common/tmux/tmux.conf @@ -120,7 +120,7 @@ set -g status on #+--- Layout ---+ set -g set-titles-string "[#S: #W] #T" set -g set-titles on -set -g status-position top +set -g status-position bottom set -g window-status-current-style "underscore" set -g status-justify left set -g status-left-length 16 diff --git a/config/essentials/zsh/.zshrc b/config/essentials/zsh/.zshrc index 6bd948a..8aa9f5e 100644 --- a/config/essentials/zsh/.zshrc +++ b/config/essentials/zsh/.zshrc @@ -41,7 +41,7 @@ plug "zsh-users/zsh-completions" plug "MichaelAquilina/zsh-auto-notify" export AUTO_NOTIFY_TITLE="zsh" export AUTO_NOTIFY_BODY="%command [%exit_code]" -AUTO_NOTIFY_IGNORE+=("gurk" "ttyper" "pulsemixer" "tmux" "btop" "vis") +AUTO_NOTIFY_IGNORE+=("gurk" "ttyper" "pulsemixer" "tmux" "btop" "vis" "clock") # Substring search settings export HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND="bg=blue,fg=black,bold" |