diff --git a/.config/bottom/bottom.toml b/.config/bottom/bottom.toml deleted file mode 100644 index 34d5784..0000000 --- a/.config/bottom/bottom.toml +++ /dev/null @@ -1,317 +0,0 @@ -# This is a default config file for bottom. All of the settings are commented -# out by default; if you wish to change them uncomment and modify as you see -# fit. - -# This group of options represents a command-line option. Flags explicitly -# added when running (ie: btm -a) will override this config file if an option -# is also set here. -[flags] -# Whether to hide the average cpu entry. -#hide_avg_cpu = false - -# Whether to use a dedicated row for the average cpu entry -#average_cpu_row = false - -# Whether to use dot markers rather than braille. -#dot_marker = false - -# The update rate of the application. -rate = "250ms" - -# Whether to put the CPU legend to the left. -#cpu_left_legend = false - -# Whether to set CPU% on a process to be based on the total CPU or just current usage. -#current_usage = false - -# Whether to set CPU% on a process to be based on the total CPU or per-core CPU% (not divided by the number of cpus). -#unnormalized_cpu = false - -# Whether to group processes with the same name together by default. Doesn't do anything -# if tree is set to true or --tree is set. -group_processes = true - -# Whether to make process searching case sensitive by default. -#case_sensitive = false - -# Whether to make process searching look for matching the entire word by default. -#whole_word = false - -# Whether to make process searching use regex by default. -#regex = false - -# The temperature unit. One of the following, defaults to "c" for Celsius: -#temperature_type = "c" -##temperature_type = "k" -##temperature_type = "f" -##temperature_type = "kelvin" -##temperature_type = "fahrenheit" -##temperature_type = "celsius" - -# The default time interval (in milliseconds). -#default_time_value = "60s" - -# The time delta on each zoom in/out action (in milliseconds). -#time_delta = 15000 - -# Hides the time scale. -#hide_time = false - -# Override layout default widget -#default_widget_type = "proc" -#default_widget_count = 1 - -# Expand selected widget upon starting the app -#expanded = true - -# Use basic mode -#basic = false - -# Use the old network legend style -#use_old_network_legend = false - -# Remove space in tables -#hide_table_gap = false - -# Show the battery widgets -#battery = false - -# Disable mouse clicks -#disable_click = false - -# Disable keyboard shortcuts -#disable_keys = false - -# Show memory values in the processes widget as values by default -#process_memory_as_value = false - -# Show tree mode by default in the processes widget. -#tree = false - -# Shows an indicator in table widgets tracking where in the list you are. -#show_table_scroll_position = false - -# Show processes as their commands by default in the process widget. -#process_command = false - -# Displays the network widget with binary prefixes. -#network_use_binary_prefix = false - -# Displays the network widget using bytes. -#network_use_bytes = false - -# Displays the network widget with a log scale. -#network_use_log = false - -# Hides advanced options to stop a process on Unix-like systems. -#disable_advanced_kill = false - -# Prevents performing any actions that affect the system (e.g. stopping processes). -#read_only = false - -# Hides the kernel threads -#hide_k_threads = false - -# Hide GPU(s) information -#disable_gpu = false - -# Shows cache and buffer memory -enable_cache_memory = true - -# Subtract freeable ARC from memory usage -#free_arc = false - -# How much data is stored at once in terms of time. -#retention = "10m" - -# Where to place the legend for the memory widget. One of "none", "top-left", "top", "top-right", "left", "right", "bottom-left", "bottom", "bottom-right". -#memory_legend = "top-right" - -# Where to place the legend for the network widget. One of "none", "top-left", "top", "top-right", "left", "right", "bottom-left", "bottom", "bottom-right". -#network_legend = "top-right" - - -# Processes widget configuration -[processes] -# The columns shown by the process widget. The following columns are supported (the GPU columns are only available if the GPU feature is enabled when built): -# PID, Name, CPU%, Mem%, R/s, W/s, T.Read, T.Write, User, State, Time, GMem%, GPU%, Nice, Priority -columns = ["PID", "Name", "CPU%", "Mem%", "GMem%", "GPU%", "User", "State"] - -# Gather process child thread information -#get_threads = false - - -# CPU widget configuration -#[cpu] -# One of "all" (default), "average"/"avg" -#default = "average" - - -# Disk widget configuration -#[disk] -# The columns shown by the process widget. The following columns are supported: -# Disk, Mount, Used, Free, Total, Used%, Free%, R/s, W/s -#columns = ["Disk", "Mount", "Used", "Free", "Total", "Used%", "R/s", "W/s"] - -# By default, there are no disk name filters enabled. These can be turned on to filter out specific data entries if you -# don't want to see them. An example use case is provided below. -#[disk.name_filter] -# Whether to ignore any matches. Defaults to true. -#is_list_ignored = true - -# A list of filters to try and match. -#list = ["/dev/sda\\d+", "/dev/nvme0n1p2"] - -# Whether to use regex. Defaults to false. -#regex = true - -# Whether to be case-sensitive. Defaults to false. -#case_sensitive = false - -# Whether to be require matching the whole word. Defaults to false. -#whole_word = false - -# By default, there are no mount name filters enabled. An example use case is provided below. -#[disk.mount_filter] -# Whether to ignore any matches. Defaults to true. -#is_list_ignored = true - -# A list of filters to try and match. -#list = ["/mnt/.*", "/boot"] - -# Whether to use regex. Defaults to false. -#regex = true - -# Whether to be case-sensitive. Defaults to false. -#case_sensitive = false - -# Whether to be require matching the whole word. Defaults to false. -#whole_word = false - - -# Temperature widget configuration -#[temperature] -# By default, there are no temperature sensor filters enabled. An example use case is provided below. -#[temperature.sensor_filter] -# Whether to ignore any matches. Defaults to true. -#is_list_ignored = true - -# A list of filters to try and match. -#list = ["cpu", "wifi"] - -# Whether to use regex. Defaults to false. -#regex = false - -# Whether to be case-sensitive. Defaults to false. -#case_sensitive = false - -# Whether to be require matching the whole word. Defaults to false. -#whole_word = false - - -# Network widget configuration -#[network] -# By default, there are no network interface filters enabled. An example use case is provided below. -#[network.interface_filter] -# Whether to ignore any matches. Defaults to true. -#is_list_ignored = true - -# A list of filters to try and match. -#list = ["virbr0.*"] - -# Whether to use regex. Defaults to false. -#regex = true - -# Whether to be case-sensitive. Defaults to false. -#case_sensitive = false - -# Whether to be require matching the whole word. Defaults to false. -#whole_word = false - - -# These are all the components that support custom theming. Note that colour support -# will depend on terminal support. -[styles] -# Built-in themes. Valid values are: -# - "default" -# - "default-light" -# - "gruvbox" -# - "gruvbox-light" -# - "nord" -# - "nord-light". -# -# This will have the lowest precedence if a custom colour palette is set, -# or overridden if the command-line flag for a built-in theme is set. -theme = "gruvbox" - -#[styles.cpu] -#all_entry_color = "green" -#avg_entry_color = "red" -#cpu_core_colors = ["light magenta", "light yellow", "light cyan", "light green", "light blue", "cyan", "green", "blue"] - -#[styles.memory] -#ram_color = "light magenta" -#cache_color = "light red" -#swap_color = "light yellow" -#arc_color = "light cyan" -#gpu_colors = ["light blue", "light red", "cyan", "green", "blue", "red"] - -#[styles.network] -#rx_color = "light magenta" -#tx_color = "light yellow" -#rx_total_color = "light cyan" -#tx_total_color = "light green" - -#[styles.battery] -#high_battery_color = "green" -#medium_battery_color = "yellow" -#low_battery_color = "red" - -#[styles.tables] -#headers = {color = "light blue", bold = true} - -#[styles.graphs] -#graph_color = "gray" -#legend_text = {color = "gray"} - -#[styles.widgets] -#border_color = "gray" -#selected_border_color = "light blue" -#widget_title = {color = "gray"} -#text = {color = "gray"} -#selected_text = {color = "black", bg_color = "light blue"} -#disabled_text = {color = "dark gray"} - -# Only on Linux -#thread_text = {color = "green"} - -# Layout - layouts follow a pattern like this: -# [[row]] represents a row in the application. -# [[row.child]] represents either a widget or a column. -# [[row.child.child]] represents a widget. -# -# All widgets must have the type value set to one of ["cpu", "mem", "proc", "net", "temp", "disk", "empty"]. -# All layout components have a ratio value - if this is not set, then it defaults to 1. -# The default widget layout: -#[[row]] -# ratio=30 -# [[row.child]] -# type="cpu" -#[[row]] -# ratio=40 -# [[row.child]] -# ratio=4 -# type="mem" -# [[row.child]] -# ratio=3 -# [[row.child.child]] -# type="temp" -# [[row.child.child]] -# type="disk" -#[[row]] -# ratio=30 -# [[row.child]] -# type="net" -# [[row.child]] -# type="proc" -# default=true diff --git a/.config/environment.d/10-qt-theme.conf b/.config/environment.d/10-qt-theme.conf index 791a3f0..05cf856 100644 --- a/.config/environment.d/10-qt-theme.conf +++ b/.config/environment.d/10-qt-theme.conf @@ -2,5 +2,9 @@ # NOT children of the compositor (XDG-autostart units, D-Bus activation). # The compositor env blocks (niri config.kdl / hyprland.conf) only cover # processes spawned by the compositor itself, which is why kdeconnectd came up -# with the default Qt palette instead of the wallust-tinted GTK3 one. -QT_QPA_PLATFORMTHEME=gtk3 +# with the default Qt palette instead of the wallust one. +# +# "qt6ct" is a key of both platform theme plugins (Fedora's qt5ct plugin lists +# qt5ct and qt6ct), so Qt5 and Qt6 apps both load their wallust palette from +# ~/.config/qt{5,6}ct/, which wallust generates. +QT_QPA_PLATFORMTHEME=qt6ct diff --git a/.config/eww/eww.css b/.config/eww/eww.css deleted file mode 100644 index 2e3e837..0000000 --- a/.config/eww/eww.css +++ /dev/null @@ -1,194 +0,0 @@ -* { - all: unset; - font-family: "FontAwesome", "Roboto", "Helvetica", "Arial", sans-serif; - font-size: 14px; -} - -tooltip { - background-color: #1a1a1a; - color: #ffffff; - border: 1px solid #444444; - border-radius: 6px; - padding: 10px 15px; - font-size: 12px; - font-family: "Monospace", "Courier New", monospace; - margin: 4px; -} - -tooltip label { - background-color: transparent; - color: #ffffff; - padding: 0px; - margin: 0px; -} - -.bar { - background-color: #000000; - color: #ffffff; - padding: 4px 12px; - border-radius: 0px; - border: none; - outline: none; -} - -/* Workspaces */ -.workspaces { - margin: 0px; - padding: 0px; -} - -.workspace-item { - min-width: 20px; - color: #666666; - padding: 0px; - margin: 0px 8px; -} - -.workspace-item.active { - color: #ffffff; -} - -.workspace-item.active:hover { - color: #cccccc; -} - -/* Music */ -.music-box { - color: #ffffff; - margin: 0px 8px; - padding: 0px; -} - -.music-box:hover { - color: #888888; -} - -/* Clock */ -.clock { - color: #ffffff; - padding: 0px; - margin: 0px 16px; -} - -.clock:hover { - color: #888888; -} - -.clock label { - margin: 0px; - padding: 0px; -} - -/* Privacy */ -.privacy { - color: #ffffff; - font-size: 18px; - margin: 0px 4px; - padding: 0px; -} - -.privacy:hover { - color: #666666; -} - -/* CPU */ -.cpu { - color: #ffffff; - margin: 0px 4px; - padding: 0px; -} - -.cpu:hover { - color: #777777; -} - -/* Memory */ -.memory { - color: #ffffff; - margin: 0px 4px; - padding: 0px; -} - -.memory:hover { - color: #777777; -} - -/* Network */ -.network { - color: #ffffff; - margin: 0px 4px; - padding: 0px; -} - -.network:hover { - color: #777777; -} - -/* Volume */ -.volume { - color: #ffffff; - padding: 0px; - margin: 0px 4px; -} - -.volume:hover { - color: #777777; -} - -.volume.muted { - color: #888888; - opacity: 0.8; - margin: 0px 4px; -} - -.volume.muted:hover { - color: #555555; - opacity: 0.6; -} - -/* Tray */ -.tray { - padding: 0px; - margin: 0px 4px; -} - -/* Battery */ -.battery { - color: #ffffff; - padding: 0px; - margin: 0px 4px; -} - -.battery.charging { - color: #ffffff; -} - -.battery.charging:hover { - color: #777777; -} - -.battery.discharging { - color: #ffffff; -} - -.battery.discharging:hover { - color: #777777; -} - -.battery.full { - color: #ffffff; -} - -.battery.full:hover { - color: #777777; -} - -/* Separators */ -.separator { - color: #444444; - margin: 0px 4px; - padding: 0px; - font-size: 12px; -} - -/* Buttons */ diff --git a/.config/eww/eww.yuck b/.config/eww/eww.yuck deleted file mode 100644 index d06900c..0000000 --- a/.config/eww/eww.yuck +++ /dev/null @@ -1,266 +0,0 @@ -;; Eww configuration - Bar matching waybar setup -;; Using proper tooltip widget for tooltip display - -;; ============================================================================ -;; Variables and Polls -;; ============================================================================ - -(defpoll time :interval "1s" - `date '+%H:%M:%S'`) - -(defpoll date :interval "1s" - `date '+%A, %B %d, %Y'`) - -(defvar time-format-full true) - -(defvar byte_transform 1073741824) - -;; Music/Player info - single-source file maintained by song_detail_writer.sh -(defpoll music :interval "1s" - `cat /tmp/song_detail_last 2>/dev/null`) - -(defpoll music-status :interval "1s" - `playerctl status 2>/dev/null || echo "Stopped"`) - -;; Privacy status - monitors screen sharing, audio input/output -(defpoll privacy :interval "1s" - `bash ~/.config/scripts/eww/privacy_status.sh status`) - -(defpoll privacy-details :interval "1s" - `bash ~/.config/scripts/eww/privacy_status.sh details`) - -;; CPU usage -(defpoll cpu-usage :interval "1s" - `top -bn1 2>/dev/null | grep "Cpu(s)" | awk '{print int($2)}' || echo "0"`) - -(defpoll cpu-status :interval "1s" - `bash ~/.config/scripts/eww/cpu_status.sh`) - -;; Memory usage -(defpoll mem-usage :interval "1s" - `free -b 2>/dev/null | awk 'NR==2 {printf "%.1f", $3/1073741824}' || echo "0"`) - -(defpoll mem-total :interval "1s" - `free -b 2>/dev/null | awk 'NR==2 {printf "%.1f", $2/1073741824}' || echo "0"`) - -(defpoll memory-status :interval "1s" - `bash ~/.config/scripts/eww/memory_status.sh`) - -;; Audio volume -(defpoll volume :interval "500ms" - `wpctl get-volume @DEFAULT_AUDIO_SINK@ 2>/dev/null | awk '{printf "%.0f", $2*100}' || echo "0"`) - -(defpoll volume-muted :interval "500ms" - `wpctl get-volume @DEFAULT_AUDIO_SINK@ 2>/dev/null | grep -q MUTED && echo "true" || echo "false"`) - -;; Volume info - includes song details for tooltip -(defpoll volume-info :interval "500ms" - `bash ~/.config/scripts/eww/volume_info.sh`) - -;; DateTime info - shows date/time and system uptime for tooltip -(defpoll datetime-info :interval "1s" - `bash ~/.config/scripts/eww/datetime_info.sh`) - -;; Network speed - shows current download/upload speeds for bar display -(defpoll network-speed :interval "1s" - `bash ~/.config/scripts/eww/network_speed.sh`) - -;; Network status - shows network activity for tooltip -(defpoll network-status :interval "1s" - `bash ~/.config/scripts/eww/network_status.sh`) - -;; Battery -(defpoll battery-capacity :interval "5s" - `cat /sys/class/power_supply/BAT*/capacity 2>/dev/null | head -1 || echo "N/A"`) - -(defpoll battery-status :interval "5s" - `cat /sys/class/power_supply/BAT*/status 2>/dev/null | head -1 || echo "N/A"`) - -;; Battery info - detailed tooltip -(defpoll battery-info :interval "5s" - `bash ~/.config/scripts/eww/battery_info.sh`) - -;; Active workspace -(defpoll active-ws :interval "0ms" - `hyprctl activeworkspace -j 2>/dev/null | jq -r '.id' || echo "1"`) - -;; ============================================================================ -;; Widgets -;; ============================================================================ - -;; Workspace display (show only active) -(defwidget workspaces-widget [] - (eventbox - (label :class "workspace-item active" - :text active-ws))) - -;; Music widget - click to play/pause, right-click to show cover -(defwidget music-widget [] - (eventbox :onclick "bash ~/.config/scripts/shared/playerctl_active.sh play-pause" - :onrightclick "bash ~/.config/scripts/shared/show_cover.sh" - :class "music-box" - (label :text music))) - -;; Clock widget - left-click to toggle format, right-click to open calendar -(defwidget clock-widget [] - (tooltip - (label :text datetime-info - :class "tooltip-text") - (eventbox :onclick "eww update time-format-full=${time-format-full == "true" ? "false" : "true"}" - :onrightclick "gnome-calendar 2>/dev/null || zenity --calendar 2>/dev/null || notify-send 'Calendar' '${date}'" - :class "clock" - (label :text {time-format-full == "true" ? "${time} | ${date}" : time})))) - -;; Privacy widget - shows indicators only when active -(defwidget privacy-widget [] - (box :visible {privacy != ""} - :space-evenly false - :spacing 4 - (tooltip - (label :text privacy-details - :class "tooltip-text") - (eventbox - (label :class "privacy" - :text privacy))))) - -;; CPU widget -(defwidget cpu-widget [] - (tooltip - (label :text cpu-status - :class "tooltip-text") - (eventbox - (label :class "cpu" - :text "⚙ ${cpu-usage}%")))) - -;; Memory widget - horizontal bars indicator (thin) -(defwidget memory-widget [] - (tooltip - (label :text memory-status - :class "tooltip-text") - (eventbox - (label :class "memory" - :text {mem-usage < 5 ? "▁ ${mem-usage}" : - mem-usage < 10 ? "▂ ${mem-usage}" : - mem-usage < 15 ? "▃ ${mem-usage}" : - mem-usage < 20 ? "▄ ${mem-usage}" : - mem-usage < 25 ? "▅ ${mem-usage}" : - mem-usage < 30 ? "▆ ${mem-usage}" : - mem-usage < 40 ? "▆ ${mem-usage}" : - mem-usage < 50 ? "▇ ${mem-usage}" : - mem-usage < 60 ? "▇ ${mem-usage}" : - mem-usage < 70 ? "▇ ${mem-usage}" : - mem-usage < 80 ? "█ ${mem-usage}" : - mem-usage < 90 ? "█ ${mem-usage}" : - "█ ${mem-usage}"})))) - -;; Network widget -(defwidget network-widget [] - (tooltip - (label :text network-status - :class "tooltip-text") - (eventbox - (label :class "network" - :text network-speed)))) - -;; Volume widget - sine wave icon -(defwidget volume-widget [] - (tooltip - (label :text volume-info - :class "tooltip-text") - (eventbox :onclick "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle" - :onrightclick "pavucontrol &" - :class {volume-muted == "true" ? "volume muted" : "volume"} - (label :text {volume-muted == "true" ? - "✕ ${volume}%" : - "∿ ${volume}%"})))) - -;; Battery widget - only shows if battery exists -(defwidget battery-widget [] - (box :visible {battery-capacity != "N/A"} - :space-evenly false - (tooltip - (label :text battery-info - :class "tooltip-text") - (eventbox - (label :class {battery-status == "Charging" ? "battery charging" : - battery-status == "Discharging" ? "battery discharging" : - battery-status == "Full" ? "battery full" : - "battery"} - :text {battery-capacity < 10 ? "▁ ${battery-capacity}%" : - battery-capacity < 25 ? "▂ ${battery-capacity}%" : - battery-capacity < 50 ? "▃ ${battery-capacity}%" : - battery-capacity < 75 ? "▄ ${battery-capacity}%" : - "▅ ${battery-capacity}%"}))))) - -;; System tray -(defwidget tray-widget [] - (box :orientation "h" - :space-evenly false - :spacing 5 - :class "tray" - (systray :icon-size 20 - :space-evenly false - :spacing 5))) - -;; ============================================================================ -;; Main Bar Layout -;; ============================================================================ - -(defwidget bar [] - (box :orientation "h" - :class "bar" - :spacing 16 - :space-evenly false - :valign "center" - :height 30 - - ;; Left: Workspaces and Music - (box :orientation "h" - :space-evenly false - :spacing 20 - (workspaces-widget) - (music-widget)) - - ;; Center: Clock (expanded) - (box :orientation "h" - :hexpand true - :halign "center" - (clock-widget)) - - ;; Right: Status and controls - (box :orientation "h" - :space-evenly false - :spacing 12 - ;; Privacy indicators - (privacy-widget) - - ;; Stats grouped with proper spacing - (box :orientation "h" - :space-evenly false - :spacing 12 - (cpu-widget) - (memory-widget) - (network-widget) - (volume-widget) - (battery-widget)) - - ;; System tray - (tray-widget)))) - -;; ============================================================================ -;; Main Window -;; ============================================================================ - -(defwindow main - :monitor 0 - :geometry (geometry :x "0px" - :y "0px" - :width "99.9%" - :height "34px" - :anchor "top center") - :exclusive true - :stacking "fg" - :reserve (struts :distance "40px" :side "top") - :windowtype "dock" - :wm-ignore true - (bar)) diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf index 98c2dde..ce82d79 100644 --- a/.config/hypr/hyprland.conf +++ b/.config/hypr/hyprland.conf @@ -17,7 +17,7 @@ exec-once = sleep 3 && wl-paste --type image --watch cliphist store exec-once = sleep 4 && rfkill unblock bluetooth && bluetoothctl power on exec-once = sudo /usr/local/bin/asus-receiver-rebind -env = QT_QPA_PLATFORMTHEME,gtk3 +env = QT_QPA_PLATFORMTHEME,qt6ct env = XCURSOR_SIZE,24 env = HYPRCURSOR_SIZE,24 env = PATH, $HOME/.cargo/bin/:$HOME/.local/bin/:$PATH diff --git a/.config/niri/config.kdl b/.config/niri/config.kdl index f655cff..e0cf024 100644 --- a/.config/niri/config.kdl +++ b/.config/niri/config.kdl @@ -87,7 +87,7 @@ layout { } environment { - QT_QPA_PLATFORMTHEME "gtk3" + QT_QPA_PLATFORMTHEME "qt6ct" XCURSOR_SIZE "24" } diff --git a/.config/nvim/lua/plugins/mason-lspconfig.lua b/.config/nvim/lua/plugins/mason-lspconfig.lua index 7fbf3ba..941d758 100644 --- a/.config/nvim/lua/plugins/mason-lspconfig.lua +++ b/.config/nvim/lua/plugins/mason-lspconfig.lua @@ -1,7 +1,8 @@ return { - "williamboman/mason-lspconfig.nvim", + "mason-org/mason-lspconfig.nvim", + version = "^1.0.0", + dependencies = { "mason-org/mason.nvim" }, config = function() - require("mason").setup() require("mason-lspconfig").setup({ ensure_installed = { "lua_ls", diff --git a/.config/nvim/lua/plugins/mason-workaround.lua b/.config/nvim/lua/plugins/mason-workaround.lua deleted file mode 100644 index 554f251..0000000 --- a/.config/nvim/lua/plugins/mason-workaround.lua +++ /dev/null @@ -1,4 +0,0 @@ -return { - { "mason-org/mason.nvim", version = "^1.0.0" }, - { "mason-org/mason-lspconfig.nvim", version = "^1.0.0" }, -} diff --git a/.config/nvim/lua/plugins/mason.lua b/.config/nvim/lua/plugins/mason.lua index 55f207b..6f82243 100644 --- a/.config/nvim/lua/plugins/mason.lua +++ b/.config/nvim/lua/plugins/mason.lua @@ -1,5 +1,6 @@ return { - "williamboman/mason.nvim", + "mason-org/mason.nvim", + version = "^1.0.0", config = function() require("mason").setup() end, diff --git a/.config/scripts/eww/battery_info.sh b/.config/scripts/eww/battery_info.sh deleted file mode 100755 index 69cd363..0000000 --- a/.config/scripts/eww/battery_info.sh +++ /dev/null @@ -1,87 +0,0 @@ -#!/bin/bash - -# Battery Information Script -# Displays detailed battery status and health information from real hardware - -BATTERY_DIR=$(ls -d /sys/class/power_supply/BAT* 2>/dev/null | head -1) - -if [ -z "$BATTERY_DIR" ]; then - echo "Battery Details" - echo "===============" - echo "" - echo "No battery detected" - exit 1 -fi - -# Read battery information -CAPACITY=$(cat "$BATTERY_DIR/capacity" 2>/dev/null || echo "N/A") -STATUS=$(cat "$BATTERY_DIR/status" 2>/dev/null || echo "N/A") -HEALTH=$(cat "$BATTERY_DIR/health" 2>/dev/null || echo "N/A") -TECHNOLOGY=$(cat "$BATTERY_DIR/technology" 2>/dev/null || echo "N/A") -CYCLE_COUNT=$(cat "$BATTERY_DIR/cycle_count" 2>/dev/null || echo "N/A") - -CURRENT=$(cat "$BATTERY_DIR/current_now" 2>/dev/null || echo "0") -VOLTAGE=$(cat "$BATTERY_DIR/voltage_now" 2>/dev/null || echo "0") -POWER=$(cat "$BATTERY_DIR/power_now" 2>/dev/null || echo "0") -ENERGY_FULL=$(cat "$BATTERY_DIR/energy_full" 2>/dev/null || echo "0") -ENERGY_NOW=$(cat "$BATTERY_DIR/energy_now" 2>/dev/null || echo "0") -TEMP=$(cat "$BATTERY_DIR/temp" 2>/dev/null || echo "0") - -# Format output -echo "Battery Details" -echo "===============" -echo "" -echo "Capacity: ${CAPACITY}%" -echo "Status: $STATUS" -echo "Health: $HEALTH" -echo "Technology: $TECHNOLOGY" -echo "" - -# Convert and display electrical info -if [ "$VOLTAGE" != "0" ]; then - VOLTAGE_V=$(echo "scale=2; $VOLTAGE / 1000000" | bc 2>/dev/null) - echo "Voltage: ${VOLTAGE_V}V" -fi - -if [ "$CURRENT" != "0" ]; then - CURRENT_MA=$((CURRENT / 1000)) - echo "Current: ${CURRENT_MA}mA" -fi - -if [ "$POWER" != "0" ]; then - POWER_W=$(echo "scale=2; $POWER / 1000000" | bc 2>/dev/null) - echo "Power: ${POWER_W}W" -fi - -if [ "$TEMP" != "0" ]; then - TEMP_C=$(echo "scale=1; $TEMP / 10" | bc 2>/dev/null) - echo "Temperature: ${TEMP_C}°C" -fi - -echo "" -echo "Cycle Count: $CYCLE_COUNT" - -# Display energy info -if [ "$ENERGY_FULL" != "0" ]; then - ENERGY_FULL_WH=$(echo "scale=1; $ENERGY_FULL / 1000000" | bc 2>/dev/null) - ENERGY_NOW_WH=$(echo "scale=1; $ENERGY_NOW / 1000000" | bc 2>/dev/null) - echo "Energy Full: ${ENERGY_FULL_WH}Wh" - echo "Energy Now: ${ENERGY_NOW_WH}Wh" -fi - -# Estimate time to full/empty -if [ "$POWER" != "0" ] && [ "$POWER" != "0" ]; then - if [ "$STATUS" = "Discharging" ]; then - TIME_REMAINING=$((ENERGY_NOW / (POWER / 1000000))) - HOURS=$((TIME_REMAINING / 3600)) - MINUTES=$(((TIME_REMAINING % 3600) / 60)) - echo "" - echo "Time to Empty: ${HOURS}h ${MINUTES}m" - elif [ "$STATUS" = "Charging" ]; then - TIME_REMAINING=$(( (ENERGY_FULL - ENERGY_NOW) / (POWER / 1000000))) - HOURS=$((TIME_REMAINING / 3600)) - MINUTES=$(((TIME_REMAINING % 3600) / 60)) - echo "" - echo "Time to Full: ${HOURS}h ${MINUTES}m" - fi -fi diff --git a/.config/scripts/eww/cpu_status.sh b/.config/scripts/eww/cpu_status.sh deleted file mode 100755 index ccaa454..0000000 --- a/.config/scripts/eww/cpu_status.sh +++ /dev/null @@ -1,210 +0,0 @@ -#!/bin/bash - -# CPU Status - Shows per-core usage, overall usage history, and temperature history with persistent peak tracking - -HISTORY_FILE="/tmp/cpu_history.txt" -TEMP_HISTORY_FILE="/tmp/cpu_temp_history.txt" -CPU_PEAK_FILE="/tmp/cpu_peak.txt" -CPU_PEAK_TIMESTAMP_FILE="/tmp/cpu_peak_timestamp.txt" -TEMP_PEAK_FILE="/tmp/cpu_temp_peak.txt" -TEMP_PEAK_TIMESTAMP_FILE="/tmp/cpu_temp_peak_timestamp.txt" -LAST_UPDATE_FILE="/tmp/cpu_status_last_update.txt" -MAX_HISTORY=20 -UPDATE_INTERVAL=1000 # milliseconds - -cores=$(nproc) - -# Function to read CPU stats from /proc/stat -read_cpu_stats() { - grep "^cpu" /proc/stat | grep -v "^cpu " | head -n $(nproc) -} - -# Function to calculate usage from stats -calculate_usage() { - local prev_line="$1" - local curr_line="$2" - - read -r prev_cpu prev_user prev_nice prev_system prev_idle prev_iowait prev_irq prev_softirq <<< "$prev_line" - read -r curr_cpu curr_user curr_nice curr_system curr_idle curr_iowait curr_irq curr_softirq <<< "$curr_line" - - local user_diff=$((curr_user - prev_user)) - local nice_diff=$((curr_nice - prev_nice)) - local system_diff=$((curr_system - prev_system)) - local idle_diff=$((curr_idle - prev_idle)) - - local total_diff=$((user_diff + nice_diff + system_diff + idle_diff)) - local used_diff=$((user_diff + nice_diff + system_diff)) - - if [ $total_diff -gt 0 ]; then - echo $((used_diff * 100 / total_diff)) - else - echo 0 - fi -} - -# Check if we should update history (only once every 1s) -current_time_ms=$(date +%s%3N 2>/dev/null || echo $(($(date +%s) * 1000))) -last_update=$(cat "$LAST_UPDATE_FILE" 2>/dev/null || echo 0) -time_diff=$((current_time_ms - last_update)) - -should_update=0 -if [ $time_diff -ge $UPDATE_INTERVAL ]; then - should_update=1 - echo "$current_time_ms" > "$LAST_UPDATE_FILE" -fi - -# Sample CPU stats twice with delay -mapfile -t stats_before < <(read_cpu_stats) -sleep 0.1 -mapfile -t stats_after < <(read_cpu_stats) - -# Get overall CPU usage -cpu_overall=$(top -bn1 2>/dev/null | grep "Cpu(s)" | awk '{print $2}' | cut -d'%' -f1) -cpu_overall_int=${cpu_overall%.*} - -# Only update history if interval has passed -if [ $should_update -eq 1 ]; then - # Get current timestamp - current_time=$(date '+%H:%M:%S') - - # Add to CPU usage history - echo "$cpu_overall_int" >> "$HISTORY_FILE" - tail -n $MAX_HISTORY "$HISTORY_FILE" > "${HISTORY_FILE}.tmp" - mv "${HISTORY_FILE}.tmp" "$HISTORY_FILE" - - # Get CPU temperature from hwmon2 (Tctl) - cpu_temp=0 - if [ -f "/sys/class/hwmon/hwmon2/temp1_input" ]; then - temp_raw=$(cat /sys/class/hwmon/hwmon2/temp1_input 2>/dev/null) - cpu_temp=$((temp_raw / 1000)) - fi - - # Add to temperature history - echo "$cpu_temp" >> "$TEMP_HISTORY_FILE" - tail -n $MAX_HISTORY "$TEMP_HISTORY_FILE" > "${TEMP_HISTORY_FILE}.tmp" - mv "${TEMP_HISTORY_FILE}.tmp" "$TEMP_HISTORY_FILE" - - # Initialize or read persistent CPU peak - if [ ! -f "$CPU_PEAK_FILE" ]; then - echo "$cpu_overall_int" > "$CPU_PEAK_FILE" - echo "$current_time" > "$CPU_PEAK_TIMESTAMP_FILE" - fi - - persistent_cpu_peak=$(cat "$CPU_PEAK_FILE" 2>/dev/null || echo "$cpu_overall_int") - persistent_cpu_peak_time=$(cat "$CPU_PEAK_TIMESTAMP_FILE" 2>/dev/null || echo "$current_time") - - # Update persistent CPU peak if current usage exceeds it - if [ "$cpu_overall_int" -gt "$persistent_cpu_peak" ]; then - persistent_cpu_peak=$cpu_overall_int - persistent_cpu_peak_time=$current_time - echo "$persistent_cpu_peak" > "$CPU_PEAK_FILE" - echo "$persistent_cpu_peak_time" > "$CPU_PEAK_TIMESTAMP_FILE" - fi - - # Initialize or read persistent temperature peak - if [ ! -f "$TEMP_PEAK_FILE" ]; then - echo "$cpu_temp" > "$TEMP_PEAK_FILE" - echo "$current_time" > "$TEMP_PEAK_TIMESTAMP_FILE" - fi - - persistent_temp_peak=$(cat "$TEMP_PEAK_FILE" 2>/dev/null || echo "$cpu_temp") - persistent_temp_peak_time=$(cat "$TEMP_PEAK_TIMESTAMP_FILE" 2>/dev/null || echo "$current_time") - - # Update persistent temperature peak if current temp exceeds it - if [ "$cpu_temp" -gt "$persistent_temp_peak" ]; then - persistent_temp_peak=$cpu_temp - persistent_temp_peak_time=$current_time - echo "$persistent_temp_peak" > "$TEMP_PEAK_FILE" - echo "$persistent_temp_peak_time" > "$TEMP_PEAK_TIMESTAMP_FILE" - fi -else - # If not updating, just read the current peaks for display - cpu_temp=0 - if [ -f "/sys/class/hwmon/hwmon2/temp1_input" ]; then - temp_raw=$(cat /sys/class/hwmon/hwmon2/temp1_input 2>/dev/null) - cpu_temp=$((temp_raw / 1000)) - fi - - persistent_cpu_peak=$(cat "$CPU_PEAK_FILE" 2>/dev/null || echo "$cpu_overall_int") - persistent_cpu_peak_time=$(cat "$CPU_PEAK_TIMESTAMP_FILE" 2>/dev/null || echo "N/A") - persistent_temp_peak=$(cat "$TEMP_PEAK_FILE" 2>/dev/null || echo "$cpu_temp") - persistent_temp_peak_time=$(cat "$TEMP_PEAK_TIMESTAMP_FILE" 2>/dev/null || echo "N/A") -fi - -# Read CPU usage history -mapfile -t cpu_history < "$HISTORY_FILE" - -# Read temperature history -mapfile -t temp_history < "$TEMP_HISTORY_FILE" - -# Display header -echo "CPU Status" -echo "==========" -echo "" - -# Get current CPU governor -current_governor=$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor 2>/dev/null || echo "N/A") -echo "Governor: $current_governor" -echo "" - -# Draw CPU usage history bar chart -cpu_bar="" -for val in "${cpu_history[@]}"; do - if [ "$val" -lt 5 ]; then - cpu_bar="${cpu_bar}▁" - elif [ "$val" -lt 20 ]; then - cpu_bar="${cpu_bar}▂" - elif [ "$val" -lt 35 ]; then - cpu_bar="${cpu_bar}▃" - elif [ "$val" -lt 50 ]; then - cpu_bar="${cpu_bar}▄" - elif [ "$val" -lt 65 ]; then - cpu_bar="${cpu_bar}▅" - elif [ "$val" -lt 80 ]; then - cpu_bar="${cpu_bar}▆" - elif [ "$val" -lt 90 ]; then - cpu_bar="${cpu_bar}▇" - else - cpu_bar="${cpu_bar}█" - fi -done - -echo "CPU Usage:" -echo " History: $cpu_bar" -echo " Current: ${cpu_overall_int}% | Peak: ${persistent_cpu_peak}% (at ${persistent_cpu_peak_time})" -echo "" - -# Draw temperature history bar chart (scale 30-80°C) -temp_bar="" -for val in "${temp_history[@]}"; do - # Map temperature to 30-80°C range to bar chart - if [ "$val" -lt 35 ]; then - temp_bar="${temp_bar}▁" - elif [ "$val" -lt 40 ]; then - temp_bar="${temp_bar}▂" - elif [ "$val" -lt 45 ]; then - temp_bar="${temp_bar}▃" - elif [ "$val" -lt 50 ]; then - temp_bar="${temp_bar}▄" - elif [ "$val" -lt 55 ]; then - temp_bar="${temp_bar}▅" - elif [ "$val" -lt 60 ]; then - temp_bar="${temp_bar}▆" - elif [ "$val" -lt 70 ]; then - temp_bar="${temp_bar}▇" - else - temp_bar="${temp_bar}█" - fi -done - -echo "Temperature:" -echo " History: $temp_bar" -echo " Current: ${cpu_temp}°C | Peak: ${persistent_temp_peak}°C (at ${persistent_temp_peak_time})" -echo "" - -# Display per-core usage -echo "Per-Core Usage:" -for i in "${!stats_before[@]}"; do - usage=$(calculate_usage "${stats_before[$i]}" "${stats_after[$i]}") - printf " Core %2d: %3d%%\n" "$i" "$usage" -done diff --git a/.config/scripts/eww/datetime_info.sh b/.config/scripts/eww/datetime_info.sh deleted file mode 100755 index c5f1f1e..0000000 --- a/.config/scripts/eww/datetime_info.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash - -# DateTime Info - Shows system uptime with seconds - -# Get system uptime in seconds -uptime_seconds=$(cat /proc/uptime | awk '{print int($1)}') - -# Convert to readable format with seconds -days=$((uptime_seconds / 86400)) -hours=$(((uptime_seconds % 86400) / 3600)) -minutes=$(((uptime_seconds % 3600) / 60)) -seconds=$((uptime_seconds % 60)) - -# Build uptime string -uptime_str="" -if [ $days -gt 0 ]; then - uptime_str="${days} day$([ $days -gt 1 ] && echo 's' || true)" - [ $hours -gt 0 ] && uptime_str="$uptime_str, ${hours} hour$([ $hours -gt 1 ] && echo 's' || true)" - [ $minutes -gt 0 ] && uptime_str="$uptime_str, ${minutes} minute$([ $minutes -gt 1 ] && echo 's' || true)" - [ $seconds -gt 0 ] && uptime_str="$uptime_str, ${seconds} second$([ $seconds -gt 1 ] && echo 's' || true)" -elif [ $hours -gt 0 ]; then - uptime_str="${hours} hour$([ $hours -gt 1 ] && echo 's' || true)" - [ $minutes -gt 0 ] && uptime_str="$uptime_str, ${minutes} minute$([ $minutes -gt 1 ] && echo 's' || true)" - [ $seconds -gt 0 ] && uptime_str="$uptime_str, ${seconds} second$([ $seconds -gt 1 ] && echo 's' || true)" -else - uptime_str="${minutes} minute$([ $minutes -gt 1 ] && echo 's' || true), ${seconds} second$([ $seconds -gt 1 ] && echo 's' || true)" -fi - -# Display with proper alignment -echo "Uptime" -echo "======" -echo "" -echo " $uptime_str" diff --git a/.config/scripts/eww/memory_status.sh b/.config/scripts/eww/memory_status.sh deleted file mode 100755 index 536a884..0000000 --- a/.config/scripts/eww/memory_status.sh +++ /dev/null @@ -1,112 +0,0 @@ -#!/bin/bash - -# Memory Status - Shows memory usage with history bar chart and persistent peak tracking - -HISTORY_FILE="/tmp/memory_history.txt" -PEAK_FILE="/tmp/memory_peak.txt" -PEAK_TIMESTAMP_FILE="/tmp/memory_peak_timestamp.txt" -LAST_UPDATE_FILE="/tmp/memory_status_last_update.txt" -MAX_HISTORY=20 -UPDATE_INTERVAL=1000 # milliseconds - -# Get current memory usage -get_memory() { - free -b 2>/dev/null | awk 'NR==2 { - used = $3 - total = $2 - percent = int(used * 100 / total) - printf "%.1f %.1f %d", used/1073741824, total/1073741824, percent - }' -} - -# Read memory and add to history -current=$(get_memory) -used=$(echo $current | awk '{print $1}') -total=$(echo $current | awk '{print $2}') -percent=$(echo $current | awk '{print $3}') - -# Check if we should update history (only once every 1s) -current_time_ms=$(date +%s%3N 2>/dev/null || echo $(($(date +%s) * 1000))) -last_update=$(cat "$LAST_UPDATE_FILE" 2>/dev/null || echo 0) -time_diff=$((current_time_ms - last_update)) - -should_update=0 -if [ $time_diff -ge $UPDATE_INTERVAL ]; then - should_update=1 - echo "$current_time_ms" > "$LAST_UPDATE_FILE" -fi - -# Only update history if interval has passed -if [ $should_update -eq 1 ]; then - # Get current timestamp - current_time=$(date '+%H:%M:%S') - - # Append to history file - echo "$used" >> "$HISTORY_FILE" - - # Keep only last N entries - tail -n $MAX_HISTORY "$HISTORY_FILE" > "${HISTORY_FILE}.tmp" - mv "${HISTORY_FILE}.tmp" "$HISTORY_FILE" - - # Initialize or read persistent peak - if [ ! -f "$PEAK_FILE" ]; then - echo "$used" > "$PEAK_FILE" - echo "$current_time" > "$PEAK_TIMESTAMP_FILE" - fi - - persistent_peak=$(cat "$PEAK_FILE" 2>/dev/null || echo "$used") - persistent_peak_time=$(cat "$PEAK_TIMESTAMP_FILE" 2>/dev/null || echo "$current_time") - - # Update persistent peak if current usage exceeds it - if (( $(echo "$used > $persistent_peak" | bc -l) )); then - persistent_peak=$used - persistent_peak_time=$current_time - echo "$persistent_peak" > "$PEAK_FILE" - echo "$persistent_peak_time" > "$PEAK_TIMESTAMP_FILE" - fi -else - # If not updating, just read the current peaks for display - persistent_peak=$(cat "$PEAK_FILE" 2>/dev/null || echo "$used") - persistent_peak_time=$(cat "$PEAK_TIMESTAMP_FILE" 2>/dev/null || echo "N/A") -fi - -# Read history and create bar chart -mapfile -t history < "$HISTORY_FILE" - -# Create bar chart -echo "Memory Status" -echo "=============" -echo "" - -# Draw bar chart based on history -bar="" -for val in "${history[@]}"; do - # Calculate percentage and convert to bar - bar_percent=$(echo "scale=0; $val * 100 / $total" | bc) - if [ "$bar_percent" -lt 5 ]; then - bar="${bar}▁" - elif [ "$bar_percent" -lt 20 ]; then - bar="${bar}▂" - elif [ "$bar_percent" -lt 35 ]; then - bar="${bar}▃" - elif [ "$bar_percent" -lt 50 ]; then - bar="${bar}▄" - elif [ "$bar_percent" -lt 65 ]; then - bar="${bar}▅" - elif [ "$bar_percent" -lt 80 ]; then - bar="${bar}▆" - elif [ "$bar_percent" -lt 90 ]; then - bar="${bar}▇" - else - bar="${bar}█" - fi -done - -echo "History: $bar" -echo "" - -# Show current and peak with timestamp -persistent_peak_percent=$(echo "scale=1; $persistent_peak * 100 / $total" | bc) - -echo "Current: ${used} GB / ${total} GB (${percent}%)" -echo "Peak: ${persistent_peak} GB / ${total} GB (${persistent_peak_percent}%) (at ${persistent_peak_time})" diff --git a/.config/scripts/eww/network_speed.sh b/.config/scripts/eww/network_speed.sh deleted file mode 100755 index cf403f7..0000000 --- a/.config/scripts/eww/network_speed.sh +++ /dev/null @@ -1,59 +0,0 @@ -#!/bin/bash - -# Network Speed - Shows current download and upload speeds for bar display - -# Get network interfaces -get_network_stats() { - # Get RX/TX bytes for all interfaces except lo - cat /proc/net/dev | grep -v "lo:" | grep ":" | awk '{ - rx += $2 - tx += $10 - } - END { - printf "%d %d\n", rx, tx - }' -} - -# Store previous values -HISTORY_FILE="/tmp/network_speed_history.txt" -PREV_RX=0 -PREV_TX=0 - -# Read previous values if they exist -if [ -f "$HISTORY_FILE" ]; then - read PREV_RX PREV_TX < "$HISTORY_FILE" -fi - -# Get current values -read CURR_RX CURR_TX <<< $(get_network_stats) - -# Calculate difference (bytes since last check) -DELTA_RX=$((CURR_RX - PREV_RX)) -DELTA_TX=$((CURR_TX - PREV_TX)) - -# Handle negative values (counter reset) -[ $DELTA_RX -lt 0 ] && DELTA_RX=0 -[ $DELTA_TX -lt 0 ] && DELTA_TX=0 - -# Convert to KB/s (assuming 1 second polling interval) -RX_SPEED=$((DELTA_RX / 1024)) -TX_SPEED=$((DELTA_TX / 1024)) - -# Save current values for next iteration -echo "$CURR_RX $CURR_TX" > "$HISTORY_FILE" - -# Format speeds with units -format_speed() { - local speed=$1 - if [ $speed -lt 1024 ]; then - printf "%dᵏᵇ/ˢ" "$speed" - else - printf "%dᵐᵇ/ˢ" "$((speed / 1024))" - fi -} - -RX_FORMATTED=$(format_speed $RX_SPEED) -TX_FORMATTED=$(format_speed $TX_SPEED) - -# Output for bar display -echo "⬇${RX_FORMATTED} ⬆${TX_FORMATTED}" diff --git a/.config/scripts/eww/network_status.sh b/.config/scripts/eww/network_status.sh deleted file mode 100755 index 7f58184..0000000 --- a/.config/scripts/eww/network_status.sh +++ /dev/null @@ -1,76 +0,0 @@ -#!/bin/bash - -# Network Status - Shows network activity and connection status - -# Get network interfaces -get_network_stats() { - # Get RX/TX bytes for all interfaces except lo - cat /proc/net/dev | grep -v "lo:" | grep ":" | awk '{ - rx += $2 - tx += $10 - } - END { - printf "%d %d\n", rx, tx - }' -} - -# Store previous values -HISTORY_FILE="/tmp/network_history.txt" -PREV_RX=0 -PREV_TX=0 - -# Read previous values if they exist -if [ -f "$HISTORY_FILE" ]; then - read PREV_RX PREV_TX < "$HISTORY_FILE" -fi - -# Get current values -read CURR_RX CURR_TX <<< $(get_network_stats) - -# Calculate difference (bytes since last check) -DELTA_RX=$((CURR_RX - PREV_RX)) -DELTA_TX=$((CURR_TX - PREV_TX)) - -# Handle negative values (counter reset) -[ $DELTA_RX -lt 0 ] && DELTA_RX=0 -[ $DELTA_TX -lt 0 ] && DELTA_TX=0 - -# Convert to KB/s (assuming 1 second polling interval) -RX_SPEED=$((DELTA_RX / 1024)) -TX_SPEED=$((DELTA_TX / 1024)) - -# Save current values for next iteration -echo "$CURR_RX $CURR_TX" > "$HISTORY_FILE" - -# Format speeds with units -format_speed() { - local speed=$1 - if [ $speed -lt 1024 ]; then - echo "${speed}KB/s" - else - echo "$((speed / 1024))MB/s" - fi -} - -RX_FORMATTED=$(format_speed $RX_SPEED) -TX_FORMATTED=$(format_speed $TX_SPEED) - -# Check if network is connected and get active interface -ACTIVE_INTERFACE=$(ip link | grep "state UP" | grep -oP '^\d+: \K[^:]+' | head -1) -CONNECTED=$(ip link | grep -c "state UP") - -# Display network status -echo "Network" -echo "=======" -echo "" - -if [ $CONNECTED -gt 0 ]; then - echo " Status: Connected" - echo " Interface: $ACTIVE_INTERFACE" -else - echo " Status: Disconnected" -fi - -echo "" -echo " ⬇ Download: $RX_FORMATTED" -echo " ⬆ Upload: $TX_FORMATTED" diff --git a/.config/scripts/eww/privacy_status.sh b/.config/scripts/eww/privacy_status.sh deleted file mode 100755 index 16b09dd..0000000 --- a/.config/scripts/eww/privacy_status.sh +++ /dev/null @@ -1,143 +0,0 @@ -#!/bin/bash - -# Privacy indicator script for eww bar -# Usage: privacy.sh [status|details] -# status - Returns just the icons (for bar display) -# details - Returns detailed info (for tooltip) - -# Shared detection logic -detect_audio_output() { - if command -v pactl &> /dev/null; then - if pactl list sink-inputs 2>/dev/null | grep -q "Corked: no"; then - return 0 - fi - fi - return 1 -} - -detect_audio_input() { - if command -v pactl &> /dev/null; then - if pactl list source-outputs 2>/dev/null | grep -q "Corked: no"; then - return 0 - fi - fi - return 1 -} - -detect_screen_sharing() { - if command -v pw-dump &> /dev/null; then - if pw-dump 2>/dev/null | grep -q "xdg-desktop-portal.*capture"; then - return 0 - fi - fi - return 1 -} - -detect_camera() { - if command -v lsof &> /dev/null; then - # Check if any /dev/video* devices are open - if lsof /dev/video* 2>/dev/null | grep -qv "COMMAND"; then - return 0 - fi - fi - return 1 -} - -get_output_apps() { - if command -v pactl &> /dev/null; then - pactl list sink-inputs 2>/dev/null | grep -oP '(?<=application\.name = ")[^"]*' | sort -u | paste -sd ', ' - - fi -} - -get_input_apps() { - if command -v pactl &> /dev/null; then - pactl list source-outputs 2>/dev/null | grep -oP '(?<=application\.name = ")[^"]*' | sort -u | paste -sd ', ' - - fi -} - -get_screen_app() { - if command -v pw-dump &> /dev/null; then - if pw-dump 2>/dev/null | jq -r '.[] | select(.info.props["application.name"] != null) | .info.props["application.name"]' 2>/dev/null | grep -q "Brave"; then - echo "Brave" - elif pw-dump 2>/dev/null | jq -r '.[] | select(.info.props["application.name"] != null) | .info.props["application.name"]' 2>/dev/null | grep -q "Zen"; then - echo "Zen" - fi - fi -} - -get_camera_apps() { - if command -v lsof &> /dev/null; then - lsof /dev/video* 2>/dev/null | awk 'NR>1 {print $1}' | sort -u | paste -sd ', ' - - fi -} - -# Show status (just icons for bar) -show_status() { - output="" - - if detect_audio_output; then - output+="⌣ " - fi - - if detect_audio_input; then - output+="⌢ " - fi - - if detect_screen_sharing; then - output+="⊞ " - fi - - if detect_camera; then - output+="⊙ " - fi - - echo "$output" | xargs -} - -# Show details (for tooltip) -show_details() { - lines=() - - if detect_audio_output; then - output_apps=$(get_output_apps) - if [ -n "$output_apps" ]; then - lines+=("⌣ Playing: $output_apps") - fi - fi - - if detect_audio_input; then - input_apps=$(get_input_apps) - if [ -n "$input_apps" ]; then - lines+=("⌢ Recording: $input_apps") - fi - fi - - if detect_screen_sharing; then - screen_app=$(get_screen_app) - if [ -n "$screen_app" ]; then - lines+=("⊞ Sharing: $screen_app") - fi - fi - - if detect_camera; then - camera_apps=$(get_camera_apps) - if [ -n "$camera_apps" ]; then - lines+=("⊙ Camera: $camera_apps") - fi - fi - - printf "%s\n" "${lines[@]}" -} - -# Main logic -case "${1:-status}" in - status) - show_status - ;; - details) - show_details - ;; - *) - show_status - ;; -esac diff --git a/.config/scripts/eww/volume_info.sh b/.config/scripts/eww/volume_info.sh deleted file mode 100755 index ee57e30..0000000 --- a/.config/scripts/eww/volume_info.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash -# Get volume info with song details for tooltip - -# Get current volume -volume=$(wpctl get-volume @DEFAULT_AUDIO_SINK@ 2>/dev/null | awk '{printf "%.0f", $2*100}' || echo "0") - -# Get mute status -mute_status=$(wpctl get-volume @DEFAULT_AUDIO_SINK@ 2>/dev/null | grep -q MUTED && echo "true" || echo "false") - -# Get sink info -sink_name=$(pactl info 2>/dev/null | grep "Default Sink:" | awk -F': ' '{print $2}') -sink_desc=$(pactl list sinks 2>/dev/null | grep -A1 "Name: $sink_name" | grep "Description:" | awk -F': ' '{print $2}') - -# Format volume bar (10 segments) -bar_segments=$((volume / 10)) -filled=$(printf '█%.0s' $(seq 1 $bar_segments)) -empty=$(printf '░%.0s' $(seq 1 $((10 - bar_segments)))) -volume_bar="${filled}${empty}" - -# Format mute status -if [[ "$mute_status" == "true" ]]; then - mute_text="Muted" -else - mute_text="Unmuted" -fi - -# Output tooltip -echo "Volume" -echo "======" -echo "" -echo " Status: ${mute_text}" - -if [[ -n "$sink_desc" ]]; then - echo " Device: ${sink_desc}" -fi - -echo "" -echo " ${volume_bar} ${volume}%" diff --git a/.config/scripts/shared/song_detail_writer.sh b/.config/scripts/shared/song_detail_writer.sh index 6c5ab01..55c582f 100755 --- a/.config/scripts/shared/song_detail_writer.sh +++ b/.config/scripts/shared/song_detail_writer.sh @@ -1,6 +1,6 @@ #!/bin/bash # Single-source writer: poll playerctl, write the formatted song-detail line -# to /tmp/song_detail_last so every consumer (waybar, eww, hyprlock) reads it +# to /tmp/song_detail_last so every consumer (waybar, hyprlock) reads it # without two scripts racing on shared /tmp state. # # The file holds ONLY the current line: no history, no persistence. Every diff --git a/.config/scripts/system/toggle_eww.sh b/.config/scripts/system/toggle_eww.sh deleted file mode 100755 index c6f2727..0000000 --- a/.config/scripts/system/toggle_eww.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -# Toggle eww bar visibility -# Check if eww main window is open and toggle accordingly - -if eww active-windows | grep -q "main"; then - eww close main -else - eww open main -fi -``` - -Now let me add the keybind to your Hyprland config: diff --git a/.config/scripts/system/usb_menu.sh b/.config/scripts/system/usb_menu.sh index 3471f14..a90d301 100755 --- a/.config/scripts/system/usb_menu.sh +++ b/.config/scripts/system/usb_menu.sh @@ -124,14 +124,7 @@ replug() { set_auth "$path" 1 && notify "Replugged" "$(dev_name "$path") [$path]" } -rereplug_keyboard() { - local p - p=$(keyboard_path) - [[ -n $p ]] || { notify "No keyboard found" "set KEYBOARD_USB in usb_devices.sh"; return 1; } - replug "$p" -} - -plug_all() { +replug_all() { local p for p in $(usb_paths); do [[ $(dev_authorized "$p") == 1 ]] || continue diff --git a/.config/qt5ct/qt5ct.conf b/.config/wallust/templates/qt5ct.conf similarity index 65% rename from .config/qt5ct/qt5ct.conf rename to .config/wallust/templates/qt5ct.conf index fd59f6e..26db7f6 100644 --- a/.config/qt5ct/qt5ct.conf +++ b/.config/wallust/templates/qt5ct.conf @@ -5,8 +5,8 @@ standard_dialogs=gtk3 style=Fusion [Fonts] -fixed="Noto Sans Arabic,12,-1,5,50,0,0,0,0,0" -general="Noto Sans Arabic,12,-1,5,50,0,0,0,0,0" +fixed="Adwaita Mono,11,-1,5,50,0,0,0,0,0" +general="Adwaita Sans,11,-1,5,50,0,0,0,0,0" [Interface] activate_item_on_single_click=1 @@ -23,9 +23,6 @@ toolbutton_style=4 underline_shortcut=1 wheel_scroll_lines=3 -[SettingsWindow] -geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0\0\0\0\0\0\0\0\t\xe7\0\0\x5\x65\0\0\0\0\0\0\0\0\0\0\t\xff\0\0\x5\x9f\0\0\0\0\x2\0\0\0\n\0\0\0\0\0\0\0\0\0\0\0\t\xe7\0\0\x5\x65) - [Troubleshooting] force_raster_widgets=1 ignored_applications=@Invalid() diff --git a/.config/qt6ct/qt6ct.conf b/.config/wallust/templates/qt6ct.conf similarity index 64% rename from .config/qt6ct/qt6ct.conf rename to .config/wallust/templates/qt6ct.conf index 51dd939..38339c7 100644 --- a/.config/qt6ct/qt6ct.conf +++ b/.config/wallust/templates/qt6ct.conf @@ -5,8 +5,8 @@ standard_dialogs=default style=Fusion [Fonts] -fixed="Sans Serif,9,-1,5,400,0,0,0,0,0,0,0,0,0,0,1" -general="Sans Serif,9,-1,5,400,0,0,0,0,0,0,0,0,0,0,1" +fixed="Adwaita Mono,11,-1,5,400,0,0,0,0,0,0,0,0,0,0,1" +general="Adwaita Sans,11,-1,5,400,0,0,0,0,0,0,0,0,0,0,1" [Interface] activate_item_on_single_click=1 @@ -23,9 +23,6 @@ toolbutton_style=4 underline_shortcut=1 wheel_scroll_lines=3 -[SettingsWindow] -geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0\0\0\0\0\0\0\0\t\xe7\0\0\x5\x65\0\0\0\0\0\0\0\0\0\0\t\xe7\0\0\x5\x65\0\0\0\0\x2\0\0\0\n\0\0\0\0\0\0\0\0\0\0\0\t\xe7\0\0\x5\x65) - [Troubleshooting] force_raster_widgets=1 ignored_applications=@Invalid() diff --git a/.config/wallust/wallust.toml b/.config/wallust/wallust.toml index 5063a2d..85b6f05 100644 --- a/.config/wallust/wallust.toml +++ b/.config/wallust/wallust.toml @@ -56,6 +56,8 @@ gtk2 = { template = 'gtk2.gtkrc', target = '~/.gtkrc-2.0.mine' } kdeglobals = { template = 'kdeglobals', target = '~/.config/kdeglobals' } qt5ct = { template = 'qt5ct-wallust.conf', target = '~/.config/qt5ct/colors/wallust.conf' } qt6ct = { template = 'qt6ct-wallust.conf', target = '~/.config/qt6ct/colors/wallust.conf' } +qt5ct_conf = { template = 'qt5ct.conf', target = '~/.config/qt5ct/qt5ct.conf' } +qt6ct_conf = { template = 'qt6ct.conf', target = '~/.config/qt6ct/qt6ct.conf' } niri = { template = 'niri-colors.sh', target = '~/.cache/wallust/niri-colors.sh' } [hooks] # Resolve mix() and compute surface colors for GTK and QT diff --git a/.gitignore b/.gitignore index b6017eb..b61481f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,8 @@ .config/nvim/lazy-lock.json # Wallust generated files -.config/qt5ct/colors/ -.config/qt6ct/colors/ +.config/qt5ct/ +.config/qt6ct/ .config/gtk-3.0/gtk.css .config/gtk-4.0/gtk.css .config/gtk-4.0/gtk-dark.css diff --git a/README.md b/README.md index d23d95a..96bf7ed 100644 --- a/README.md +++ b/README.md @@ -1,2 +1 @@ # dotfiles -