feat: Updates timestamp formats for logs to be more readable, updates utils-launcher config to use the '*ctl' command variants, updates preview-stats for utils to format previews based on width of preview window.

This commit is contained in:
2025-10-08 11:10:42 -04:00
parent 18fce8e2bb
commit fd22a4ab4a
4 changed files with 6 additions and 5 deletions

View File

@@ -37,11 +37,11 @@
{
"name": "Windows - close in active workspace",
"description": "Close all windows in the currently active workspace.",
"exec": "$SCRIPTS/hypr/close-windows --active-workspace"
"exec": "$SCRIPTS/hypr/windowctl close --active-workspace"
},
{
"name": "Windows - close ALL",
"description": "Close all windows in all workspaces.",
"exec": "$SCRIPTS/hypr/close-windows --all"
"exec": "$SCRIPTS/hypr/windowctl close --all"
}
]

View File

@@ -110,7 +110,7 @@ logging() {
local file=${LOG_FILE[i]}
local id=$LOG_INVOCATION_ID
local label=${LOG_LABEL[i]:-"$LOG_LABEL"}
local time=$("$SCRIPTS/isosec")
local time=$(date '+%D %H:%M:%S')
if [[ -z $file ]] || [[ -z $id ]] || [[ -z $label ]]; then
echo "Loggging not properly setup."

View File

@@ -87,7 +87,7 @@ elif [[ $mode == "utils" ]]; then
fi
desc=$(jq -C ".[] | select(.name == \"$arg\") | .description" $config)
exec=$(jq -C ".[] | select(.name == \"$arg\") | .exec" $config)
echo -e "\n${desc[@]}\n\n"
echo -e "\n${desc[@]}\n\n" | fmt -w ${FZF_PREVIEW_COLUMNS:-80}
echo -e "\e[31mEXEC:\e[0m $exec\n"
else
log --error "Unexpected mode: $mode"

View File

@@ -8,6 +8,7 @@ THIS_FILE=${BASH_SOURCE[0]}
LOG_LABEL=$(basename "$THIS_FILE")
# Allows script name to be set when called from a parent script or defaults to filename.
THIS=${THIS:-$LOG_LABEL}
LOG_FILE=${LOG_FILE:-/tmp/$LOG_LABEL.log}
usage() {
cat <<EOF
@@ -108,7 +109,7 @@ close() {
# Setup logging file and label
source "$SCRIPTS/hypr/logging"
setup-logging "$LOG_LABEL"
setup-logging "$LOG_FILE" "$LOG_LABEL"
export LOG_ENABLE_DRY_RUN="$dry_run_flag"
if [[ $active_workspace_flag == "1" ]]; then