wip
This commit is contained in:
parent
3e5b4a6268
commit
2b2e124602
1 changed files with 0 additions and 18 deletions
18
.scripts/bar
18
.scripts/bar
|
@ -13,16 +13,6 @@ command_exists() {
|
|||
command -v "$@" >/dev/null 2>&1
|
||||
}
|
||||
|
||||
# Function to handle errors
|
||||
handle_error() {
|
||||
local exit_code=$1
|
||||
local command_name=$2
|
||||
if [ $exit_code -ne 0 ]; then
|
||||
log_notify "critical" "Error" "Failed to execute $command_name"
|
||||
exit $exit_code
|
||||
fi
|
||||
}
|
||||
|
||||
# fallback() {
|
||||
# if command_exists hyprpanel; then
|
||||
# pkill hyprpanel
|
||||
|
@ -51,27 +41,19 @@ barsetup() {
|
|||
case "$bar" in
|
||||
hyprpanel)
|
||||
pkill hyprpanel
|
||||
# handle_error $? "pkill hyprpanel"
|
||||
hyprpanel &
|
||||
handle_error $? "hyprpanel"
|
||||
;;
|
||||
gBar)
|
||||
pkill gBar
|
||||
handle_error $? "pkill gBar"
|
||||
gBar bar 0 &
|
||||
handle_error $? "gBar bar 0"
|
||||
;;
|
||||
waybar)
|
||||
pkill waybar
|
||||
handle_error $? "pkill waybar"
|
||||
waybar &
|
||||
handle_error $? "waybar"
|
||||
;;
|
||||
*)
|
||||
pkill $bar
|
||||
# handle_error $? "pkill $bar"
|
||||
$bar &
|
||||
handle_error $? "$bar"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue