♻️ rearranging files
Browse files at this commit9da73fe286d6248ab3006eb61100c0519d8f3168Parent: 6d21e09- refactor
- ♻️ rearranging files
18 changed files +66 -18
- .config/eww/eww.yuck +11 -11
- .config/hypr/hyprland.conf +2 -2
- .config/hypr/hyprlock.conf +1 -1
- .config/scripts/battery_info.sh → .config/scripts/eww/battery_info.sh +0 -0
- .config/scripts/cpu_status.sh → .config/scripts/eww/cpu_status.sh +0 -0
- .config/scripts/datetime_info.sh → .config/scripts/eww/datetime_info.sh +0 -0
- .config/scripts/memory_status.sh → .config/scripts/eww/memory_status.sh +0 -0
- .config/scripts/network_speed.sh → .config/scripts/eww/network_speed.sh +0 -0
- .config/scripts/network_status.sh → .config/scripts/eww/network_status.sh +0 -0
- .config/scripts/privacy_status.sh → .config/scripts/eww/privacy_status.sh +0 -0
- .config/scripts/volume_info.sh → .config/scripts/eww/volume_info.sh +0 -0
- .config/scripts/show_cover.sh → .config/scripts/shared/show_cover.sh +0 -0
- .config/scripts/song_detail.sh → .config/scripts/shared/song_detail.sh +0 -0
- .config/scripts/power_menu.sh → .config/scripts/system/power_menu.sh +0 -0
- .config/scripts/toggle_eww.sh → .config/scripts/system/toggle_eww.sh +0 -0
- .config/scripts/waybar/camera_monitor.sh +30 -0
- .config/waybar/config +12 -4
- .config/waybar/style.css +10 -0
.config/eww/eww.yuckmodified+11 -11
| @@ -17,24 +17,24 @@ | |||
| 17 | 17 | ||
| 18 | ;; Music/Player info - using song_detail.sh script | 18 | ;; Music/Player info - using song_detail.sh script |
| 19 | (defpoll music :interval "1s" | 19 | (defpoll music :interval "1s" |
| 20 | - `bash ~/.config/scripts/song_detail.sh`) | 20 | + `bash ~/.config/scripts/shared/song_detail.sh`) |
| 21 | 21 | ||
| 22 | (defpoll music-status :interval "1s" | 22 | (defpoll music-status :interval "1s" |
| 23 | `playerctl status 2>/dev/null || echo "Stopped"`) | 23 | `playerctl status 2>/dev/null || echo "Stopped"`) |
| 24 | 24 | ||
| 25 | ;; Privacy status - monitors screen sharing, audio input/output | 25 | ;; Privacy status - monitors screen sharing, audio input/output |
| 26 | (defpoll privacy :interval "1s" | 26 | (defpoll privacy :interval "1s" |
| 27 | - `bash ~/.config/scripts/privacy_status.sh status`) | 27 | + `bash ~/.config/scripts/eww/privacy_status.sh status`) |
| 28 | 28 | ||
| 29 | (defpoll privacy-details :interval "1s" | 29 | (defpoll privacy-details :interval "1s" |
| 30 | - `bash ~/.config/scripts/privacy_status.sh details`) | 30 | + `bash ~/.config/scripts/eww/privacy_status.sh details`) |
| 31 | 31 | ||
| 32 | ;; CPU usage | 32 | ;; CPU usage |
| 33 | (defpoll cpu-usage :interval "1s" | 33 | (defpoll cpu-usage :interval "1s" |
| 34 | `top -bn1 2>/dev/null | grep "Cpu(s)" | awk '{print int($2)}' || echo "0"`) | 34 | `top -bn1 2>/dev/null | grep "Cpu(s)" | awk '{print int($2)}' || echo "0"`) |
| 35 | 35 | ||
| 36 | (defpoll cpu-status :interval "1s" | 36 | (defpoll cpu-status :interval "1s" |
| 37 | - `bash ~/.config/scripts/cpu_status.sh`) | 37 | + `bash ~/.config/scripts/eww/cpu_status.sh`) |
| 38 | 38 | ||
| 39 | ;; Memory usage | 39 | ;; Memory usage |
| 40 | (defpoll mem-usage :interval "1s" | 40 | (defpoll mem-usage :interval "1s" |
| @@ -44,7 +44,7 @@ | |||
| 44 | `free -b 2>/dev/null | awk 'NR==2 {printf "%.1f", $2/1073741824}' || echo "0"`) | 44 | `free -b 2>/dev/null | awk 'NR==2 {printf "%.1f", $2/1073741824}' || echo "0"`) |
| 45 | 45 | ||
| 46 | (defpoll memory-status :interval "1s" | 46 | (defpoll memory-status :interval "1s" |
| 47 | - `bash ~/.config/scripts/memory_status.sh`) | 47 | + `bash ~/.config/scripts/eww/memory_status.sh`) |
| 48 | 48 | ||
| 49 | ;; Audio volume | 49 | ;; Audio volume |
| 50 | (defpoll volume :interval "500ms" | 50 | (defpoll volume :interval "500ms" |
| @@ -55,19 +55,19 @@ | |||
| 55 | 55 | ||
| 56 | ;; Volume info - includes song details for tooltip | 56 | ;; Volume info - includes song details for tooltip |
| 57 | (defpoll volume-info :interval "500ms" | 57 | (defpoll volume-info :interval "500ms" |
| 58 | - `bash ~/.config/scripts/volume_info.sh`) | 58 | + `bash ~/.config/scripts/eww/volume_info.sh`) |
| 59 | 59 | ||
| 60 | ;; DateTime info - shows date/time and system uptime for tooltip | 60 | ;; DateTime info - shows date/time and system uptime for tooltip |
| 61 | (defpoll datetime-info :interval "1s" | 61 | (defpoll datetime-info :interval "1s" |
| 62 | - `bash ~/.config/scripts/datetime_info.sh`) | 62 | + `bash ~/.config/scripts/eww/datetime_info.sh`) |
| 63 | 63 | ||
| 64 | ;; Network speed - shows current download/upload speeds for bar display | 64 | ;; Network speed - shows current download/upload speeds for bar display |
| 65 | (defpoll network-speed :interval "1s" | 65 | (defpoll network-speed :interval "1s" |
| 66 | - `bash ~/.config/scripts/network_speed.sh`) | 66 | + `bash ~/.config/scripts/eww/network_speed.sh`) |
| 67 | 67 | ||
| 68 | ;; Network status - shows network activity for tooltip | 68 | ;; Network status - shows network activity for tooltip |
| 69 | (defpoll network-status :interval "1s" | 69 | (defpoll network-status :interval "1s" |
| 70 | - `bash ~/.config/scripts/network_status.sh`) | 70 | + `bash ~/.config/scripts/eww/network_status.sh`) |
| 71 | 71 | ||
| 72 | ;; Battery | 72 | ;; Battery |
| 73 | (defpoll battery-capacity :interval "5s" | 73 | (defpoll battery-capacity :interval "5s" |
| @@ -78,7 +78,7 @@ | |||
| 78 | 78 | ||
| 79 | ;; Battery info - detailed tooltip | 79 | ;; Battery info - detailed tooltip |
| 80 | (defpoll battery-info :interval "5s" | 80 | (defpoll battery-info :interval "5s" |
| 81 | - `bash ~/.config/scripts/battery_info.sh`) | 81 | + `bash ~/.config/scripts/eww/battery_info.sh`) |
| 82 | 82 | ||
| 83 | ;; Active workspace | 83 | ;; Active workspace |
| 84 | (defpoll active-ws :interval "0ms" | 84 | (defpoll active-ws :interval "0ms" |
| @@ -97,7 +97,7 @@ | |||
| 97 | ;; Music widget - click to play/pause, right-click to show cover | 97 | ;; Music widget - click to play/pause, right-click to show cover |
| 98 | (defwidget music-widget [] | 98 | (defwidget music-widget [] |
| 99 | (eventbox :onclick "playerctl play-pause" | 99 | (eventbox :onclick "playerctl play-pause" |
| 100 | - :onrightclick "bash ~/.config/scripts/show_cover.sh" | 100 | + :onrightclick "bash ~/.config/scripts/shared/show_cover.sh" |
| 101 | :class "music-box" | 101 | :class "music-box" |
| 102 | (label :text music))) | 102 | (label :text music))) |
| 103 | 103 | ||
.config/hypr/hyprland.confmodified+2 -2
| @@ -43,7 +43,7 @@ $menu_unsafe = mullvad-exclude rofi -show drun -show-icons | |||
| 43 | $clipboard = cliphist list | rofi -dmenu -show-icons | cliphist decode | wl-copy | 43 | $clipboard = cliphist list | rofi -dmenu -show-icons | cliphist decode | wl-copy |
| 44 | $screenshot = grim "$HOME/Pictures/Screenshots/$(date '+%y%m%d_%H-%M-%S').png" | grim - | wl-copy | 44 | $screenshot = grim "$HOME/Pictures/Screenshots/$(date '+%y%m%d_%H-%M-%S').png" | grim - | wl-copy |
| 45 | $screenshot_with_area_selector = grim -g "$(slurp)" - | wl-copy | 45 | $screenshot_with_area_selector = grim -g "$(slurp)" - | wl-copy |
| 46 | -$power_menu = bash ~/.config/scripts/power_menu.sh | 46 | +$power_menu = bash ~/.config/scripts/system/power_menu.sh |
| 47 | $browser = flatpak run io.github.ungoogled_software.ungoogled_chromium --enable-features=MiddleClickAutoscroll | 47 | $browser = flatpak run io.github.ungoogled_software.ungoogled_chromium --enable-features=MiddleClickAutoscroll |
| 48 | $browser_unsafe = mullvad-exclude flatpak run com.brave.Browser --incognito --enable-features=MiddleClickAutoscroll | 48 | $browser_unsafe = mullvad-exclude flatpak run com.brave.Browser --incognito --enable-features=MiddleClickAutoscroll |
| 49 | $signal = flatpak run org.signal.Signal | 49 | $signal = flatpak run org.signal.Signal |
| @@ -104,7 +104,7 @@ bind = Alt, F4, killactive, | |||
| 104 | bind = Alt, 4, killactive, | 104 | bind = Alt, 4, killactive, |
| 105 | bind = $mainMod $my_trigger, F4, exit, | 105 | bind = $mainMod $my_trigger, F4, exit, |
| 106 | bind = $mainMod, H, exec, pkill -SIGUSR1 waybar | 106 | bind = $mainMod, H, exec, pkill -SIGUSR1 waybar |
| 107 | -# bind = $mainMod, H, exec, ~/.config/scripts/toggle_eww.sh | 107 | +# bind = $mainMod, H, exec, ~/.config/scripts/system/toggle_eww.sh |
| 108 | binds { | 108 | binds { |
| 109 | allow_workspace_cycles = true | 109 | allow_workspace_cycles = true |
| 110 | } | 110 | } |
.config/hypr/hyprlock.confmodified+1 -1
| @@ -56,7 +56,7 @@ input-field { | |||
| 56 | # Music info label - displays current playing song with duration from song_detail.sh script | 56 | # Music info label - displays current playing song with duration from song_detail.sh script |
| 57 | label { | 57 | label { |
| 58 | monitor = | 58 | monitor = |
| 59 | - text = cmd[update:1000] echo "$(~/.config/scripts/song_detail.sh)" | 59 | + text = cmd[update:1000] echo "$(~/.config/scripts/shared/song_detail.sh)" |
| 60 | color = rgba(180, 200, 215, 0.75) | 60 | color = rgba(180, 200, 215, 0.75) |
| 61 | font_size = 18 | 61 | font_size = 18 |
| 62 | font_family = JetBrains Mono Nerd, SF Pro Display Bold | 62 | font_family = JetBrains Mono Nerd, SF Pro Display Bold |
.config/scripts/battery_info.sh → .config/scripts/eww/battery_info.shrenamed+0 -0
.config/scripts/cpu_status.sh → .config/scripts/eww/cpu_status.shrenamed+0 -0
.config/scripts/datetime_info.sh → .config/scripts/eww/datetime_info.shrenamed+0 -0
.config/scripts/memory_status.sh → .config/scripts/eww/memory_status.shrenamed+0 -0
.config/scripts/network_speed.sh → .config/scripts/eww/network_speed.shrenamed+0 -0
.config/scripts/network_status.sh → .config/scripts/eww/network_status.shrenamed+0 -0
.config/scripts/privacy_status.sh → .config/scripts/eww/privacy_status.shrenamed+0 -0
.config/scripts/volume_info.sh → .config/scripts/eww/volume_info.shrenamed+0 -0
.config/scripts/show_cover.sh → .config/scripts/shared/show_cover.shrenamed+0 -0
.config/scripts/song_detail.sh → .config/scripts/shared/song_detail.shrenamed+0 -0
.config/scripts/power_menu.sh → .config/scripts/system/power_menu.shrenamed+0 -0
.config/scripts/toggle_eww.sh → .config/scripts/system/toggle_eww.shrenamed+0 -0
.config/scripts/waybar/camera_monitor.shadded+30 -0
| @@ -0,0 +1,30 @@ | |||
| 1 | +#!/bin/bash | ||
| 2 | + | ||
| 3 | +# Camera privacy monitor for waybar | ||
| 4 | +# Detects camera device access and shows app info in tooltip | ||
| 5 | + | ||
| 6 | +detect_camera() { | ||
| 7 | + if command -v lsof &> /dev/null; then | ||
| 8 | + if lsof /dev/video* 2>/dev/null | grep -qv "COMMAND"; then | ||
| 9 | + return 0 | ||
| 10 | + fi | ||
| 11 | + fi | ||
| 12 | + return 1 | ||
| 13 | +} | ||
| 14 | + | ||
| 15 | +get_camera_apps() { | ||
| 16 | + if command -v lsof &> /dev/null; then | ||
| 17 | + lsof /dev/video* 2>/dev/null | awk 'NR>1 {print $1}' | sort -u | paste -sd ', ' - | ||
| 18 | + fi | ||
| 19 | +} | ||
| 20 | + | ||
| 21 | +if detect_camera; then | ||
| 22 | + apps=$(get_camera_apps) | ||
| 23 | + if [ -n "$apps" ]; then | ||
| 24 | + # Output JSON with icon and tooltip containing app info | ||
| 25 | + tooltip_escaped=$(echo "$apps" | sed 's/"/\\"/g') | ||
| 26 | + echo "{\"text\": \"◉\", \"tooltip\": \"$tooltip_escaped\"}" | ||
| 27 | + else | ||
| 28 | + echo "{\"text\": \"◉\", \"tooltip\": \"Camera in use\"}" | ||
| 29 | + fi | ||
| 30 | +fi | ||
.config/waybar/configmodified+12 -4
| @@ -79,15 +79,23 @@ | |||
| 79 | 79 | ||
| 80 | "custom/music": { | 80 | "custom/music": { |
| 81 | "format": "{}", | 81 | "format": "{}", |
| 82 | - "exec": "bash ~/.config/scripts/song_detail.sh", | 82 | + "exec": "bash ~/.config/scripts/shared/song_detail.sh", |
| 83 | "exec-if": "playerctl status &> /dev/null", | 83 | "exec-if": "playerctl status &> /dev/null", |
| 84 | "interval": 1, | 84 | "interval": 1, |
| 85 | "on-click": "playerctl play-pause", | 85 | "on-click": "playerctl play-pause", |
| 86 | - "on-click-right": "bash ~/.config/scripts/show_cover.sh", | 86 | + "on-click-right": "bash ~/.config/scripts/shared/show_cover.sh", |
| 87 | "on-scroll-up": "wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+", | 87 | "on-scroll-up": "wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+", |
| 88 | "on-scroll-down": "wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-" | 88 | "on-scroll-down": "wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-" |
| 89 | }, | 89 | }, |
| 90 | 90 | ||
| 91 | + "custom/camera": { | ||
| 92 | + "format": "{text}", | ||
| 93 | + "exec": "bash ~/.config/scripts/waybar/camera_monitor.sh bar", | ||
| 94 | + "interval": 1, | ||
| 95 | + "return-type": "json", | ||
| 96 | + "tooltip": true | ||
| 97 | + }, | ||
| 98 | + | ||
| 91 | "wireplumber": { | 99 | "wireplumber": { |
| 92 | "format": "{icon} {volume}% ", | 100 | "format": "{icon} {volume}% ", |
| 93 | "on-click": "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle", | 101 | "on-click": "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle", |
| @@ -115,8 +123,7 @@ | |||
| 115 | "format": "{ifname}", | 123 | "format": "{ifname}", |
| 116 | "format-wifi": "{essid} ({signalStrength}%) ", | 124 | "format-wifi": "{essid} ({signalStrength}%) ", |
| 117 | "format-ethernet": "{ifname} ", | 125 | "format-ethernet": "{ifname} ", |
| 118 | - "format-disconnected": "", //An empty format will hide the module. | 126 | + "format-disconnected": "", |
| 119 | - "format-disconnected": "", | ||
| 120 | "tooltip-format": "{ifname}", | 127 | "tooltip-format": "{ifname}", |
| 121 | "tooltip-format-wifi": "{essid} ({signalStrength}%) ", | 128 | "tooltip-format-wifi": "{essid} ({signalStrength}%) ", |
| 122 | "tooltip-format-ethernet": "{ifname} ", | 129 | "tooltip-format-ethernet": "{ifname} ", |
| @@ -137,6 +144,7 @@ | |||
| 137 | "format": "{:%H:%M:%S | %A, %B %d, %Y }", | 144 | "format": "{:%H:%M:%S | %A, %B %d, %Y }", |
| 138 | "format-alt": "{:%H:%M:%S}", | 145 | "format-alt": "{:%H:%M:%S}", |
| 139 | "tooltip-format": "<tt><small>{calendar}</small></tt>", | 146 | "tooltip-format": "<tt><small>{calendar}</small></tt>", |
| 147 | + "on-click-right": "gnome-calendar", | ||
| 140 | "calendar": { | 148 | "calendar": { |
| 141 | "format": { | 149 | "format": { |
| 142 | "months": "<span color='#ffead3'><b>{}</b></span>", | 150 | "months": "<span color='#ffead3'><b>{}</b></span>", |
.config/waybar/style.cssmodified+10 -0
| @@ -44,3 +44,13 @@ | |||
| 44 | padding: 0; | 44 | padding: 0; |
| 45 | box-shadow: none; | 45 | box-shadow: none; |
| 46 | } | 46 | } |
| 47 | + | ||
| 48 | +#custom-camera { | ||
| 49 | + color: #ffffff; | ||
| 50 | + margin: 0; | ||
| 51 | + background-color: transparent; | ||
| 52 | + border: none; | ||
| 53 | + padding: 0; | ||
| 54 | + box-shadow: none; | ||
| 55 | + font-size: 16px; | ||
| 56 | +} | ||