mirror of
https://github.com/m-housh/dotfiles.git
synced 2026-02-14 22:22:40 +00:00
feat: Updates logging vars in launch script.
This commit is contained in:
10
env/.local/scripts/hypr/launch
vendored
10
env/.local/scripts/hypr/launch
vendored
@@ -1,7 +1,14 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
set -o nounset
|
||||||
|
set -o pipefail
|
||||||
|
|
||||||
|
SCRIPTS=${SCRIPTS:-$HOME/.local/scripts}
|
||||||
THIS_FILE=${BASH_SOURCE[0]}
|
THIS_FILE=${BASH_SOURCE[0]}
|
||||||
|
LOG_LABEL=$(basename "$THIS_FILE")
|
||||||
THIS=$(basename "$THIS_FILE")
|
THIS=$(basename "$THIS_FILE")
|
||||||
|
LOG_FILE=${LOG_FILE:-"/tmp/$LOG_LABEL.log"}
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
@@ -52,7 +59,6 @@ launch_cmd=()
|
|||||||
pattern=""
|
pattern=""
|
||||||
special_flag="0"
|
special_flag="0"
|
||||||
special=""
|
special=""
|
||||||
SCRIPTS=${SCRIPTS:-$HOME/.local/scripts}
|
|
||||||
|
|
||||||
while [[ $# -gt 0 ]]; do
|
while [[ $# -gt 0 ]]; do
|
||||||
if [[ $1 == "-c" ]] || [[ $1 == "--or-close" ]]; then
|
if [[ $1 == "-c" ]] || [[ $1 == "--or-close" ]]; then
|
||||||
@@ -114,7 +120,7 @@ launch_application() {
|
|||||||
|
|
||||||
# Setup logging file and label
|
# Setup logging file and label
|
||||||
source "$SCRIPTS/hypr/logging"
|
source "$SCRIPTS/hypr/logging"
|
||||||
setup-logging "/tmp/$THIS.log" "$THIS"
|
setup-logging "$LOG_FILE" "$LOG_LABEL"
|
||||||
|
|
||||||
if [[ -z $pattern ]]; then
|
if [[ -z $pattern ]]; then
|
||||||
log --error "Must supply a pattern to match the window class."
|
log --error "Must supply a pattern to match the window class."
|
||||||
|
|||||||
Reference in New Issue
Block a user