mirror of
https://github.com/m-housh/dotfiles.git
synced 2026-02-14 06:12:34 +00:00
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:
4
env/.config/utils-launcher/config.json
vendored
4
env/.config/utils-launcher/config.json
vendored
@@ -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"
|
||||
}
|
||||
]
|
||||
|
||||
2
env/.local/scripts/hypr/logging
vendored
2
env/.local/scripts/hypr/logging
vendored
@@ -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."
|
||||
|
||||
2
env/.local/scripts/hypr/preview-stats
vendored
2
env/.local/scripts/hypr/preview-stats
vendored
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user