From ee71cba8d51ea5635ebda2ba0c776e8378706c6d Mon Sep 17 00:00:00 2001 From: JackJ30 Date: Sat, 7 Sep 2024 14:02:06 -0400 Subject: better stow --- waybar/.config/waybar/config | 142 ------------ waybar/.config/waybar/config-hypr | 367 ------------------------------- waybar/.config/waybar/mediaplayer.py | 128 ----------- waybar/.config/waybar/modules/mail.py | 43 ---- waybar/.config/waybar/modules/spotify.sh | 19 -- waybar/.config/waybar/modules/storage.sh | 25 --- waybar/.config/waybar/modules/weather.sh | 80 ------- waybar/.config/waybar/old-config | 92 -------- waybar/.config/waybar/old-config-hypr | 367 ------------------------------- waybar/.config/waybar/old-style.css | 64 ------ waybar/.config/waybar/style.css | 68 ------ waybar/.config/waybar/waybar.sh | 10 - 12 files changed, 1405 deletions(-) delete mode 100644 waybar/.config/waybar/config delete mode 100644 waybar/.config/waybar/config-hypr delete mode 100755 waybar/.config/waybar/mediaplayer.py delete mode 100755 waybar/.config/waybar/modules/mail.py delete mode 100755 waybar/.config/waybar/modules/spotify.sh delete mode 100755 waybar/.config/waybar/modules/storage.sh delete mode 100755 waybar/.config/waybar/modules/weather.sh delete mode 100644 waybar/.config/waybar/old-config delete mode 100644 waybar/.config/waybar/old-config-hypr delete mode 100644 waybar/.config/waybar/old-style.css delete mode 100644 waybar/.config/waybar/style.css delete mode 100755 waybar/.config/waybar/waybar.sh (limited to 'waybar/.config') diff --git a/waybar/.config/waybar/config b/waybar/.config/waybar/config deleted file mode 100644 index 86f731b..0000000 --- a/waybar/.config/waybar/config +++ /dev/null @@ -1,142 +0,0 @@ -{ - "layer": "top", - "position": "top", - "mode": "dock", - "margin-bottom": 0, - "modules-left": [ - "clock", - "custom/separator", - "hyprland/workspaces", - "custom/separator", - "tray" - ], - "modules-center": [ - "hyprland/window" - ], - "modules-right": [ - "memory", - "cpu", - "pulseaudio", - "battery", - "network", - "custom/separ" - ], - "custom/separator": { - "exec": "echo \"|\"", - "format": "{}" - }, - "tray": { - "icon-size": 16, - "spacing": 8 - }, - "clock": { - "format": " 󰸗 {:%I:%M %p} ", - "interval": 60, - "tooltip": true, - "on-click": "kitty -e calcurse", - "tooltip-format": "{:%d %B %H:%M}" - }, - "hyprland/workspaces": { - "format": "{icon}", - "separate-outputs": false, - "active-only": false, - // turn on true to show same all workspaces on each monitor - "all-outputs": false, - "format-icons": { - // 1-10 - "1": "1", - "2": "2", - "3": "3", - "4": "4", - "5": "5", - "6": "6", - "7": "7", - "8": "8", - "9": "9", - "10": "10", - // 11-10 - "11": "1", - "12": "2", - "13": "3", - "14": "4", - "15": "5", - "16": "6", - "17": "7", - "18": "8", - "19": "9", - "110": "10" - - // // 1-10 - // "1": "一", - // "2": "二", - // "3": "三", - // "4": "四", - // "5": "五", - // "6": "六", - // "7": "七", - // "8": "八", - // "9": "九", - // "10": "十", - // // 11-10 - // "11": "一", - // "12": "二", - // "13": "三", - // "14": "四", - // "15": "五", - // "16": "六", - // "17": "七", - // "18": "八", - // "19": "九", - // "110": "十" - } - }, - "hyprland/window": { - "format": "{}" - }, - "network": { - "format": " 󰖩", - "tooltip": "{ifname}", - "tooltip-format": "{essid}", - "on-click": "kitty nmtui", - "interval": 2 - }, - "temperature": { - "format": "{icon} {temperatureC}°C ", - "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input", - "critical-threshold": 80, - "format-icons": [ - "", - "", - "" - ] - }, - "memory": { - "format": "󰫗 {}% ", - "tooltip": "false" - }, - "cpu": { - "format": " {usage}% ", - "tooltip": "false" - }, - "pulseaudio": { - "format": " {volume}%", - "scroll-step": 1, - "on-click": "pavucontrol" - }, - "battery": { - "format": "{capacity}% {icon}", - "format-icons": [ - "", - "", - "", - "", - "" - ] - }, - "custom/powermenu": { - "format": " Power ", - "tooltip": false, - "on-click": "exec wlogout -p layer-shell" - } -} - diff --git a/waybar/.config/waybar/config-hypr b/waybar/.config/waybar/config-hypr deleted file mode 100644 index 0e713b9..0000000 --- a/waybar/.config/waybar/config-hypr +++ /dev/null @@ -1,367 +0,0 @@ -{ - // ------------------------------------------------------------------------- - // Global configuration - // ------------------------------------------------------------------------- - - "layer": "top", - - "position": "top", - - //"height": 20, - - "margin-left": 10, - "margin-bottom": 0, - "margin-right": 10, - - "spacing": 5, // Gaps between modules (4px) - - "modules-left": [ - //"custom/rofi", - "hyprland/workspaces", - //"hyprland/submap", - "temperature", - //"idle_inhibitor", - //"mpd" - "custom/media" - ], - "modules-center": [ - //"hyprland/window" - "clock#date", - "custom/weather" - //"custom/gammastep" - ], - "modules-right": [ - "backlight", - "custom/storage", - "memory", - "cpu", - "battery", - //"pulseaudio", - "wireplumber", - "custom/screenshot_t", - "custom/power", - "tray" - ], - - - // ------------------------------------------------------------------------- - // Modules - // ------------------------------------------------------------------------- - - "custom/sp1": { - "format": " | ", - "tooltip": false - }, - "custom/sp2": { - "format": " |", - "tooltip": false - }, - - - "custom/rofi": { - "format": "", - "tooltip": false, - "on-click-right": "nwg-drawer", - "on-click": "wofi --show run", - "on-click-middle": "pkill -9 wofi" - }, - "custom/screenshot_t":{ - "format":"", - "on-click": "~/.config/hypr/scripts/screenshot_full", - "on-click-right":"~/.config/hypr/scripts/screenshot_area" - }, - - "clock#1": { - "format": " {:%a}", - "tooltip": false, - "on-click": "gsimplecal" - }, - "clock#2": { - "format": " {:%d-%h-%Y}", - "tooltip": false, - "on-click": "gsimplecal" - }, - "clock#3": { - "format": " {:%H:%M:%S %p}", - "tooltip": false, - "on-click": "gsimplecal" - }, - - "temperature": { - // "thermal-zone": 1, - "interval": 4, - //"hwmon-path": "/sys/class/hwmon/hwmon3/temp1_input", - "critical-threshold": 80, - // "format-critical": " {temperatureC}°C", - "format-critical": " {temperatureC}°C", - "format": "{icon} {temperatureC}°C", - "format-icons": ["", "", ""], - "max-length": 7, - "min-length": 7, - "on-click": "xsensors" - }, - - "memory": { - "interval": 30, - "format": " {used:0.2f} / {total:0.0f} GB", - "on-click": "alacritty -e btop" - }, - - "battery": { - "interval": 2, - "states": { - "good": 95, - "warning": 30, - "critical": 15 - }, - "format": "{icon} {capacity}%", - "format-charging": " {capacity}%", - "format-plugged": " {capacity}%", - "format-icons": [ - "", - "", - "", - "", - "" - ] - }, - "network": { - "format-wifi": " {essid} ({signalStrength}%)", - "format-ethernet": "{ifname}: {ipaddr}/{cidr} ", - "format-linked": "{ifname} (No IP) ", - "format": "", - "format-disconnected": "", - "format-alt": "{ifname}: {ipaddr}/{cidr}", - "on-click": "wl-copy $(ip address show up scope global | grep inet | head -n1 | cut -d/ -f 1 | tr -d [:space:] | cut -c5-)", - "on-click-right": "wl-copy $(ip address show up scope global | grep inet6 | head -n1 | cut -d/ -f 1 | tr -d [:space:] | cut -c6-)", - "tooltip-format": " {bandwidthUpBits}  {bandwidthDownBits}\n{ifname}\n{ipaddr}/{cidr}\n", - "tooltip-format-wifi": " {essid} {frequency}MHz\nStrength: {signaldBm}dBm ({signalStrength}%)\nIP: {ipaddr}/{cidr}\n {bandwidthUpBits}  {bandwidthDownBits}", - "interval": 10 - }, - "custom/storage": { - "format": " {}", - "format-alt": "{percentage}% ", - "format-alt-click": "click-right", - "return-type": "json", - "interval": 60, - "exec": "~/.config/waybar/modules/storage.sh" - }, - "backlight": { - "device": "intel_backlight", - "format": "{icon} {percent}%", - "format-alt": "{percent}% {icon}", - "format-alt-click": "click-right", - //"format-icons": ["", ""], - "format-icons": ["", ""], - "on-scroll-down": "brightnessctl s 5%-", - "on-scroll-up": "brightnessctl s +5%" - }, - "idle_inhibitor": { - "format": "{icon}", - "format-icons": { - "activated": "", - "deactivated": "" - }, - "tooltip": "true" - }, - "custom/weather": { - "format": "{}", - "format-alt": "{alt}: {}", - "format-alt-click": "click-right", - "interval": 3600, - "exec": "curl -s 'https://wttr.in/?format=1'", - //"return-type": "json", - //"exec": "~/.config/waybar/modules/weather.sh", - "exec-if": "ping wttr.in -c1" - }, - "custom/pacman": { - "format": "􏆲 {}", - "interval": 3600, // every hour - "exec": "checkupdates | wc -l", // # of updates - "exec-if": "exit 0", // always run; consider advanced run conditions - "on-click": "alacritty -e 'paru'; pkill -SIGRTMIN+8 waybar", // update system - "signal": 8, - "max-length": 5, - "min-length": 3 - }, - - "custom/media": { - "format": "{icon} {}", - "return-type": "json", - "max-length": 40, - "format-icons": { - "spotify": "", - "default": "🎜" - }, - "escape": true, - "exec": "$HOME/.config/waybar/mediaplayer.py 2> /dev/null" // Script in resources folder - // "exec": "$HOME/.config/waybar/mediaplayer.py --player spotify 2> /dev/null" // Filter player based on name - }, - - "custom/power": { - "format": "", - "tooltip": false, - "on-click": "wlogout" - }, - - "clock": { - "format": " {:%H:%M  %e %b}", - "tooltip-format": "{:%Y %B}\n{calendar}", - "today-format": "{}" - }, - - "clock#date": { - "format": "❤️ {:%H:%M  %e %b}", // Icon: calendar-alt - //"format": "{:%I:%M %p %A %b %d}", - "tooltip-format": "{:%Y %B}\n{calendar}", - "today-format": "{}" - }, - - "custom/gammastep": { - "interval": 5, - "return-type": "json", - "exec": { - "pre": "if unit_status=\"$(systemctl --user is-active gammastep)\"; then\nstatus=\"$unit_status ($(journalctl --user -u gammastep.service -g 'Period: ' | tail -1 | cut -d ':' -f6 | xargs))\"\nelse\nstatus=\"$unit_status\"\nfi", - "alt": "${status:-inactive}", - "tooltip": "Gammastep is $status", - }, - "format": "{icon}", - "format-icons": { - "activating": "󰁪 ", - "deactivating": "󰁪 ", - "inactive": "? ", - "active (Night)": " ", - "active (Nighttime)": " ", - "active (Transition (Night)": " ", - "active (Transition (Nighttime)": " ", - "active (Day)": " ", - "active (Daytime)": " ", - "active (Transition (Day)": " ", - "active (Transition (Daytime)": " ", - }, - "on-click": "systemctl --user is-active gammastep && systemctl --user stop gammastep || systemctl --user start gammastep", - }, - - "cpu": { - "interval": 1, - //"format": " {}%", // Icon: microchip - "format": "{max_frequency}GHz | {usage}%", - "max-length": 13, - "min-length": 13 - }, - - "mpd": { - "max-length": 25, - "format": " {title}", - "format-paused": " {title}", - "format-stopped": "", - "format-disconnected": "", - "on-click": "mpc --quiet toggle", - "on-click-right": "mpc update; mpc ls | mpc add", - "on-click-middle": "alacritty -e ncmpcpp", - "on-scroll-up": "mpc --quiet prev", - "on-scroll-down": "mpc --quiet next", - "smooth-scrolling-threshold": 5, - "tooltip-format": "{title} - {artist} ({elapsedTime:%M:%S}/{totalTime:%H:%M:%S})" - }, - - "custom/title": { - "format": "{}", - "interval": 0, - "return-type": "json", - //"max-length": 35, - "tooltip": false - }, - - "custom/title#name": { - "format": "{}", - "interval": 0, - "return-type": "json", - - "max-length": 35, - "exec": "$HOME/.scripts/title" - }, - - /*"custom/keyboard": { - "format": " {}", - "interval": 1, - "exec": "$HOME/.config/waybar/get_kbdlayout.sh" - },*/ - - "hyprland/workspaces": { - "all-outputs": true, - "format": "{name}", - "format-icons": { - "1": "一", - "2": "二", - "3": "三", - "4": "四", - "5": "五", - "6": "六", - "7": "七", - "8": "八", - "9": "九", - "10": "十", - }, - "on-scroll-up": "hyprctl dispatch workspace e+1 1>/dev/null", - "on-scroll-down": "hyprctl dispatch workspace e-1 1>/dev/null", - "sort-by-number": true, - "active-only": false, - }, - - "hyprland/window": { - "max-length": 100, - "separate-outputs": true - }, - - "pulseaudio": { - "scroll-step": 3, // %, can be a float - "format": "{icon} {volume}% {format_source}", - "format-bluetooth": "{volume}% {icon} {format_source}", - "format-bluetooth-muted": " {icon} {format_source}", - "format-muted": " {format_source}", - //"format-source": "{volume}% ", - //"format-source-muted": "", - "format-source": "", - "format-source-muted": "", - "format-icons": { - "headphone": "", - "hands-free": "", - "headset": "", - "phone": "", - "portable": "", - "car": "", - "default": ["", "", ""] - }, - "on-click": "pavucontrol", - "on-click-right": "amixer sset Master toggle" - }, - - "wireplumber": { - "on-click": "pavucontrol", - "on-click-right": "amixer sset Master toggle 1>/dev/null", - //on-click: "${wpctl} set-mute @DEFAULT_AUDIO_SINK@ toggle"; - //on-scroll-down: "${wpctl} set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 0.04+"; - //on-scroll-up: "${wpctl} set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 0.04-"; - "format": "{icon} {volume}%", - "format-muted": " ", - "format-source": "", - "format-source-muted": "", - //"format-muted": "", - //"format-icons": [ "" ] - "format-icons": { - "headphone": " ", - "hands-free": " ", - "headset": " ", - "phone": " ", - "portable": " ", - "car": " ", - "default": [" ", " ", " "] - }, - }, - - "tray": { - "icon-size": 15, - "spacing": 5 - } -} diff --git a/waybar/.config/waybar/mediaplayer.py b/waybar/.config/waybar/mediaplayer.py deleted file mode 100755 index 03dbdeb..0000000 --- a/waybar/.config/waybar/mediaplayer.py +++ /dev/null @@ -1,128 +0,0 @@ -#!/usr/bin/env python3 -import argparse -import logging -import sys -import signal -import gi -import json -gi.require_version('Playerctl', '2.0') -from gi.repository import Playerctl, GLib - -logger = logging.getLogger(__name__) - - -def write_output(text, player): - logger.info('Writing output') - - output = {'text': text, - 'class': 'custom-' + player.props.player_name, - 'alt': player.props.player_name} - - sys.stdout.write(json.dumps(output) + '\n') - sys.stdout.flush() - - -def on_play(player, status, manager): - logger.info('Received new playback status') - on_metadata(player, player.props.metadata, manager) - - -def on_metadata(player, metadata, manager): - logger.info('Received new metadata') - track_info = '' - - if player.props.player_name == 'spotify' and \ - 'mpris:trackid' in metadata.keys() and \ - ':ad:' in player.props.metadata['mpris:trackid']: - track_info = 'AD PLAYING' - elif player.get_artist() != '' and player.get_title() != '': - track_info = '{artist} - {title}'.format(artist=player.get_artist(), - title=player.get_title()) - else: - track_info = player.get_title() - - if player.props.status != 'Playing' and track_info: - track_info = ' ' + track_info - write_output(track_info, player) - - -def on_player_appeared(manager, player, selected_player=None): - if player is not None and (selected_player is None or player.name == selected_player): - init_player(manager, player) - else: - logger.debug("New player appeared, but it's not the selected player, skipping") - - -def on_player_vanished(manager, player): - logger.info('Player has vanished') - sys.stdout.write('\n') - sys.stdout.flush() - - -def init_player(manager, name): - logger.debug('Initialize player: {player}'.format(player=name.name)) - player = Playerctl.Player.new_from_name(name) - player.connect('playback-status', on_play, manager) - player.connect('metadata', on_metadata, manager) - manager.manage_player(player) - on_metadata(player, player.props.metadata, manager) - - -def signal_handler(sig, frame): - logger.debug('Received signal to stop, exiting') - sys.stdout.write('\n') - sys.stdout.flush() - # loop.quit() - sys.exit(0) - - -def parse_arguments(): - parser = argparse.ArgumentParser() - - # Increase verbosity with every occurance of -v - parser.add_argument('-v', '--verbose', action='count', default=0) - - # Define for which player we're listening - parser.add_argument('--player') - - return parser.parse_args() - - -def main(): - arguments = parse_arguments() - - # Initialize logging - logging.basicConfig(stream=sys.stderr, level=logging.DEBUG, - format='%(name)s %(levelname)s %(message)s') - - # Logging is set by default to WARN and higher. - # With every occurrence of -v it's lowered by one - logger.setLevel(max((3 - arguments.verbose) * 10, 0)) - - # Log the sent command line arguments - logger.debug('Arguments received {}'.format(vars(arguments))) - - manager = Playerctl.PlayerManager() - loop = GLib.MainLoop() - - manager.connect('name-appeared', lambda *args: on_player_appeared(*args, arguments.player)) - manager.connect('player-vanished', on_player_vanished) - - signal.signal(signal.SIGINT, signal_handler) - signal.signal(signal.SIGTERM, signal_handler) - - for player in manager.props.player_names: - if arguments.player is not None and arguments.player != player.name: - logger.debug('{player} is not the filtered player, skipping it' - .format(player=player.name) - ) - continue - - init_player(manager, player) - - loop.run() - - -if __name__ == '__main__': - main() - diff --git a/waybar/.config/waybar/modules/mail.py b/waybar/.config/waybar/modules/mail.py deleted file mode 100755 index 31958f7..0000000 --- a/waybar/.config/waybar/modules/mail.py +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/python - -import os -import imaplib - -import mailsecrets - -def getmails(username, password, server): - imap = imaplib.IMAP4_SSL(server, 993) - imap.login(username, password) - imap.select('INBOX') - ustatus, uresponse = imap.uid('search', None, 'UNSEEN') - if ustatus == 'OK': - unread_msg_nums = uresponse[0].split() - else: - unread_msg_nums = [] - - fstatus, fresponse = imap.uid('search', None, 'FLAGGED') - if fstatus == 'OK': - flagged_msg_nums = fresponse[0].split() - else: - flagged_msg_nums = [] - - return [len(unread_msg_nums), len(flagged_msg_nums)] - -ping = os.system("ping " + mailsecrets.server + " -c1 > /dev/null 2>&1") -if ping == 0: - mails = getmails(mailsecrets.username, mailsecrets.password, mailsecrets.server) - text = '' - alt = '' - - if mails[0] > 0: - text = alt = str(mails[0]) - if mails[1] > 0: - alt = str(mails[1]) + "  " + alt - else: - exit(1) - - print('{"text":"' + text + '", "alt": "' + alt + '"}') - -else: - exit(1) - diff --git a/waybar/.config/waybar/modules/spotify.sh b/waybar/.config/waybar/modules/spotify.sh deleted file mode 100755 index 1d13620..0000000 --- a/waybar/.config/waybar/modules/spotify.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh - -class=$(playerctl metadata --player=spotify --format '{{lc(status)}}') -icon="" - -if [[ $class == "playing" ]]; then - info=$(playerctl metadata --player=spotify --format '{{artist}} - {{title}}') - if [[ ${#info} > 40 ]]; then - info=$(echo $info | cut -c1-40)"..." - fi - text=$info" "$icon -elif [[ $class == "paused" ]]; then - text=$icon -elif [[ $class == "stopped" ]]; then - text="" -fi - -echo -e "{\"text\":\""$text"\", \"class\":\""$class"\"}" - diff --git a/waybar/.config/waybar/modules/storage.sh b/waybar/.config/waybar/modules/storage.sh deleted file mode 100755 index 90cc3dc..0000000 --- a/waybar/.config/waybar/modules/storage.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh - -mount="/" -warning=20 -critical=10 - -df -h -P -l "$mount" | awk -v warning=$warning -v critical=$critical ' -/\/.*/ { - text=$4 - tooltip="Filesystem: "$1"\rSize: "$2"\rUsed: "$3"\rAvail: "$4"\rUse%: "$5"\rMounted on: "$6 - use=$5 - exit 0 -} -END { - class="" - gsub(/%$/,"",use) - if ((100 - use) < critical) { - class="critical" - } else if ((100 - use) < warning) { - class="warning" - } - print "{\"text\":\""text"\", \"percentage\":"use",\"tooltip\":\""tooltip"\", \"class\":\""class"\"}" -} -' - diff --git a/waybar/.config/waybar/modules/weather.sh b/waybar/.config/waybar/modules/weather.sh deleted file mode 100755 index 2ddeee2..0000000 --- a/waybar/.config/waybar/modules/weather.sh +++ /dev/null @@ -1,80 +0,0 @@ -#!/bin/bash - -cachedir=~/.cache/rbn -cachefile=${0##*/}-$1 - -if [ ! -d $cachedir ]; then - mkdir -p $cachedir -fi - -if [ ! -f $cachedir/$cachefile ]; then - touch $cachedir/$cachefile -fi - -# Save current IFS -SAVEIFS=$IFS -# Change IFS to new line. -IFS=$'\n' - -cacheage=$(($(date +%s) - $(stat -c '%Y' "$cachedir/$cachefile"))) -if [ $cacheage -gt 1740 ] || [ ! -s $cachedir/$cachefile ]; then - data=($(curl -s https://en.wttr.in/$1\?0qnT 2>&1)) - echo ${data[0]} | cut -f1 -d, > $cachedir/$cachefile - echo ${data[1]} | sed -E 's/^.{15}//' >> $cachedir/$cachefile - echo ${data[2]} | sed -E 's/^.{15}//' >> $cachedir/$cachefile -fi - -weather=($(cat $cachedir/$cachefile)) - -# Restore IFSClear -IFS=$SAVEIFS - -temperature=$(echo ${weather[2]} | sed -E 's/([[:digit:]])+\.\./\1 to /g') - -#echo ${weather[1]##*,} - -# https://fontawesome.com/icons?s=solid&c=weather -case $(echo ${weather[1]##*,} | tr '[:upper:]' '[:lower:]') in -"clear" | "sunny") - condition="" - ;; -"partly cloudy") - condition="杖" - ;; -"cloudy") - condition="" - ;; -"overcast") - condition="" - ;; -"mist" | "fog" | "freezing fog") - condition="" - ;; -"patchy rain possible" | "patchy light drizzle" | "light drizzle" | "patchy light rain" | "light rain" | "light rain shower" | "rain") - condition="" - ;; -"moderate rain at times" | "moderate rain" | "heavy rain at times" | "heavy rain" | "moderate or heavy rain shower" | "torrential rain shower" | "rain shower") - condition="" - ;; -"patchy snow possible" | "patchy sleet possible" | "patchy freezing drizzle possible" | "freezing drizzle" | "heavy freezing drizzle" | "light freezing rain" | "moderate or heavy freezing rain" | "light sleet" | "ice pellets" | "light sleet showers" | "moderate or heavy sleet showers") - condition="ﭽ" - ;; -"blowing snow" | "moderate or heavy sleet" | "patchy light snow" | "light snow" | "light snow showers") - condition="流" - ;; -"blizzard" | "patchy moderate snow" | "moderate snow" | "patchy heavy snow" | "heavy snow" | "moderate or heavy snow with thunder" | "moderate or heavy snow showers") - condition="ﰕ" - ;; -"thundery outbreaks possible" | "patchy light rain with thunder" | "moderate or heavy rain with thunder" | "patchy light snow with thunder") - condition="" - ;; -*) - condition="" - echo -e "{\"text\":\""$condition"\", \"alt\":\""${weather[0]}"\", \"tooltip\":\""${weather[0]}: $temperature ${weather[1]}"\"}" - ;; -esac - -#echo $temp $condition - -echo -e "{\"text\":\""$temperature $condition"\", \"alt\":\""${weather[0]}"\", \"tooltip\":\""${weather[0]}: $temperature ${weather[1]}"\"}" - diff --git a/waybar/.config/waybar/old-config b/waybar/.config/waybar/old-config deleted file mode 100644 index 9f78d67..0000000 --- a/waybar/.config/waybar/old-config +++ /dev/null @@ -1,92 +0,0 @@ -{ - "layer": "top", - "position": "top", - "margin-bottom": 0, - "modules-left": [ - "clock", - "custom/separator", - "hyprland/workspaces", - "custom/separator", - "tray" - ], - "modules-center": [ - "hyprland/window" - ], - "modules-right": [ - "network", - "temperature", - "memory", - "cpu", - "pulseaudio", - "battery", - "custom/separator", - "custom/powermenu" - ], - "custom/separator": { - "exec": "echo \"|\"", - "format": "{}" - }, - "tray": { - "icon-size": 16, - "spacing": 8 - }, - "clock": { - "format": " {:%H:%M} ", - "interval": 60, - "tooltip": true, - "tooltip-format": "{:%d %B %H:%M}" - }, - "hyprland/workspaces": { - "format": "{icon}", - "separate-outputs": true, - "active-only": false, - "all-outputs": true - }, - "hyprland/window": { - "format": "{}" - }, - "network": { - "format": "󰖩 ", - "tooltip-format-ethernet": "{ifname} ", - "interface": "enp34s0", - "interval": 2 - }, - "temperature": { - "format": "{icon} {temperatureC}°C ", - "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input", - "critical-threshold": 80, - "format-icons": [ - "", - "", - "" - ] - }, - "memory": { - "format": "󰍛 {}% ", - "tooltip": "false" - }, - "cpu": { - "format": " {usage}% ", - "tooltip": "false" - }, - "pulseaudio": { - "format": " {volume}%", - "scroll-step": 1, - "on-click": "pavucontrol" - }, - "battery": { - "format": "{capacity}% {icon}", - "format-icons": [ - "", - "", - "", - "", - "" - ] - }, - "custom/powermenu": { - "format": "  ", - "tooltip": false, - "on-click": "exec wlogout -p layer-shell" - } -} diff --git a/waybar/.config/waybar/old-config-hypr b/waybar/.config/waybar/old-config-hypr deleted file mode 100644 index 0e713b9..0000000 --- a/waybar/.config/waybar/old-config-hypr +++ /dev/null @@ -1,367 +0,0 @@ -{ - // ------------------------------------------------------------------------- - // Global configuration - // ------------------------------------------------------------------------- - - "layer": "top", - - "position": "top", - - //"height": 20, - - "margin-left": 10, - "margin-bottom": 0, - "margin-right": 10, - - "spacing": 5, // Gaps between modules (4px) - - "modules-left": [ - //"custom/rofi", - "hyprland/workspaces", - //"hyprland/submap", - "temperature", - //"idle_inhibitor", - //"mpd" - "custom/media" - ], - "modules-center": [ - //"hyprland/window" - "clock#date", - "custom/weather" - //"custom/gammastep" - ], - "modules-right": [ - "backlight", - "custom/storage", - "memory", - "cpu", - "battery", - //"pulseaudio", - "wireplumber", - "custom/screenshot_t", - "custom/power", - "tray" - ], - - - // ------------------------------------------------------------------------- - // Modules - // ------------------------------------------------------------------------- - - "custom/sp1": { - "format": " | ", - "tooltip": false - }, - "custom/sp2": { - "format": " |", - "tooltip": false - }, - - - "custom/rofi": { - "format": "", - "tooltip": false, - "on-click-right": "nwg-drawer", - "on-click": "wofi --show run", - "on-click-middle": "pkill -9 wofi" - }, - "custom/screenshot_t":{ - "format":"", - "on-click": "~/.config/hypr/scripts/screenshot_full", - "on-click-right":"~/.config/hypr/scripts/screenshot_area" - }, - - "clock#1": { - "format": " {:%a}", - "tooltip": false, - "on-click": "gsimplecal" - }, - "clock#2": { - "format": " {:%d-%h-%Y}", - "tooltip": false, - "on-click": "gsimplecal" - }, - "clock#3": { - "format": " {:%H:%M:%S %p}", - "tooltip": false, - "on-click": "gsimplecal" - }, - - "temperature": { - // "thermal-zone": 1, - "interval": 4, - //"hwmon-path": "/sys/class/hwmon/hwmon3/temp1_input", - "critical-threshold": 80, - // "format-critical": " {temperatureC}°C", - "format-critical": " {temperatureC}°C", - "format": "{icon} {temperatureC}°C", - "format-icons": ["", "", ""], - "max-length": 7, - "min-length": 7, - "on-click": "xsensors" - }, - - "memory": { - "interval": 30, - "format": " {used:0.2f} / {total:0.0f} GB", - "on-click": "alacritty -e btop" - }, - - "battery": { - "interval": 2, - "states": { - "good": 95, - "warning": 30, - "critical": 15 - }, - "format": "{icon} {capacity}%", - "format-charging": " {capacity}%", - "format-plugged": " {capacity}%", - "format-icons": [ - "", - "", - "", - "", - "" - ] - }, - "network": { - "format-wifi": " {essid} ({signalStrength}%)", - "format-ethernet": "{ifname}: {ipaddr}/{cidr} ", - "format-linked": "{ifname} (No IP) ", - "format": "", - "format-disconnected": "", - "format-alt": "{ifname}: {ipaddr}/{cidr}", - "on-click": "wl-copy $(ip address show up scope global | grep inet | head -n1 | cut -d/ -f 1 | tr -d [:space:] | cut -c5-)", - "on-click-right": "wl-copy $(ip address show up scope global | grep inet6 | head -n1 | cut -d/ -f 1 | tr -d [:space:] | cut -c6-)", - "tooltip-format": " {bandwidthUpBits}  {bandwidthDownBits}\n{ifname}\n{ipaddr}/{cidr}\n", - "tooltip-format-wifi": " {essid} {frequency}MHz\nStrength: {signaldBm}dBm ({signalStrength}%)\nIP: {ipaddr}/{cidr}\n {bandwidthUpBits}  {bandwidthDownBits}", - "interval": 10 - }, - "custom/storage": { - "format": " {}", - "format-alt": "{percentage}% ", - "format-alt-click": "click-right", - "return-type": "json", - "interval": 60, - "exec": "~/.config/waybar/modules/storage.sh" - }, - "backlight": { - "device": "intel_backlight", - "format": "{icon} {percent}%", - "format-alt": "{percent}% {icon}", - "format-alt-click": "click-right", - //"format-icons": ["", ""], - "format-icons": ["", ""], - "on-scroll-down": "brightnessctl s 5%-", - "on-scroll-up": "brightnessctl s +5%" - }, - "idle_inhibitor": { - "format": "{icon}", - "format-icons": { - "activated": "", - "deactivated": "" - }, - "tooltip": "true" - }, - "custom/weather": { - "format": "{}", - "format-alt": "{alt}: {}", - "format-alt-click": "click-right", - "interval": 3600, - "exec": "curl -s 'https://wttr.in/?format=1'", - //"return-type": "json", - //"exec": "~/.config/waybar/modules/weather.sh", - "exec-if": "ping wttr.in -c1" - }, - "custom/pacman": { - "format": "􏆲 {}", - "interval": 3600, // every hour - "exec": "checkupdates | wc -l", // # of updates - "exec-if": "exit 0", // always run; consider advanced run conditions - "on-click": "alacritty -e 'paru'; pkill -SIGRTMIN+8 waybar", // update system - "signal": 8, - "max-length": 5, - "min-length": 3 - }, - - "custom/media": { - "format": "{icon} {}", - "return-type": "json", - "max-length": 40, - "format-icons": { - "spotify": "", - "default": "🎜" - }, - "escape": true, - "exec": "$HOME/.config/waybar/mediaplayer.py 2> /dev/null" // Script in resources folder - // "exec": "$HOME/.config/waybar/mediaplayer.py --player spotify 2> /dev/null" // Filter player based on name - }, - - "custom/power": { - "format": "", - "tooltip": false, - "on-click": "wlogout" - }, - - "clock": { - "format": " {:%H:%M  %e %b}", - "tooltip-format": "{:%Y %B}\n{calendar}", - "today-format": "{}" - }, - - "clock#date": { - "format": "❤️ {:%H:%M  %e %b}", // Icon: calendar-alt - //"format": "{:%I:%M %p %A %b %d}", - "tooltip-format": "{:%Y %B}\n{calendar}", - "today-format": "{}" - }, - - "custom/gammastep": { - "interval": 5, - "return-type": "json", - "exec": { - "pre": "if unit_status=\"$(systemctl --user is-active gammastep)\"; then\nstatus=\"$unit_status ($(journalctl --user -u gammastep.service -g 'Period: ' | tail -1 | cut -d ':' -f6 | xargs))\"\nelse\nstatus=\"$unit_status\"\nfi", - "alt": "${status:-inactive}", - "tooltip": "Gammastep is $status", - }, - "format": "{icon}", - "format-icons": { - "activating": "󰁪 ", - "deactivating": "󰁪 ", - "inactive": "? ", - "active (Night)": " ", - "active (Nighttime)": " ", - "active (Transition (Night)": " ", - "active (Transition (Nighttime)": " ", - "active (Day)": " ", - "active (Daytime)": " ", - "active (Transition (Day)": " ", - "active (Transition (Daytime)": " ", - }, - "on-click": "systemctl --user is-active gammastep && systemctl --user stop gammastep || systemctl --user start gammastep", - }, - - "cpu": { - "interval": 1, - //"format": " {}%", // Icon: microchip - "format": "{max_frequency}GHz | {usage}%", - "max-length": 13, - "min-length": 13 - }, - - "mpd": { - "max-length": 25, - "format": " {title}", - "format-paused": " {title}", - "format-stopped": "", - "format-disconnected": "", - "on-click": "mpc --quiet toggle", - "on-click-right": "mpc update; mpc ls | mpc add", - "on-click-middle": "alacritty -e ncmpcpp", - "on-scroll-up": "mpc --quiet prev", - "on-scroll-down": "mpc --quiet next", - "smooth-scrolling-threshold": 5, - "tooltip-format": "{title} - {artist} ({elapsedTime:%M:%S}/{totalTime:%H:%M:%S})" - }, - - "custom/title": { - "format": "{}", - "interval": 0, - "return-type": "json", - //"max-length": 35, - "tooltip": false - }, - - "custom/title#name": { - "format": "{}", - "interval": 0, - "return-type": "json", - - "max-length": 35, - "exec": "$HOME/.scripts/title" - }, - - /*"custom/keyboard": { - "format": " {}", - "interval": 1, - "exec": "$HOME/.config/waybar/get_kbdlayout.sh" - },*/ - - "hyprland/workspaces": { - "all-outputs": true, - "format": "{name}", - "format-icons": { - "1": "一", - "2": "二", - "3": "三", - "4": "四", - "5": "五", - "6": "六", - "7": "七", - "8": "八", - "9": "九", - "10": "十", - }, - "on-scroll-up": "hyprctl dispatch workspace e+1 1>/dev/null", - "on-scroll-down": "hyprctl dispatch workspace e-1 1>/dev/null", - "sort-by-number": true, - "active-only": false, - }, - - "hyprland/window": { - "max-length": 100, - "separate-outputs": true - }, - - "pulseaudio": { - "scroll-step": 3, // %, can be a float - "format": "{icon} {volume}% {format_source}", - "format-bluetooth": "{volume}% {icon} {format_source}", - "format-bluetooth-muted": " {icon} {format_source}", - "format-muted": " {format_source}", - //"format-source": "{volume}% ", - //"format-source-muted": "", - "format-source": "", - "format-source-muted": "", - "format-icons": { - "headphone": "", - "hands-free": "", - "headset": "", - "phone": "", - "portable": "", - "car": "", - "default": ["", "", ""] - }, - "on-click": "pavucontrol", - "on-click-right": "amixer sset Master toggle" - }, - - "wireplumber": { - "on-click": "pavucontrol", - "on-click-right": "amixer sset Master toggle 1>/dev/null", - //on-click: "${wpctl} set-mute @DEFAULT_AUDIO_SINK@ toggle"; - //on-scroll-down: "${wpctl} set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 0.04+"; - //on-scroll-up: "${wpctl} set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 0.04-"; - "format": "{icon} {volume}%", - "format-muted": " ", - "format-source": "", - "format-source-muted": "", - //"format-muted": "", - //"format-icons": [ "" ] - "format-icons": { - "headphone": " ", - "hands-free": " ", - "headset": " ", - "phone": " ", - "portable": " ", - "car": " ", - "default": [" ", " ", " "] - }, - }, - - "tray": { - "icon-size": 15, - "spacing": 5 - } -} diff --git a/waybar/.config/waybar/old-style.css b/waybar/.config/waybar/old-style.css deleted file mode 100644 index a3fbfc9..0000000 --- a/waybar/.config/waybar/old-style.css +++ /dev/null @@ -1,64 +0,0 @@ -* { - font-family: "Fira Code"; -} - -#waybar { - background: #171717; - color: #fff; -} - -#clock { - color: #fff; -} - -#tray { - padding-left: 2px; -} - -#workspaces button:hover { - background-color: transparent; -} - -#workspaces button { - color: #737373; - padding-left: 2px; - padding-right: 2px; - border: none; -} - -#workspaces button.active { - color: #84cc16; -} - -#window { - color: #fff; -} - -#network { - color: #3b82f6; - margin-right: 8px; -} - -#pulseaudio { - color: #14b8a6; - margin-right: 4px; -} - -#cpu { - color: #0ea5e9; - margin-right: 4px; -} - -#temperature { - color: #eab308; - margin-right: 4px; -} - -#memory { - color: #d946ef; - margin-right: 4px; -} - -#custom-powermenu { - color: #f43f5e; -} diff --git a/waybar/.config/waybar/style.css b/waybar/.config/waybar/style.css deleted file mode 100644 index ce9310f..0000000 --- a/waybar/.config/waybar/style.css +++ /dev/null @@ -1,68 +0,0 @@ -* { - font-family: "Fira Code"; -} - -#waybar { - background: #171717; - color: #fff; -} - -#clock { - color: #fff; -} - -#tray { - padding-left: 4px; -} - -#workspaces button:hover { - background-color: transparent; -} - -#workspaces button { - color: #737373; - padding-left: 4px; - padding-right: 4px; - border-radius: 0px; -} - -#workspaces button:hover { - background-color: #262626; -} - -#workspaces button.active { - color: #84cc16; -} - -#window { - color: #fff; -} - -#network { - color: #3b82f6; - margin-right: 8px; -} - -#pulseaudio { - color: #14b8a6; - margin-right: 4px; -} - -#cpu { - color: #0ea5e9; - margin-right: 4px; -} - -#temperature { - color: #eab308; - margin-right: 4px; -} - -#memory { - color: #d946ef; - margin-right: 4px; -} - -#custom-powermenu { - color: #f43f5e; -} diff --git a/waybar/.config/waybar/waybar.sh b/waybar/.config/waybar/waybar.sh deleted file mode 100755 index 720620c..0000000 --- a/waybar/.config/waybar/waybar.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env sh - -# Terminate already running bar instances -killall -q waybar - -# Wait until the processes have been shut down -while pgrep -x waybar >/dev/null; do sleep 1; done - -# Launch main -waybar -- cgit v1.2.3