From 2bb659730c54c3805842b504febbb925c1039cac Mon Sep 17 00:00:00 2001 From: pika Date: Sun, 9 Jun 2024 09:43:13 +0200 Subject: [PATCH 1/3] My own config starting to come alive --- config | 362 +++++++++++++++------------------- config.save | 152 -------------- config.save.1 | 170 ---------------- config.save.2 | 207 ------------------- custom-scripts/mediaplayer.py | 179 ----------------- custom-scripts/update | 11 -- custom-scripts/updates | 63 ------ mocha.css | 37 ---- pywal_style.css | 204 ------------------- style.css | 312 +++++++++++++---------------- 10 files changed, 299 insertions(+), 1398 deletions(-) delete mode 100644 config.save delete mode 100644 config.save.1 delete mode 100644 config.save.2 delete mode 100644 custom-scripts/mediaplayer.py delete mode 100755 custom-scripts/update delete mode 100755 custom-scripts/updates delete mode 100644 mocha.css delete mode 100644 pywal_style.css diff --git a/config b/config index 189579d..6dd2df6 100644 --- a/config +++ b/config @@ -1,213 +1,169 @@ +// -*- mode: json -*- + { - "layer": "top", - "position": "top", - "spacing": 4, - "margin-top": 3, - "margin-bottom": 3, - "margin-left": 3, - "margin-right": 5, + "layer": "top", + "position": "top", + "margin": 0, + "spacing": 4, - "modules-left": [ - "custom/icon", - "hyprland/workspaces", - "hyprland/window", - "custom/spotify", - ], + "modules-left": ["hyprland/workspaces","hyprland/window"], - "modules-center": [ - "clock" - ], + "modules-center": ["clock","tray"], - "modules-right": [ - "tray", - "backlight", - "cpu", - "pulseaudio", - "network", - "memory", - "battery", - "idle_inhibitor", - "custom/notification", - "custom/power", - ], + "modules-right": ["pulseaudio","battery","network","group/info","group/power"], - "custom/icon": { - "format": "󰣇", - "on-click-right": "rofi -config $HOME/.config/rofi/ssh-config.rasi -show ssh", - "on-click": "pkill rofi || rofi -show drun -modi drun,filebrowser,run,window,ssh", - "on-click-middle": "nwg-look", - "tooltip": false - }, - - "cpu": { - "interval": 10, - "format": " {usage}%", - "max-length": 10, - "tooltip": false, - "on-click-right": "kitty --class floating -e btop" - }, - - "clock": { - "format": "󰥔 {:%H:%M 󰃭 %d/%m} ", - //"format": "{:%a}", - "tooltip-format": "{calendar}", - "calendar": { - "mode" : "month", - "format": { - "months": "{}", - "days": "{}", - "weeks": "W{}", - "weekdays": "{}", - "today": "{}" - } - }, - }, - - "memory": { - "interval": 30, - "format": " {used}GiB", - "format-alt": " {used:0.1f}G", - "on-click-right": "kitty --class floating -e btop", - "max-length": 10 - }, - - "temperature": { - "format": " {temperatureF}°F" - }, - - "hyprland/window": { - "format": " {}", - "on-click-right": "$HOME/.config/hypr/scripts/screenshot_area", - "rewrite": { - "(.*) - NVIM": " NeoVim", - "(.*) — Mozilla Firefox": "󰈹 Firefox", - " ": "󰇄 Desktop", - "(.*) Spotify Free": "󰓇 Spotify", - "(.*) Spotify": "󰓇 Spotify", - " ~": " pika@home", - "(.*) - Obsidian(.*)": "󱓧 Obsidian", - } - }, - - "hyprland/workspaces" : { - "on-click": "activate", - "active-only": false, - "all-outputs": true, - "format": "{icon}", - "format-icons": { - "urgent": "", - "active": "", - "default": "" + "group/power": { + "orientation": "inherit", + "drawer": { + "transition-duration": 500, + "children-class": "not-power", + "transition-left-to-right": false, + }, + "modules": [ + "custom/power", // First element is the "group leader" and won't ever be hidden + "custom/powerm", + "custom/quit", + "custom/lock", + "custom/reboot", + ] + }, + "custom/quit": { + "format": "󰗼", + "tooltip": false, + "on-click": "hyprctl dispatch exit" + }, + "custom/lock": { + "format": "󰍁", + "tooltip": false, + "on-click": "swaylock" + }, + "custom/reboot": { + "format": "󰜉", + "tooltip": false, + "on-click": "reboot" + }, + "custom/powerm": { + "format": "", + "tooltip": false, + "on-click": "shutdown now" + }, + "group/info": { + "orientation": "inherit", + "drawer": { + "children-class": "info", + "parent-class": "p_info", + "transition-left-to-right": false, + }, + "modules": [ + "memory", "disk", "cpu" + ] }, - "persistent-workspaces": { - "*": 4 - } - }, - "backlight": { - "format": "{icon} {percent}%", - "format-icons": ["󰃞", "󰃟", "󰃠"], - "tooltip": false, - }, + "hyprland/workspaces": { + "disable-scroll": true, + "all-outputs": true, + "format": "{name}: {icon} [ {windows} ]", + "format-icons": { + "1": "󰁕", + "2": "󰁕", + "3": "󰁕", + "4": "󰁕", + "urgent": "󰊰", + "active": "󰢚", + "special": "󰮯", + "default": "󰁕" + }, + "window-rewrite-default": "", + "window-rewrite": { + "nvim": " ", + "foot": " ", + "Thorium": "󰊯 ", + "mercury": " ", + "title<.*youtube.*>": " ", + "title<*netflix.*>": "󰝆", + "Invidious": " ", + "class title<.*github.*>": "", // Windows whose class is "firefox" and title contains "github". Note that "class" always comes first. + }, + }, + "hyprland/window": { + "format": " {}", + "rewrite": { + "(.*) — Mozilla Firefox": "🌎 $1", + }, + "separate-outputs": false + }, - "pulseaudio": { - "format": "{icon} {volume}%", - "format-bluetooth": "{icon}  {volume}%", - "format-bluetooth-muted": "󰝟 ", - "format-muted": " 󰝟 ", - "format-icons": { - "headset": "", - "default": ["󰕿", "󰖀", "󰕾"], - }, - "tooltip": false, - "on-click": "pavucontrol", - }, - - "network": { - "interval": 30, - "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": "kitty --class floating $HOME/.config/hypr/scripts/wlan.sh", - "format-wifi": "󰤨 {essid}", - "format-ethernet": "󰈀 Wired", - "fomat-disconnected": "󱚵 Disconnected", - "tooltip-format-wifi": "{essid} ({signalStrength}%)", - "tooltip-format-ethernet": "{ifname} ", - "tooltip-format-disconnected": "Disconnected", - }, - "battery": { - "states": { - "warning": 45, - "critical": 20 - }, - "format": "{icon} {capacity}%", - "format-icons": ["󰂎", "󰁻", "󰁽", "󰁿", "󰂁", "󰁹"], - "max-length": 25, - "tooltip": false, - "on-click-right": "kitty --class floating $HOME/.config/hypr/scripts/wlan.sh", - }, - - - "tray": { - "icon-size": 18, - "spacing": 10, - }, - - "idle_inhibitor": { - "format": "{icon}", - "format-icons": { - "activated": "󰈈 ", - "deactivated": "󰈉 " - }, - }, - - "custom/separator-space": { - "format": " ", - "tooltip": false, - }, - - "custom/separator-gap": { - "format": " ", - "tooltip": false, - }, - - "custom/separator-arrow": { - "format": "  ", - "tooltip": false, - }, - - "custom/power": { - "format": "󰐥", - "on-click": "wlogout", - "tooltip": false, - }, - "custom/notification": { - "tooltip": false, - "format": "{icon}", - "format-icons": { - "notification": "󱅫 ", - "none": "󰂚 ", - "dnd-notification": "󰵙 ", - "dnd-none": "󰂛 ", - "inhibited-notification": "󱅫 ", - "inhibited-none": "󰂚 ", - "dnd-inhibited-notification": "󰵙 ", - "dnd-inhibited-none": "󰂛​ " - }, - "return-type": "json", - "exec-if": "which swaync-client", - "exec": "swaync-client -swb", - "on-click": "swaync-client -t -sw", - "on-click-right": "swaync-client -d -sw", - "escape": true - }, - - "custom/updates": { - "format": " {}", - "tooltip-format": "{}", - "escape": true, - "return-type": "json", - "restart-interval": 60, - "tooltip": false - }, + "clock": { + "format": "{:%H:%M}", + "tooltip": false + }, + "network": { + "interval": 30, + "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": "kitty --class floating $HOME/.config/hypr/scripts/wlan.sh", + "format-wifi": "󰤨 {essid}", + "format-ethernet": "󰈀 Wired", + "fomat-disconnected": "󰤯 Disconnected", + "tooltip-format-wifi": "{essid} ({signalStrength}%)", + "tooltip-format-ethernet": "{ifname} ", + "tooltip-format-disconnected": "Disconnected", + }, + "pulseaudio": { + "format": "{icon} {volume}%", + "format-bluetooth": "{icon} {volume}%", + "format-muted": " ", + "format-icons": { + "headphones": " ", + "default": [ + " ", + " " + ] + }, + "scroll-step": 5, + "on-click": "pamixer -t", + "on-click-right": "pavucontrol" + }, + "memory": { + "interval": 8, + "format": "{icon} {avail}GiB", + "format-icons": "󰝪 ", + "on-click": { + "format": "{icon} {avail}GiB/{total}GiB" + }, + }, + "cpu": { + "interval": 2, + "format": "{icon} {load}%", + "format-icons": " " + }, + "battery": { + "states": { + "good": 95, + "warning": 30, + "critical": 15 + }, + "format": "{icon} {capacity}%", + "format-icons": [ + "", + "", + "", + "", + "" + ] + }, + "disk": { + "interval": 32, + "format": "Disk {percentage_used:2}%", + "path": "/" + }, + "tray": { + "icon-size": 20, + "spacing": 10 + }, + "custom/power": { + "format": "⏼", + "on-click": "wlogout" + }, + "css-name": "style.css" } diff --git a/config.save b/config.save deleted file mode 100644 index 0c31c56..0000000 --- a/config.save +++ /dev/null @@ -1,152 +0,0 @@ -{ - "layer": "top", - "position": "top", - "spacing": 4, - "margin-top": 5, - "margin-bottom": 0, - "margin-left": 5, - "margin-right": 5, - - "modules-left": [ - "custom/icon", - "custom/separator-gap", - "cpu", - "memory", - "temperature", - "custom/separator-arrow", - "hyprland/window", - ], - - "modules-center": [ - "hyprland/workspaces", - ], - - "modules-right": [ - "backlight", - "pulseaudio", - "network", - "battery", - "tray", - "custom/separator-dot", - "clock", - "custom/power", - ], - - "custom/icon": { - "format": "󰣇" - }, - - "cpu": { - "interval": 10, - "format": " {usage}%", - "max-length": 10, - "tooltip": false - }, - - "memory": { - "interval": 30, - "format": " {used}GiB", - "format-alt": " {used:0.1f}G", - "max-length": 10 - }, - - "temperature": { - "format": " {temperatureF}°F" - }, - - "hyprland/window": { - "format": " {}", - "rewrite": { - "(.*) - NVIM": " NeoVim", - "(.*) — Mozilla Firefox": "󰈹 Mozilla Firefox", - } - }, - - "hyprland/workspaces": { - "all-outputs": true, - "format": "{icon}", - "format-icons": { - "1": "", - "2": "", - "3": "", - "urgent": "", - "active": "", - "default": "" - } - }, - - "backlight": { - "format": "{icon} {percent}", - "format-icons": ["󰃟", "󰃠"], - "tooltip": false, - }, - - "pulseaudio": { - "format": "{icon} {volume}", - "format-bluetooth": "{icon}  {volume}%", - "format-bluetooth-muted": "󰝟 ", - "format-muted": " 󰝟 ", - "format-icons": { - "headph": "", - "default": ["󰝟 ", ""], - }, - "tooltip": false, - "on-click": "pavucontrol", - }, - - "network": { - "interval": 30, - "format-wifi": "󰖩 {essid}", - "format-ethernet": "󰈀 Wired", - "fomat-disconnected": "󱚵 Disconnected", - "tooltip-format-wifi": "{essid} ({signalStrength}%)", - "tooltip-format-ethernet": "{ifname} ", - "tooltip-format-disconnected": "Disconnected", - }, - - "battery": { - "states": { - "warning": 30, - "critical": 15 - }, - "format": "{icon} {capacity}%", - "format-icons": [" ", " ", " ", " ", " "], - "max-length": 25, - "tooltip": false, - }, - - "tray": { - "icon-size": 20, - "spacing": 10, - }, - - "custom/separator-dot": { - "format": "  ", - "tooltip": false, - "on-click": "$HOME/.config/hypr/scripts/random-wallpaper" - }, - - "custom/separator-gap": { - "format": " ", - "tooltip": false, - }, - - "custom/separator-arrow": { - "format": "  ", - "tooltip": false, - }, - - "custom/spotify": { - "exec": "/usr/bin/python3 $HOME/.config/waybar/custom-scripts/mediaplayer.py --player spotify --verbose", - "format": "{} ", - "return-type": "json", - "on-click": "playerctl play-pause", - "on-scroll-up": "playerctl next", - "on-scroll-down": "playerctl previous" - }, - "custom/power": { - "format": "", - "on-click": "~/.config/rofi/bin/powermenu", - "tooltip": false, - }, -} diff --git a/config.save.1 b/config.save.1 deleted file mode 100644 index 6d31d6e..0000000 --- a/config.save.1 +++ /dev/null @@ -1,170 +0,0 @@ -{ - "layer": "top", - "position": "top", - "spacing": 4, - "margin-top": 5, - "margin-bottom": 0, - "margin-left": 5, - "margin-right": 5, - - "modules-left": [ - "custom/icon", - "clock", - "custom/spotify", - ], - - "modules-center": [ - "hyprland/window", - "custom/separator-arrow", - "hyprland/workspaces", - ], - - "modules-right": [ - "backlight", - "pulseaudio", - "network", - "battery", - "tray", - "custom/power", - ], - - "custom/icon": { - "format": "󰣇", - "on-click": "~/.config/rofi/bin/launcher", - "tooltip": false - }, - - "cpu": { - "interval": 10, - "format": " {usage}%", - "max-length": 10, - "tooltip": false - }, - - clock": { - "format": "{: %d-%m-24  %H:%M}", - //"format": "{:%a}", - "tooltip-format": "{calendar}", - "calendar": { - "mode" : "month", - "format": { - "months": "{}", - "days": "{}", - "weeks": "W{}", - "weekdays": "{}", - "today": "{}" - } - }, - }, - - "memory": { - "interval": 30, - "format": " {used}GiB", - "format-alt": " {used:0.1f}G", - "max-length": 10 - }, - - "temperature": { - "format": " {temperatureF}°F" - }, - - "hyprland/window": { - "format": " {}", - "rewrite": { - "(.*) - NVIM": " NeoVim", - "(.*) — Mozilla Firefox": "󰈹 Mozilla Firefox", - " ": "󰇄 Desktop", - "(.*) Spotify Free": "󰓇 Spotify", - "(.*) Spotify": "󰓇 Spotify", - " ~": " l6174@Radon", - "(.*) - Obsidian(.*)": "󱓧 Obsidian", - } - }, - - "hyprland/workspaces": { - "all-outputs": true, - "format": "{icon}", - "format-icons": { - "1": "", - "2": "", - "3": "", - "urgent": "", - "active": "", - "default": "" - } - }, - - "backlight": { - "format": "{icon} {percent}", - "format-icons": ["󰃟", "󰃠"], - "tooltip": false, - }, - - "pulseaudio": { - "format": "{icon} {volume}", - "format-bluetooth": "{icon}  {volume}%", - "format-bluetooth-muted": "󰝟 ", - "format-muted": " 󰝟 ", - "format-icons": { - "headset": "", - "default": ["", ""], - }, - "tooltip": false, - "on-click": "pavucontrol", - }, - - "network": { - "interval": 30, - "format-wifi": "󰖩 {essid}", - "format-ethernet": "󰈀 Wired", - "fomat-disconnected": "󱚵 Disconnected", - "tooltip-format-wifi": "{essid} ({signalStrength}%)", - "tooltip-format-ethernet": "{ifname} ", - "tooltip-format-disconnected": "Disconnected", - }, - "battery": { - "states": { - "warning": 30, - "critical": 15 - }, - "format": "{icon} {capacity}%", - "format-icons": [" ", " ", " ", " ", " "], - "max-length": 25, - "tooltip": false, - }, - - "tray": { - "icon-size": 20, - "spacing": 10, - }, - - "custom/separator-dot": { - "format": "  ", - "tooltip": false, - "on-click": "$HOME/.config/hypr/scripts/random-wallpaper" - }, - - "custom/separator-gap": { - "format": " ", - "tooltip": false, - }, - - "custom/separator-arrow": { - "format": "  ", - "tooltip": false, - }, - - "custom/spotify": { - "exec": "/usr/bin/python3 $HOME/.config/waybar/custom-scripts/mediaplayer.py --player spotify --verbose", - "format": " {}  ", - "return-type": "json", - "on-click": "playerctl play-pause", - "on-scroll-up": "playerctl next", - "on-scroll-down": "playerctl previous" - }, - "custom/power": { - "format": "󰐥", - "on-click": "~/.config/rofi/bin/powermenu", - "tooltip": false, - }, -} diff --git a/config.save.2 b/config.save.2 deleted file mode 100644 index effd104..0000000 --- a/config.save.2 +++ /dev/null @@ -1,207 +0,0 @@ -{ - "layer": "top", - "position": "top", - "spacing": 4, - "margin-top": 5, - "margin-bottom": 0, - "margin-left": 5, - "margin-right": 5, - - "modules-left": [ - "custom/icon", - "custom/separator-space", - "hyprland/workspaces", - "custom/spotify",2 - "custom/separator-arrow", - "hyprland/window", - ], - - "modules-center": [ - "clock" - ], - - "modules-right": [ - "backlight", - "pulseaudio", - "network", - "battery", - "tray", - "custom/inhibitor", - "custom/notification", - "custom/power", - ], - - "custom/icon": { - "format": "󰣇", - "on-click": "~/.config/rofi/bin/launcher", - "tooltip": false - }, - - "cpu": { - "interval": 10, - "format": " {usage}%", - "max-length": 10, - "tooltip": false - }, - - "clock": { - "format": "󰥔 {:%H:%M 󰃭 %d/%m} ", - //"format": "{:%a}", - "tooltip-format": "{calendar}", - "calendar": { - "mode" : "month", - "format": { - "months": "{}", - "days": "{}", - "weeks": "W{}", - "weekdays": "{}", - "today": "{}" - } - }, - }, - - "memory": { - "interval": 30, - "format": " {used}GiB", - "format-alt": " {used:0.1f}G", - "max-length": 10 - }, - - "temperature": { - "format": " {temperatureF}°F" - }, - - "hyprland/window": { - "format": " {}", - "rewrite": { - "(.*) - NVIM": " NeoVim", - "(.*) — Mozilla Firefox": "󰈹 Firefox", - " ": "󰇄 Desktop", - "(.*) Spotify Free": "󰓇 Spotify", - "(.*) Spotify": "󰓇 Spotify", - " ~": " l6174@Radon", - "(.*) - Obsidian(.*)": "󱓧 Obsidian", - } - }, - - "hyprland/workspaces": { - "all-outputs": false, - "format": "{icon}", - "format-icons": { - "urgent": " ", - "persistent": " ", - "active": " ", - "empty": " " - }, - "persistent-workspaces": { - "1": [], - "2": [], - "3": [], - "4": [] - } - }, - - "backlight": { - "format": "{icon} {percent}", - "format-icons": ["󰃞", "󰃟", "󰃠"], - "tooltip": false, - }, - - "pulseaudio": { - "format": "{icon} {volume}", - "format-bluetooth": "{icon}  {volume}%", - "format-bluetooth-muted": "󰝟 ", - "format-muted": " 󰝟 ", - "format-icons": { - "headset": "", - "default": ["󰕿", "󰖀", "󰕾"], - }, - "tooltip": false, - "on-click": "pavucontrol", - }, - - "network": { - "interval": 30, - "format-wifi": "󰤨 {essid}", - "format-ethernet": "󰈀 Wired", - "fomat-disconnected": "󱚵 Disconnected", - "tooltip-format-wifi": "{essid} ({signalStrength}%)", - "tooltip-format-ethernet": "{ifname} ", - "tooltip-format-disconnected": "Disconnected", - }, - "battery": { - "states": { - "warning": 30, - "critical": 15 - }, - "format": "{icon} {capacity}%", - "format-icons": ["󰂎", "󰁻", "󰁽", "󰁿", "󰂁", "󰁹"], - "max-length": 25, - "tooltip": false, - }, - - "tray": { - "icon-size": 20, - "spacing": 10, - }, - - "custom/inhibitor": { - "exec": "~/.local/bin/waybar-inhibitor", - "interval": 5, - "return-type": "json", - "tooltip": true, - "on-click": "~/.local/bin/inhibitor", - "signal": 10 - }, - - - "custom/separator-dot": { - "format": "  ", - "tooltip": false, - "on-click": "$HOME/.config/hypr/scripts/random-wallpaper" - }, - - "custom/separator-gap": { - "format": " ", - "tooltip": false, - }, - - "custom/separator-arrow": { - "format": "  ", - "tooltip": false, - }, - - "custom/spotify": { - "exec": "/usr/bin/python3 $HOME/.config/waybar/custom-scripts/mediaplayer.py --player spotify --verbose", - "format": " {}  ", - "return-type": "json", - "on-click": "playerctl play-pause", - "on-scroll-up": "playerctl next", - "on-scroll-down": "playerctl previous" - }, - "custom/power": { - "format": "󰐥", - "on-click": "~/.config/rofi/bin/powermenu", - "tooltip": false, - }, - "custom/notification": { - "tooltip": false, - "format": "{icon}", - "format-icons": { - "notification": "󱅫 ", - "none": "󰂚 ", - "dnd-notification": "󰵙 ", - "dnd-none": "󰂛 ", - "inhibited-notification": "󱅫 ", - "inhibited-none": "󰂚 ", - "dnd-inhibited-notification": "󰵙 ", - "dnd-inhibited-none": "󰂛​ " - }, - "return-type": "json", - "exec-if": "which swaync-client", - "exec": "swaync-client -swb", - "on-click": "swaync-client -t -sw", - "on-click-right": "swaync-client -d -sw", - "escape": true - }, -} diff --git a/custom-scripts/mediaplayer.py b/custom-scripts/mediaplayer.py deleted file mode 100644 index 3da53e9..0000000 --- a/custom-scripts/mediaplayer.py +++ /dev/null @@ -1,179 +0,0 @@ -#!/usr/bin/env python3 -import gi -gi.require_version("Playerctl", "2.0") -from gi.repository import Playerctl, GLib -from gi.repository.Playerctl import Player -import argparse -import logging -import sys -import signal -import gi -import json -import os -from typing import List - -logger = logging.getLogger(__name__) - -def signal_handler(sig, frame): - logger.info("Received signal to stop, exiting") - sys.stdout.write("\n") - sys.stdout.flush() - # loop.quit() - sys.exit(0) - - -class PlayerManager: - def __init__(self, selected_player=None): - self.manager = Playerctl.PlayerManager() - self.loop = GLib.MainLoop() - self.manager.connect( - "name-appeared", lambda *args: self.on_player_appeared(*args)) - self.manager.connect( - "player-vanished", lambda *args: self.on_player_vanished(*args)) - - signal.signal(signal.SIGINT, signal_handler) - signal.signal(signal.SIGTERM, signal_handler) - signal.signal(signal.SIGPIPE, signal.SIG_DFL) - self.selected_player = selected_player - - self.init_players() - - def init_players(self): - for player in self.manager.props.player_names: - if self.selected_player is not None and self.selected_player != player.name: - logger.debug(f"{player.name} is not the filtered player, skipping it") - continue - self.init_player(player) - - def run(self): - logger.info("Starting main loop") - self.loop.run() - - def init_player(self, player): - logger.info(f"Initialize new player: {player.name}") - player = Playerctl.Player.new_from_name(player) - player.connect("playback-status", - self.on_playback_status_changed, None) - player.connect("metadata", self.on_metadata_changed, None) - self.manager.manage_player(player) - self.on_metadata_changed(player, player.props.metadata) - - def get_players(self) -> List[Player]: - return self.manager.props.players - - def write_output(self, text, player): - logger.debug(f"Writing output: {text}") - - 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 clear_output(self): - sys.stdout.write("\n") - sys.stdout.flush() - - def on_playback_status_changed(self, player, status, _=None): - logger.debug(f"Playback status changed for player {player.props.player_name}: {status}") - self.on_metadata_changed(player, player.props.metadata) - - def get_first_playing_player(self): - players = self.get_players() - logger.debug(f"Getting first playing player from {len(players)} players") - if len(players) > 0: - # if any are playing, show the first one that is playing - # reverse order, so that the most recently added ones are preferred - for player in players[::-1]: - if player.props.status == "Playing": - return player - # if none are playing, show the first one - return players[0] - else: - logger.debug("No players found") - return None - - def show_most_important_player(self): - logger.debug("Showing most important player") - # show the currently playing player - # or else show the first paused player - # or else show nothing - current_player = self.get_first_playing_player() - if current_player is not None: - self.on_metadata_changed(current_player, current_player.props.metadata) - else: - self.clear_output() - - def on_metadata_changed(self, player, metadata, _=None): - logger.debug(f"Metadata changed for player {player.props.player_name}") - player_name = player.props.player_name - title = player.get_title() - - track_info = "" - if player_name == "spotify" and "mpris:trackid" in metadata.keys() and ":ad:" in player.props.metadata["mpris:trackid"]: - track_info = "Advertisement" - else: - track_info = title - - if track_info: - if player.props.status == "Playing": - track_info = " " + track_info - else: - track_info = " " + track_info - # only print output if no other player is playing - current_playing = self.get_first_playing_player() - if current_playing is None or current_playing.props.player_name == player.props.player_name: - self.write_output(track_info, player) - else: - logger.debug(f"Other player {current_playing.props.player_name} is playing, skipping") - - def on_player_appeared(self, _, player): - logger.info(f"Player has appeared: {player.name}") - if player is not None and (self.selected_player is None or player.name == self.selected_player): - self.init_player(player) - else: - logger.debug( - "New player appeared, but it's not the selected player, skipping") - - def on_player_vanished(self, _, player): - logger.info(f"Player {player.props.player_name} has vanished") - self.show_most_important_player() - -def parse_arguments(): - parser = argparse.ArgumentParser() - - # Increase verbosity with every occurrence of -v - parser.add_argument("-v", "--verbose", action="count", default=0) - - # Define for which player we"re listening - parser.add_argument("--player") - - parser.add_argument("--enable-logging", action="store_true") - - return parser.parse_args() - - -def main(): - arguments = parse_arguments() - - # Initialize logging - if arguments.enable_logging: - logfile = os.path.join(os.path.dirname( - os.path.realpath(__file__)), "media-player.log") - logging.basicConfig(filename=logfile, level=logging.DEBUG, - format="%(asctime)s %(name)s %(levelname)s:%(lineno)d %(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)) - - logger.info("Creating player manager") - if arguments.player: - logger.info(f"Filtering for player: {arguments.player}") - player = PlayerManager(arguments.player) - player.run() - - -if __name__ == "__main__": - main() diff --git a/custom-scripts/update b/custom-scripts/update deleted file mode 100755 index 61a35dc..0000000 --- a/custom-scripts/update +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -sleep 1 -figlet "Update" -sleep 0.5 -echo "." -sleep 0.5 -echo "." -sleep 0.5 -echo "." -sleep 0.5 -arch-update diff --git a/custom-scripts/updates b/custom-scripts/updates deleted file mode 100755 index b6b0be5..0000000 --- a/custom-scripts/updates +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/bash -# _ _ _ _ -# | | | |_ __ __| | __ _| |_ ___ ___ -# | | | | '_ \ / _` |/ _` | __/ _ \/ __| -# | |_| | |_) | (_| | (_| | || __/\__ \ -# \___/| .__/ \__,_|\__,_|\__\___||___/ -# |_| -# -# by Stephan Raabe (2023) -# ----------------------------------------------------- - -# ----------------------------------------------------- -# Define threshholds for color indicators -# ----------------------------------------------------- - -threshhold_green=0 -threshhold_yellow=25 -threshhold_red=100 - -# ----------------------------------------------------- -# Calculate available updates pacman and aur (with aur) -# ----------------------------------------------------- - -if ! updates_arch=$(checkupdates 2> /dev/null | wc -l ); then - updates_arch=0 -fi - -if ! updates_aur=$(paru -Qua | wc -l); then - updates_aur=0 -fi - -updates=$(("$updates_arch" + "$updates_aur")) - -# ----------------------------------------------------- -# Testing -# ----------------------------------------------------- - -# Overwrite updates with numbers for testing -# updates=50 - -# test JSON output -# printf '{"text": "0", "alt": "0", "tooltip": "0 Updates", "class": "red"}' -# exit - -# ----------------------------------------------------- -# Output in JSON format for Waybar Module custom-updates -# ----------------------------------------------------- - -css_class="green" - -if [ "$updates" -gt $threshhold_yellow ]; then - css_class="yellow" -fi - -if [ "$updates" -gt $threshhold_red ]; then - css_class="red" -fi - -if [ "$updates" -gt $threshhold_green ]; then - printf '{"text": "%s", "alt": "%s", "tooltip": "%s Updates", "class": "%s"}' "$updates" "$updates" "$updates" "$css_class" -else - printf '{"text": "0", "alt": "0", "tooltip": "0 Updates", "class": "green"}' -fi diff --git a/mocha.css b/mocha.css deleted file mode 100644 index 98e218a..0000000 --- a/mocha.css +++ /dev/null @@ -1,37 +0,0 @@ -/* -* -* Catppuccin Mocha palette -* Maintainer: rubyowo -* -*/ - -@define-color base #1e1e2e; -@define-color mantle #181825; -@define-color crust #11111b; - -@define-color text #cdd6f4; -@define-color subtext0 #a6adc8; -@define-color subtext1 #bac2de; - -@define-color surface0 #313244; -@define-color surface1 #45475a; -@define-color surface2 #585b70; - -@define-color overlay0 #6c7086; -@define-color overlay1 #7f849c; -@define-color overlay2 #9399b2; - -@define-color blue #89b4fa; -@define-color lavender #b4befe; -@define-color sapphire #74c7ec; -@define-color sky #89dceb; -@define-color teal #94e2d5; -@define-color green #a6e3a1; -@define-color yellow #f9e2af; -@define-color peach #fab387; -@define-color maroon #eba0ac; -@define-color red #f38ba8; -@define-color mauve #cba6f7; -@define-color pink #f5c2e7; -@define-color flamingo #f2cdcd; -@define-color rosewater #f5e0dc; diff --git a/pywal_style.css b/pywal_style.css deleted file mode 100644 index 8d08a59..0000000 --- a/pywal_style.css +++ /dev/null @@ -1,204 +0,0 @@ -@import "pywal.css"; -@import "mocha.css"; - -* { - padding: 0px; - margin: 0px; - font-family: "Rubik", "JetBrains Mono Nerd Font"; - font-size: 12px; - font-weight: bold; -} - -/* ------ Set a Uniform Border Radius ------ */ -.modules-left, .modules-center, .modules-right, #cpu, #memory, #temperature, #pulseaudio, #backlight, #custom-spotify, #custom-icon, #custom-updates, #network, #battery, #tray, #idle_inhibitor, #custom-power, #custom-notification { - border-radius: 6px; -} - -/* ------ Modules Left ------ */ -.modules-left { - background-color: @base; - padding-right: 5px; - padding-left: 5px; -} - -/* ------ Modules Center ------ */ -.modules-center { - background-color: @base; - padding-right: 5px; - padding-left: 5px; -} - -/* ------ Modules Right ------ */ -.modules-right { - background-color: @base; - padding-right: 5px; - padding-left: 5px; -} - -/* ------ Cpu Usage, Temperature, and Memory ------ */ -#cpu, #temperature, #memory { - background-color: @surface0; - padding: 4px 4px; - margin: 4px 4px; - font-size: 12px; -} - -#cpu { color: @peach; } -#memory { color: @mauve; } -#temperature { color: @maroon; } - -/* ------ Window Title ------ */ -#window { - color: @color7; - padding-right: 4px; -} - -window#waybar { - background-color: rgba(0, 0, 0, 0); - /* border-bottom: 0px solid #ffffff; */ - /* color: #FFFFFF; */ - background: transparent; - transition-property: background-color; - transition-duration: .5s; -} - -/* ----------------------------------------------------- -* Workspaces -* ----------------------------------------------------- */ - -#workspaces button.empty { - color: @color2; - font-family: JetBrainsMono Nerd Font; -} - -#workspaces { - margin: 0px 1px 0px 1px; - padding: 0px 1px; - font-family: JetBrainsMono Nerd Font; -} - -#workspaces button { - padding: 0px 2px; - margin: 4px 2px; - color: @color7; - font-family: JetBrainsMono Nerd Font; -} - -#workspaces button:hover { - opacity:0.5; - color: @color3; -} - -/* ------ Pulseaudio ------ */ -#pulseaudio { - color: @peach; - background-color: @surface0; - padding: 2px 5px; - margin: 4px 2px; -} - -/* ------ Backlight ------ */ -#backlight { - color: @surface1; - background-color: @surface0; - padding: 2px 5px; - margin: 4px 2px; -} - -/* ------ Network ------ */ -#network { - color: @mauve; - background-color: @surface0; - padding: 2px 5px; - margin: 4px 2px; -} - -/* ------ Battery ------ */ -#battery { - color: @maroon; - background-color: @surface0; - padding: 2px 5px; - margin: 4px 2px; -} - -/* ------ Clock ------ */ -#clock { - padding-left: 10px; - color: @color7; - font-weight: bold; - font-size: 13px; -} - -/* ------ System Tray ------ */ -#tray { - background-color: @surface0; - padding: 2px 5px; - margin: 4px 2px; -} - -/* ------ Custom Modules ------ */ -#custom-icon { - font-size: 18px; - color: @color2; - padding-right: 5px; -} - -#custom-separator-arrow { - font-size: 14px; - color: @text; -} - -#custom-separator-dot { - font-size: 15px; - color: @text; -} - -#custom-spotify { - color: @mauve; - background-color: @surface0; - padding: 2px 9px; - margin: 4px 2px; -} -#custom-power { - color: @red; - background-color: @surface0; - padding: 2px 9px; - margin: 4px 2px; - font-size: 15px; -} - -#idle_inhibitor { - color: @green; - background-color: @surface0; - padding: 2px 9px; - margin: 4px 2px; - font-size: 15px; -} - -#custom-updates { - padding: 2px 8px; - margin: 4px 4px; - background-color: @surface0; -} -#custom-updates.green { - color: @text; -} -#custom-updates.yellow { - color: @peach; -} -#custom-updates.red { - color: @red; -} - -#custom-notification { - color: @teal; - background-color: @surface0; - padding: 2px 9px; - margin: 4px 2px; - font-size: 15px; -} - -tooltip { - background: @base; - border: 1px solid @blue; -} diff --git a/style.css b/style.css index 72df28e..0b3d70a 100644 --- a/style.css +++ b/style.css @@ -1,203 +1,171 @@ -@import "mocha.css"; - * { - padding: 0px; - margin: 0px; - font-family: "Rubik", "JetBrains Mono Nerd Font"; - font-size: 12px; - font-weight: bold; + font-size: 1rem; + font-family: Rubik, iMWritingMono Nerd Font; } - -/* ------ Set a Uniform Border Radius ------ */ -.modules-left, .modules-center, .modules-right, #cpu, #memory, #temperature, #pulseaudio, #backlight, #custom-spotify, #custom-icon, #custom-updates, #network, #battery, #tray, #idle_inhibitor, #custom-power, #custom-notification { - border-radius: 6px; +@keyframes urgent-workspace { +from { + color: yellow; } - -/* ------ Modules Left ------ */ -.modules-left { - background-color: @base; - padding-right: 5px; - padding-left: 5px; +to { + color: red; } - -/* ------ Modules Center ------ */ -.modules-center { - background-color: @base; - padding-right: 5px; - padding-left: 5px; } - -/* ------ Modules Right ------ */ -.modules-right { - background-color: @base; - padding-right: 5px; - padding-left: 5px; +@keyframes border-expand { +0% { + border-top: none; + border-left: none; + border-right: none; + border-bottom: solid 2px currentcolor; + border-radius: 100px; } - -/* ------ Cpu Usage, Temperature, and Memory ------ */ -#cpu, #temperature, #memory { - background-color: @surface0; - padding: 4px 4px; - margin: 4px 4px; - font-size: 12px; +33% { + border-top: none; + border-left: solid 2px currentcolor; + border-right: solid 2px currentcolor; + border-bottom: solid 2px currentcolor; + border-radius: 66px; } - -#cpu { color: @peach; } -#memory { color: @mauve; } -#temperature { color: @maroon; } - -/* ------ Window Title ------ */ -#window { - color: @color7; - padding-right: 4px; +66% { + border-top: solid 2px currentcolor; + border-left: solid 2px currentcolor; + border-right: solid 2px currentcolor; + border-bottom: none; + border-radius: 33px; +} +to { + border-top: solid 2px currentcolor; + border-radius: 0; + /* border-radius: 0rem 0rem 1rem 1rem; */ +} +} +tooltip { + border: solid 2px currentcolor; + background: black; + color: white; +} +#p_info, +#info { + border-top: solid 1px #9649cd; + color: #9649cd; + transition: 650ms; +} +#p_info, +#info:hover { + border-bottom: solid 2px #9649cd; + border-top: none; + transition: 150ms; } window#waybar { - background-color: rgba(0, 0, 0, 0); - /* border-bottom: 0px solid #ffffff; */ - /* color: #FFFFFF; */ - background: transparent; - transition-property: background-color; - transition-duration: .5s; + border-top: solid 1px transparent; + background: transparent; + opacity: 0.7; + /* background: rgba(153, 153, 153, 0.3); */ + color: white; } - -/* ----------------------------------------------------- -* Workspaces -* ----------------------------------------------------- */ - -#workspaces button.empty { - color: @lavender; - font-family: JetBrainsMono Nerd Font; +window#waybar.empty { + opacity: 1.125; } - -#workspaces { - margin: 0px 1px 0px 1px; - padding: 0px 1px; - font-family: JetBrainsMono Nerd Font; +window#waybar.fullscreen { + border: solid 2px #d70947; + opacity: 1.0; +} +#window { + padding: 2px; + margin: 4px 4px 0; + color: #fdf6e3; + font-weight: 600; + border-top: solid 1px transparent; + transition: 2s; } #workspaces button { - padding: 0px 2px; - margin: 4px 2px; - color: @mauve; - font-family: JetBrainsMono Nerd Font; + border-top: solid 2px currentcolor; + border-right: solid 2px currentcolor; + margin-top: 4px; + padding: 0; + transition: 200ms; + /* transition: transform 0.4s; */ + border-radius: 0; +} +#workspaces button.empty { + opacity: 0.4; +} +#workspaces button.active { + color: #e44cdf; + padding: 0 10px; + margin-top: 0; + border-right: solid 2px currentcolor; + /* transition: translateY(0.75rem) 400ms; */ +} +#workspaces button.urgent { + color: red; + animation: urgent-workspace ease-out 2s infinite; } -#workspaces button:hover { - opacity:0.5; - color: @blue; -} - -/* ------ Pulseaudio ------ */ #pulseaudio { - color: @peach; - background-color: @surface0; - padding: 2px 5px; - margin: 4px 2px; + color: #cbb643; } - -/* ------ Backlight ------ */ -#backlight { - color: @sky; - background-color: @surface0; - padding: 2px 5px; - margin: 4px 2px; +/* #memory { */ +/* color: #740cbe; */ +/* } */ +#cpu { + color: #a70a3c; } - -/* ------ Network ------ */ -#network { - color: @mauve; - background-color: @surface0; - padding: 2px 5px; - margin: 4px 2px; -} - -/* ------ Battery ------ */ #battery { - color: @maroon; - background-color: @surface0; - padding: 2px 5px; - margin: 4px 2px; + color: #859900; } - -/* ------ Clock ------ */ -#clock { - padding-left: 10px; - color: @red; - font-weight: bold; - font-size: 13px; +#network { + color: #1E90FF; } - -/* ------ System Tray ------ */ -#tray { - background-color: @surface0; - padding: 2px 5px; - margin: 4px 2px; -} - -/* ------ Custom Modules ------ */ -#custom-icon { - font-size: 18px; - color: @teal; - padding-right: 5px; -} - -#custom-separator-arrow { - font-size: 14px; - color: @text; -} - -#custom-separator-dot { - font-size: 15px; - color: @text; -} - -#custom-spotify { - color: @mauve; - background-color: @surface0; - padding: 2px 9px; - margin: 4px 2px; +#disk { + color: #b58900; } +#custom-reboot, +#custom-quit, +#custom-lock, +#custom-powerm, #custom-power { - color: @red; - background-color: @surface0; - padding: 2px 9px; - margin: 4px 2px; - font-size: 15px; + padding: 0.2rem 1rem; + font-weight: 600; + border-top: solid 1px currentcolor; + transition: 350ms; +} +#custom-reboot:hover, +#custom-quit:hover, +#custom-powerm:hover, +#custom-lock:hover, +#custom-power:hover { + border-top: solid 2px red; + transition: 250ms; + /* border-radius: 2rem; */ + font-size: 1.5rem; } -#idle_inhibitor { - color: @green; - background-color: @surface0; - padding: 2px 9px; - margin: 4px 2px; - font-size: 15px; +#pulseaudio, +#memory, +#cpu, +#battery, +#disk, +#clock, +#network, +#not-power, +#tray { + padding: 6px; + margin: 0px 4px 0; + font-weight: 600; + border-top: solid 2px transparent; + transition: 550ms; } -#custom-updates { - padding: 2px 8px; - margin: 4px 4px; - background-color: @surface0; -} -#custom-updates.green { - color: @text; -} -#custom-updates.yellow { - color: @peach; -} -#custom-updates.red { - color: @red; +#pulseaudio:hover, +#memory:hover, +#cpu:hover, +#battery:hover, +#network:hover, +#disk:hover, +#clock:hover { + border-top: solid 2px currentcolor; + transition: 250ms; } -#custom-notification { - color: @teal; - background-color: @surface0; - padding: 2px 9px; - margin: 4px 2px; - font-size: 15px; -} - -tooltip { - background: @base; - border: 1px solid @blue; -} From 95a725957e1823e658dffd2a9b619b8262cbac5a Mon Sep 17 00:00:00 2001 From: pika Date: Mon, 10 Jun 2024 12:22:51 +0200 Subject: [PATCH 2/3] addet new config --- config | 91 ++++++++++++++++++++++++++++++-------------- style.css | 110 +++++++++++++++++++++++++++++++----------------------- 2 files changed, 126 insertions(+), 75 deletions(-) diff --git a/config b/config index 6dd2df6..d593bc6 100644 --- a/config +++ b/config @@ -3,12 +3,15 @@ { "layer": "top", "position": "top", - "margin": 0, + "margin-left": 4, + "margin-right": 4, + "margin-top": 0, + "margin-bottom": 0, "spacing": 4, "modules-left": ["hyprland/workspaces","hyprland/window"], - "modules-center": ["clock","tray"], + "modules-center": ["group/weather","tray"], "modules-right": ["pulseaudio","battery","network","group/info","group/power"], @@ -22,37 +25,41 @@ "modules": [ "custom/power", // First element is the "group leader" and won't ever be hidden "custom/powerm", + "custom/reboot", "custom/quit", "custom/lock", - "custom/reboot", ] }, "custom/quit": { "format": "󰗼", - "tooltip": false, + "tooltip": true, + "tooltip-format": "terminate session", "on-click": "hyprctl dispatch exit" }, "custom/lock": { "format": "󰍁", - "tooltip": false, - "on-click": "swaylock" + "tooltip": true, + "tooltip-format": "screenlock", + "on-click": "swaylock --screenshots --clock --indicator --effect-pixelate 18 --effect-blur 8x8" }, "custom/reboot": { "format": "󰜉", - "tooltip": false, + "tooltip": true, + "tooltip-format": "reboot", "on-click": "reboot" }, "custom/powerm": { "format": "", - "tooltip": false, - "on-click": "shutdown now" + "tooltip": true, + "tooltip-format": "shutdown!", + "on-click": "sudo systemctl shutdown now" }, "group/info": { "orientation": "inherit", "drawer": { - "children-class": "info", - "parent-class": "p_info", - "transition-left-to-right": false, + "children-class": "group-info", + "parent-class": "group-p-info", + "transition-left-to-right": true, }, "modules": [ "memory", "disk", "cpu" @@ -68,6 +75,7 @@ "2": "󰁕", "3": "󰁕", "4": "󰁕", + "5": "󰁕", "urgent": "󰊰", "active": "󰢚", "special": "󰮯", @@ -75,33 +83,60 @@ }, "window-rewrite-default": "", "window-rewrite": { - "nvim": " ", - "foot": " ", - "Thorium": "󰊯 ", - "mercury": " ", - "title<.*youtube.*>": " ", + "foot class": " ", + "foot": "", + "thorium": "󰊯", + "class": "󰝰", + "mercury":"", + "VSCodium": "", + "title": "", + "balenaEtcher": "󱊞", + "title<.*youtube.*>": "", "title<*netflix.*>": "󰝆", + "title": "", + "title": "󰓓", + "title": "󰓓", "Invidious": " ", "class title<.*github.*>": "", // Windows whose class is "firefox" and title contains "github". Note that "class" always comes first. }, }, "hyprland/window": { - "format": " {}", + "format": " {title}", "rewrite": { - "(.*) — Mozilla Firefox": "🌎 $1", + "~*": " $1", + "(.*) — ~/*": " $1" }, "separate-outputs": false }, + "group/weather": { + "orientation": "inherit", + "drawer": { + "transition-duration": 500, + "children-class": "group-weather", + "transition-left-to-right": false, + }, + "modules": [ + "clock", + "custom/weather" + ] + }, "clock": { "format": "{:%H:%M}", - "tooltip": false + "tooltip": true + }, + "custom/weather": { + "format": "{}°", + "tooltip": true, + "interval": 3600, + "exec": "wttrbar", + "return-type": "json" }, "network": { "interval": 30, "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": "kitty --class floating $HOME/.config/hypr/scripts/wlan.sh", + "on-click-right": "foot $HOME/.config/hypr/scripts/wlan.sh", "format-wifi": "󰤨 {essid}", "format-ethernet": "󰈀 Wired", "fomat-disconnected": "󰤯 Disconnected", @@ -110,7 +145,7 @@ "tooltip-format-disconnected": "Disconnected", }, "pulseaudio": { - "format": "{icon} {volume}%", + "format": "{icon} {volume}%", "format-bluetooth": "{icon} {volume}%", "format-muted": " ", "format-icons": { @@ -145,11 +180,11 @@ }, "format": "{icon} {capacity}%", "format-icons": [ - "", - "", - "", - "", - "" + "󰁺", + "󰁼", + "󰁿", + "󰂁", + "󰁹" ] }, "disk": { @@ -162,7 +197,7 @@ "spacing": 10 }, "custom/power": { - "format": "⏼", + "format": "⏼ ", "on-click": "wlogout" }, "css-name": "style.css" diff --git a/style.css b/style.css index 0b3d70a..979f492 100644 --- a/style.css +++ b/style.css @@ -4,22 +4,25 @@ } @keyframes urgent-workspace { from { - color: yellow; + color: white; +} +75% { + color: red; } to { - color: red; + color: white; } } @keyframes border-expand { 0% { - border-top: none; - border-left: none; - border-right: none; + border-top: transparent; + border-left: transparent; + border-right: transparent; border-bottom: solid 2px currentcolor; border-radius: 100px; } 33% { - border-top: none; + border-top: transparent; border-left: solid 2px currentcolor; border-right: solid 2px currentcolor; border-bottom: solid 2px currentcolor; @@ -29,7 +32,7 @@ to { border-top: solid 2px currentcolor; border-left: solid 2px currentcolor; border-right: solid 2px currentcolor; - border-bottom: none; + border-bottom: transparent; border-radius: 33px; } to { @@ -43,72 +46,80 @@ tooltip { background: black; color: white; } -#p_info, +#p-info, +#weather, #info { - border-top: solid 1px #9649cd; - color: #9649cd; + border-top: solid 1px currentcolor; transition: 650ms; } -#p_info, +#p-info:hover, +#weather:hover, #info:hover { - border-bottom: solid 2px #9649cd; - border-top: none; - transition: 150ms; + border-bottom: solid 2px currentcolor; + border-top: solid 0px transparent; + transition: 350ms; } -window#waybar { - border-top: solid 1px transparent; - background: transparent; - opacity: 0.7; - /* background: rgba(153, 153, 153, 0.3); */ - color: white; -} -window#waybar.empty { - opacity: 1.125; -} -window#waybar.fullscreen { - border: solid 2px #d70947; - opacity: 1.0; -} #window { padding: 2px; - margin: 4px 4px 0; color: #fdf6e3; font-weight: 600; - border-top: solid 1px transparent; - transition: 2s; + transition: 300ms; +} +window#waybar { + border: solid 2px rgba(160, 160, 160, 0.329); + border-radius: 6px; + background: transparent; + transition: 700ms; +} +window#waybar.empty { + margin-top: 4px; + border: solid 2px rgba(136, 136, 136, 0.8); +} +window#waybar.fullscreen { + background: rgba(55, 55, 55, 0.6); + margin: 0; + border: solid 3px rgba(145, 11, 53, 0.8); + border-radius: 8px 8px 4px 4px; + transition: 300ms; } #workspaces button { - border-top: solid 2px currentcolor; - border-right: solid 2px currentcolor; - margin-top: 4px; + border-top: solid 1px currentcolor; + border-right: solid 1px currentcolor; + border-bottom: solid 1px transparent; + margin-top: 5px; + margin-left: 0px; padding: 0; + padding-right: 4px; transition: 200ms; - /* transition: transform 0.4s; */ - border-radius: 0; + border-radius: 2px 2px 2 0; } #workspaces button.empty { - opacity: 0.4; } #workspaces button.active { - color: #e44cdf; - padding: 0 10px; + color: rgba(255, 238, 0, 0.9); + padding: 0 8px; margin-top: 0; + margin-right: 2px; + margin-left: 1px; + border-top: solid 2px currentcolor; border-right: solid 2px currentcolor; - /* transition: translateY(0.75rem) 400ms; */ + border-radius: 8px 4px 2px 0; } #workspaces button.urgent { color: red; - animation: urgent-workspace ease-out 2s infinite; + animation: urgent-workspace ease-out 4s infinite; } #pulseaudio { color: #cbb643; } -/* #memory { */ -/* color: #740cbe; */ -/* } */ +#p-info, +#info, +#memory { + color: #9649cd; +} #cpu { color: #a70a3c; } @@ -121,12 +132,17 @@ window#waybar.fullscreen { #disk { color: #b58900; } +#custom-power { + border-radius: 0 8px 0 0; +} +#custom-weather, #custom-reboot, #custom-quit, #custom-lock, #custom-powerm, #custom-power { padding: 0.2rem 1rem; + margin: 0 1px; font-weight: 600; border-top: solid 1px currentcolor; transition: 350ms; @@ -138,10 +154,10 @@ window#waybar.fullscreen { #custom-power:hover { border-top: solid 2px red; transition: 250ms; + margin: 0; /* border-radius: 2rem; */ font-size: 1.5rem; } - #pulseaudio, #memory, #cpu, @@ -162,9 +178,9 @@ window#waybar.fullscreen { #memory:hover, #cpu:hover, #battery:hover, -#network:hover, #disk:hover, -#clock:hover { +#clock:hover, +#network:hover { border-top: solid 2px currentcolor; transition: 250ms; } From f66afc79af70fdab7f73533c399c59885c8245eb Mon Sep 17 00:00:00 2001 From: pika Date: Mon, 10 Jun 2024 12:42:21 +0200 Subject: [PATCH 3/3] some rewrites --- config | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/config b/config index d593bc6..950216d 100644 --- a/config +++ b/config @@ -102,9 +102,17 @@ }, "hyprland/window": { "format": " {title}", + "on-click-right": "$HOME/.config/hypr/scripts/screenshot_area", "rewrite": { - "~*": " $1", - "(.*) — ~/*": " $1" + "(.*) - NVIM": " NeoVim", + "(.*) — Mozilla Firefox": "󰈹 Firefox", + "(.*) — Mercury": "󰈹 Mercury", + "": "󰇄 Desktop", + "(.*) Spotify Free": "󰓇 Spotify", + "(.*) Spotify": "󰓇 Spotify", + "(.*) Tidal": "󰽰 Tidal", + " ~": " pika@home", + "(.*) - Obsidian(.*)": "󱓧 Obsidian", }, "separate-outputs": false },