From fd2a747cd5289f82b78dbc87afbe7f8461c286f1 Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Mon, 17 Mar 2025 14:51:48 +0900 Subject: added apps in the waybar-menu as some people seem to have no idea what the hyprland icon is --- config/waybar/ModulesCustom | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config/waybar/ModulesCustom') diff --git a/config/waybar/ModulesCustom b/config/waybar/ModulesCustom index df5f8786..bab0107e 100644 --- a/config/waybar/ModulesCustom +++ b/config/waybar/ModulesCustom @@ -105,7 +105,7 @@ }, "custom/menu": { - "format": "", + "format": " apps", "on-click": "pkill rofi || rofi -show drun -modi run,drun,filebrowser,window", "on-click-middle": "$HOME/.config/hypr/UserScripts/WallpaperSelect.sh", "on-click-right": "$HOME/.config/hypr/scripts/WaybarLayout.sh", -- cgit v1.2.3 From b4485d18066464929ec33fd59b7d98e7b4b2f141 Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Mon, 17 Mar 2025 15:24:26 +0900 Subject: nope bad idea. it ruins the vertical layout waybar --- config/waybar/ModulesCustom | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config/waybar/ModulesCustom') diff --git a/config/waybar/ModulesCustom b/config/waybar/ModulesCustom index bab0107e..96a718a6 100644 --- a/config/waybar/ModulesCustom +++ b/config/waybar/ModulesCustom @@ -105,7 +105,7 @@ }, "custom/menu": { - "format": " apps", + "format": "  ", "on-click": "pkill rofi || rofi -show drun -modi run,drun,filebrowser,window", "on-click-middle": "$HOME/.config/hypr/UserScripts/WallpaperSelect.sh", "on-click-right": "$HOME/.config/hypr/scripts/WaybarLayout.sh", -- cgit v1.2.3 From 51b04af8b39201a86d1c095bde51d4019ccef796 Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Tue, 18 Mar 2025 18:23:10 +0900 Subject: Added WaybarScripts.sh. In this way, waybar modules can use the default terminal set in ~/.config/hypr/UserConfigs/01-UserDefaults.conf --- config/hypr/scripts/WaybarScripts.sh | 41 ++++++++++++++++++++++++++++++++++++ config/waybar/Modules | 6 +++--- config/waybar/ModulesCustom | 2 +- config/waybar/ModulesVertical | 4 ++-- 4 files changed, 47 insertions(+), 6 deletions(-) create mode 100755 config/hypr/scripts/WaybarScripts.sh (limited to 'config/waybar/ModulesCustom') diff --git a/config/hypr/scripts/WaybarScripts.sh b/config/hypr/scripts/WaybarScripts.sh new file mode 100755 index 00000000..32b43f02 --- /dev/null +++ b/config/hypr/scripts/WaybarScripts.sh @@ -0,0 +1,41 @@ +#!/bin/bash +# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ # +# This file used on waybar modules sourcing defaults set in $HOME/.config/hypr/UserConfigs/01-UserDefaults.conf + +# Define the path to the config file +config_file=$HOME/.config/hypr/UserConfigs/01-UserDefaults.conf + +# Check if the config file exists +if [[ ! -f "$config_file" ]]; then + echo "Error: Configuration file not found!" + exit 1 +fi + +# Process the config file in memory, removing the $ and fixing spaces +config_content=$(sed 's/\$//g' "$config_file" | sed 's/ = /=/') + +# Source the modified content directly from the variable +eval "$config_content" + +# Check if $term is set correctly +if [[ -z "$term" ]]; then + echo "Error: \$term is not set in the configuration file!" + exit 1 +fi + +# Execute accordingly based on the passed argument +if [[ "$1" == "--btop" ]]; then + $term --title btop sh -c 'btop' +elif [[ "$1" == "--nvtop" ]]; then + $term --title nvtop sh -c 'nvtop' +elif [[ "$1" == "--nmtui" ]]; then + $term nmtui +elif [[ "$1" == "--term" ]]; then + $term & +else + echo "Usage: $0 [--btop | --nvtop | --nmtui | --term]" + echo "--btop : Open btop in a new term" + echo "--nvtop : Open nvtop in a new term" + echo "--nmtui : Open nmtui in a new term" + echo "--term : Launch a term window" +fi diff --git a/config/waybar/Modules b/config/waybar/Modules index 4fec766e..32664326 100644 --- a/config/waybar/Modules +++ b/config/waybar/Modules @@ -19,7 +19,7 @@ "format-icons": [ "󰈸" ], - "on-click-right": "kitty --title nvtop sh -c 'nvtop'" + "on-click-right": "$HOME/.config/hypr/scripts/WaybarScripts.sh --nvtop" }, "backlight": { @@ -232,7 +232,7 @@ "format-alt-click": "click", "tooltip": true, "tooltip-format": "{used:0.1f}GB/{total:0.1f}G", - "on-click-right": "kitty --title btop sh -c 'btop'" + "on-click-right": "$HOME/.config/hypr/scripts/WaybarScripts.sh --btop" }, "mpris": { @@ -281,7 +281,7 @@ "format-icons": [ "󰤯", "󰤟", "󰤢", "󰤥", "󰤨" ], - "on-click-right": "kitty nmtui" + "on-click-right": "$HOME/.config/hypr/scripts/WaybarScripts.sh --nmtui" }, "network#speed": { diff --git a/config/waybar/ModulesCustom b/config/waybar/ModulesCustom index 96a718a6..bde9bbc2 100644 --- a/config/waybar/ModulesCustom +++ b/config/waybar/ModulesCustom @@ -26,7 +26,7 @@ "custom/tty": { "format": " ", - "on-click": "kitty &", + "on-click": "$HOME/.config/hypr/scripts/WaybarScripts.sh --term", "tooltip": true, "tooltip-format": "Launch Terminal", }, diff --git a/config/waybar/ModulesVertical b/config/waybar/ModulesVertical index 5dea07ef..7128471b 100644 --- a/config/waybar/ModulesVertical +++ b/config/waybar/ModulesVertical @@ -19,7 +19,7 @@ "format-icons": [ "󰈸" ], - "on-click-right": "kitty --title nvtop sh -c 'nvtop'" + "on-click-right": "$HOME/.config/hypr/scripts/WaybarScripts.sh --nvtop" }, "backlight#vertical": { @@ -68,7 +68,7 @@ "format-alt-click": "click", "tooltip": true, "tooltip-format": "{used:0.1f}GB/{total:0.1f}G", - "on-click-right": "kitty --title btop sh -c 'btop'", + "on-click-right": "$HOME/.config/hypr/scripts/WaybarScripts.sh --btop", }, "pulseaudio#vertical": { -- cgit v1.2.3