diff --git a/gruvbox-95/icons/battery-98.png b/gruvbox-95/icons/battery-98.png new file mode 100644 index 0000000..5175919 Binary files /dev/null and b/gruvbox-95/icons/battery-98.png differ diff --git a/gruvbox-95/icons/binary-98.png b/gruvbox-95/icons/binary-98.png new file mode 100644 index 0000000..0dd18bd Binary files /dev/null and b/gruvbox-95/icons/binary-98.png differ diff --git a/gruvbox-95/icons/bluetooth.png b/gruvbox-95/icons/bluetooth.png new file mode 100644 index 0000000..3378c5e Binary files /dev/null and b/gruvbox-95/icons/bluetooth.png differ diff --git a/gruvbox-95/icons/briefcase-98.png b/gruvbox-95/icons/briefcase-98.png new file mode 100644 index 0000000..7355626 Binary files /dev/null and b/gruvbox-95/icons/briefcase-98.png differ diff --git a/gruvbox-95/icons/brightness-98.png b/gruvbox-95/icons/brightness-98.png new file mode 100644 index 0000000..3cc4f19 Binary files /dev/null and b/gruvbox-95/icons/brightness-98.png differ diff --git a/gruvbox-95/icons/code-98.png b/gruvbox-95/icons/code-98.png new file mode 100644 index 0000000..78af341 Binary files /dev/null and b/gruvbox-95/icons/code-98.png differ diff --git a/gruvbox-95/icons/computer-98.png b/gruvbox-95/icons/computer-98.png new file mode 100644 index 0000000..43184e5 Binary files /dev/null and b/gruvbox-95/icons/computer-98.png differ diff --git a/gruvbox-95/icons/cpu-98.png b/gruvbox-95/icons/cpu-98.png new file mode 100644 index 0000000..7706824 Binary files /dev/null and b/gruvbox-95/icons/cpu-98.png differ diff --git a/gruvbox-95/icons/floppy-98.png b/gruvbox-95/icons/floppy-98.png new file mode 100644 index 0000000..3fe7961 Binary files /dev/null and b/gruvbox-95/icons/floppy-98.png differ diff --git a/gruvbox-95/icons/hardisk-98.png b/gruvbox-95/icons/hardisk-98.png new file mode 100644 index 0000000..5da3201 Binary files /dev/null and b/gruvbox-95/icons/hardisk-98.png differ diff --git a/gruvbox-95/icons/internet-98.png b/gruvbox-95/icons/internet-98.png new file mode 100644 index 0000000..b89e422 Binary files /dev/null and b/gruvbox-95/icons/internet-98.png differ diff --git a/gruvbox-95/icons/keys-98.png b/gruvbox-95/icons/keys-98.png new file mode 100644 index 0000000..9e9212f Binary files /dev/null and b/gruvbox-95/icons/keys-98.png differ diff --git a/gruvbox-95/icons/memory-98.png b/gruvbox-95/icons/memory-98.png new file mode 100644 index 0000000..9f4eca6 Binary files /dev/null and b/gruvbox-95/icons/memory-98.png differ diff --git a/gruvbox-95/icons/notification-98.png b/gruvbox-95/icons/notification-98.png new file mode 100644 index 0000000..6cc8381 Binary files /dev/null and b/gruvbox-95/icons/notification-98.png differ diff --git a/gruvbox-95/icons/poweroff-98.png b/gruvbox-95/icons/poweroff-98.png new file mode 100644 index 0000000..8ba9eb7 Binary files /dev/null and b/gruvbox-95/icons/poweroff-98.png differ diff --git a/gruvbox-95/icons/processor-98.png b/gruvbox-95/icons/processor-98.png new file mode 100644 index 0000000..642e586 Binary files /dev/null and b/gruvbox-95/icons/processor-98.png differ diff --git a/gruvbox-95/icons/restart-98.png b/gruvbox-95/icons/restart-98.png new file mode 100644 index 0000000..1f7936c Binary files /dev/null and b/gruvbox-95/icons/restart-98.png differ diff --git a/gruvbox-95/icons/restrict-98.png b/gruvbox-95/icons/restrict-98.png new file mode 100644 index 0000000..c7b1c0c Binary files /dev/null and b/gruvbox-95/icons/restrict-98.png differ diff --git a/gruvbox-95/icons/shutdown-98.png b/gruvbox-95/icons/shutdown-98.png new file mode 100644 index 0000000..34e9abf Binary files /dev/null and b/gruvbox-95/icons/shutdown-98.png differ diff --git a/gruvbox-95/icons/sound-98.png b/gruvbox-95/icons/sound-98.png new file mode 100644 index 0000000..f3ea03c Binary files /dev/null and b/gruvbox-95/icons/sound-98.png differ diff --git a/gruvbox-95/icons/temp-98.png b/gruvbox-95/icons/temp-98.png new file mode 100644 index 0000000..6435583 Binary files /dev/null and b/gruvbox-95/icons/temp-98.png differ diff --git a/gruvbox-95/icons/timewarrior-98.png b/gruvbox-95/icons/timewarrior-98.png new file mode 100644 index 0000000..793a236 Binary files /dev/null and b/gruvbox-95/icons/timewarrior-98.png differ diff --git a/gruvbox-95/icons/tux-again.png b/gruvbox-95/icons/tux-again.png new file mode 100644 index 0000000..ba534a3 Binary files /dev/null and b/gruvbox-95/icons/tux-again.png differ diff --git a/gruvbox-95/wallpapers/blue_gruv_aoc.png b/gruvbox-95/wallpapers/blue_gruv_aoc.png new file mode 100644 index 0000000..6841728 Binary files /dev/null and b/gruvbox-95/wallpapers/blue_gruv_aoc.png differ diff --git a/gruvbox-95/wallpapers/blue_gruv_dell.png b/gruvbox-95/wallpapers/blue_gruv_dell.png new file mode 100644 index 0000000..7adb0cd Binary files /dev/null and b/gruvbox-95/wallpapers/blue_gruv_dell.png differ diff --git a/gruvbox-95/wallpapers/blue_gruv_thinkpad.png b/gruvbox-95/wallpapers/blue_gruv_thinkpad.png new file mode 100644 index 0000000..63dede9 Binary files /dev/null and b/gruvbox-95/wallpapers/blue_gruv_thinkpad.png differ diff --git a/gruvbox-95/wallpapers/src/blue_gruv_dell.svg b/gruvbox-95/wallpapers/src/blue_gruv_dell.svg new file mode 100644 index 0000000..de54d8f --- /dev/null +++ b/gruvbox-95/wallpapers/src/blue_gruv_dell.svg @@ -0,0 +1,59 @@ + + + + + Green No Grid + + + + + Green No Grid + + + + diff --git a/gruvbox-95/wallpapers/src/blue_gruv_thinkpad.svg b/gruvbox-95/wallpapers/src/blue_gruv_thinkpad.svg new file mode 100644 index 0000000..0ca7bce --- /dev/null +++ b/gruvbox-95/wallpapers/src/blue_gruv_thinkpad.svg @@ -0,0 +1,59 @@ + + + + + Green No Grid + + + + + Green No Grid + + + + diff --git a/gruvbox-95/wallpapers/src/plain_gruv_aoc.svg b/gruvbox-95/wallpapers/src/plain_gruv_aoc.svg new file mode 100644 index 0000000..6622f62 --- /dev/null +++ b/gruvbox-95/wallpapers/src/plain_gruv_aoc.svg @@ -0,0 +1,59 @@ + + + + + Green No Grid + + + + + Green No Grid + + + + diff --git a/hypr/hyprland.conf b/hypr/hyprland.conf index f481e65..1955d4c 100644 --- a/hypr/hyprland.conf +++ b/hypr/hyprland.conf @@ -52,8 +52,8 @@ input { general { # See https://wiki.hyprland.org/Configuring/Variables/ for more - gaps_in = 1 - gaps_out = 0 + gaps_in = 3 + gaps_out = 6 border_size = 2 # col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg # col.inactive_border = rgba(595959aa) @@ -87,7 +87,7 @@ decoration { } animations { - enabled = no + enabled = yes # Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more diff --git a/hypr/hyprpaper.conf b/hypr/hyprpaper.conf index 0189dc9..b7b7c86 100644 --- a/hypr/hyprpaper.conf +++ b/hypr/hyprpaper.conf @@ -1,9 +1,9 @@ -preload = ~/Pictures/Wallpapers/plain_gruv_thinkpad.png -preload = ~/Pictures/Wallpapers/plain_gruv_aoc.png -preload = ~/Pictures/Wallpapers/plain_gruv_dell.png +preload = ~/dotfiles/gruvbox-95/wallpapers/blue_gruv_thinkpad.png +preload = ~/dotfiles/gruvbox-95/wallpapers/blue_gruv_dell.png +preload = ~/dotfiles/gruvbox-95/wallpapers/blue_gruv_aoc.png -wallpaper = HDMI-A-1,~/Pictures/Wallpapers/plain_gruv_dell.png -wallpaper = DP-2,~/Pictures/Wallpapers/plain_gruv_aoc.png -wallpaper = eDP-1,~/Pictures/Wallpapers/plain_gruv_thinkpad.png +wallpaper = HDMI-A-1,~/dotfiles/gruvbox-95/wallpapers/blue_gruv_dell.png +wallpaper = DP-2,~/dotfiles/gruvbox-95/wallpapers/blue_gruv_aoc.png +wallpaper = eDP-1,~/dotfiles/gruvbox-95/wallpapers/blue_gruv_thinkpad.png splash = false diff --git a/rofi/config.rasi b/rofi/config.rasi index 35276cb..4c140b0 100644 --- a/rofi/config.rasi +++ b/rofi/config.rasi @@ -1,7 +1,7 @@ configuration { /* modes: "window,drun,run,ssh";*/ font: "Sys TT 12"; -location: 1; +location: 7; kb-row-up: "Up,Control+k"; kb-row-down: "Down,Control+j"; kb-cancel: "Escape,Control+c"; @@ -22,7 +22,7 @@ cycle: false; /* run-shell-command: "{terminal} -e {cmd}";*/ /* window-command: "wmctrl -i -R {window}";*/ /* window-match-fields: "all";*/ -/* icon-theme: ;*/ +icon-theme: 'Raleigh' ; /* drun-match-fields: "name,generic,exec,categories,keywords";*/ /* drun-categories: ;*/ /* drun-show-actions: false;*/ diff --git a/rofi/gruvbox_95_rofi/gruvbox_95_rofi.rasi b/rofi/gruvbox_95_rofi/gruvbox_95_rofi.rasi index 486ca84..90caa4d 100644 --- a/rofi/gruvbox_95_rofi/gruvbox_95_rofi.rasi +++ b/rofi/gruvbox_95_rofi/gruvbox_95_rofi.rasi @@ -17,7 +17,7 @@ selected-urgent-background: var(red); alternate-active-background: var(lightbg); spacing: 2; - blue: rgba ( 152, 151, 26 , 100 % ); + blue: rgba (69, 133, 136, 80 % ); alternate-normal-foreground: var(foreground); urgent-background: var(background); selected-normal-foreground: var(foreground); @@ -26,7 +26,7 @@ selected-active-background: var(blue); active-background: var(background); selected-normal-background: var(lightfg); - alternate-normal-background: var(lightbg); + alternate-normal-background: var(background); foreground: rgba ( 40, 40, 40, 100 % ); selected-urgent-foreground: var(background); normal-foreground: var(foreground); @@ -34,9 +34,9 @@ alternate-active-foreground: var(blue); } element { - padding: 2px ; + padding: 8px 2px 0px 2px; cursor: pointer; - spacing: 5px ; + spacing: 8px ; border: 0; } element normal.normal { @@ -52,8 +52,8 @@ element normal.active { text-color: var(active-foreground); } element selected.normal { - background-color: var(selected-normal-background); - text-color: var(selected-normal-foreground); + background-color: var(selected-normal-background); + text-color: #ebdbb2; } element selected.urgent { @@ -83,8 +83,9 @@ element-text { text-color: inherit; } element-icon { + padding: 0 0 6px 0; background-color: transparent; - size: 1.0000em ; + size: 1.00000em ; cursor: inherit; text-color: inherit; } @@ -92,9 +93,12 @@ window { padding: 5; background-color: var(background); width: 20%; + border: 2; + border-color: #ebdbb2; + margin: 1 10; } mainbox { - padding: 0; + padding: 4; border: 0; } message { @@ -103,7 +107,7 @@ message { border: 2px dash 0px 0px ; } textbox { - text-color: var(foreground); + text-color: #f9f5d7; } listview { padding: 2px 0px 0px ; @@ -116,9 +120,9 @@ listview { scrollbar { width: 2px ; padding: 0; - handle-width: 7px ; + handle-width: 6px ; border: 0; - handle-color: rgba ( 102, 92, 84, 100% ); + handle-color: #665c54; } sidebar { border-color: var(separatorcolor); @@ -147,11 +151,11 @@ textbox-num-sep { text-color: var(grey); } inputbar { - background-color: rgba ( 251, 241, 199, 100% ) ; - padding: 2px ; - spacing: 2px ; + background-color: #f9f5d7; + padding: 8px 2px 6px 2px; + spacing: 5px ; text-color: var(normal-foreground); - border: 1; + border: 2px; border-color: rgba ( 102, 92, 84, 100% ); children: [ "prompt","textbox-prompt-colon","entry","num-filtered-rows","textbox-num-sep","num-rows","case-indicator" ]; } diff --git a/scripts/screenshot.sh b/scripts/screenshot.sh new file mode 100755 index 0000000..5e4a0be --- /dev/null +++ b/scripts/screenshot.sh @@ -0,0 +1 @@ +grim -g "$(slurp)" - | swappy -f - diff --git a/scripts/third-party/tofi_window_switch.sh b/scripts/third-party/tofi_window_switch.sh deleted file mode 100755 index 6d8aa81..0000000 --- a/scripts/third-party/tofi_window_switch.sh +++ /dev/null @@ -1,37 +0,0 @@ -# Source = https://github.com/hyprwm/Hyprland/discussions/830 -#!/usr/bin/env bash -# rofi -show window for Hyprland, basically - -state="$(hyprctl -j clients)" -active_window="$(hyprctl -j activewindow)" - -current_addr="$(echo "$active_window" | gojq -r '.address')" - -window="$(echo "$state" | - gojq -r '.[] | select(.monitor != -1 ) | "\(.address) \(.workspace.name) \(.title)"' | - sed "s|$current_addr|focused ->|" | - sort -r | - tofi --fuzzy-match true)" - -addr="$(echo "$window" | awk '{print $1}')" -ws="$(echo "$window" | awk '{print $2}')" - -if [[ "$addr" =~ focused* ]]; then - echo 'already focused, exiting' - exit 0 -fi - -fullscreen_on_same_ws="$(echo "$state" | gojq -r ".[] | select(.fullscreen == true) | select(.workspace.name == \"$ws\") | .address")" - -if [[ "$window" != "" ]]; then - if [[ "$fullscreen_on_same_ws" == "" ]]; then - hyprctl dispatch focuswindow address:${addr} - else - # If we want to focus app_A and app_B is fullscreen on the same workspace, - # app_A will get focus, but app_B will remain on top. - # This monstrosity is to make sure app_A will end up on top instead. - # XXX: doesn't handle fullscreen 0, but I don't care. - notify-send 'Complex switch' "$window" - hyprctl --batch "dispatch focuswindow address:${fullscreen_on_same_ws}; dispatch fullscreen 1; dispatch focuswindow address:${addr}; dispatch fullscreen 1" - fi -fi diff --git a/scripts/waybar/time_warrior_waybar.py b/scripts/time_warrior_waybar.py similarity index 91% rename from scripts/waybar/time_warrior_waybar.py rename to scripts/time_warrior_waybar.py index e2fae6f..d099c06 100755 --- a/scripts/waybar/time_warrior_waybar.py +++ b/scripts/time_warrior_waybar.py @@ -36,10 +36,10 @@ def main(): output = {} try: if timer_active(): - output["text"] = "󱫐" + output["text"] = "Timer active" output["class"] = "active" else: - output["text"] = "󱫦" + output["text"] = "Timer inactive" output["class"] = "inactive" except Exception as e: output["text"] = "Error" diff --git a/scripts/waybar/wakatime_waybar.py b/scripts/wakatime_waybar.py similarity index 100% rename from scripts/waybar/wakatime_waybar.py rename to scripts/wakatime_waybar.py diff --git a/scripts/waybar/toggl_controller.py b/scripts/waybar/toggl_controller.py deleted file mode 100644 index 4cd3179..0000000 --- a/scripts/waybar/toggl_controller.py +++ /dev/null @@ -1,166 +0,0 @@ -#! /usr/local/bin/python3 -import requests -import os -from textwrap import dedent -import logging -import base64 -import json -import pytz -from datetime import datetime, timedelta -from tabulate import tabulate # third-party module, must be installed on system - - -TOGGL_API_URL = "https://api.track.toggl.com/api/v9/" -TOGGL_API_KEY = os.getenv("TOGGL_API_KEY") -TOGGL_WORKSPACE_ID = os.getenv("TOGGL_WORKSPACE_ID") -ENCODED_TOGGL_API_KEY = str(base64.b64encode(TOGGL_API_KEY.encode("utf-8")), "utf-8") -HEADERS = { - "content-type": "application/json", - "Authorization": "Basic %s" % ENCODED_TOGGL_API_KEY, -} - - -def get_data(endpoint): - response = requests.get( - f"https://api.track.toggl.com/api/v9/{endpoint}", - headers={ - "content-type": "application/json", - "Authorization": "Basic %s" % ENCODED_TOGGL_API_KEY, - }, - ) - if response.status_code == 200: - return response.json() - else: - raise Exception( - f"Failed to fetch data from API. Status code: {response.status_code}" - ) - - -def get_project_name(project_id: int) -> str: - try: - projects = get_data(f"workspaces/{TOGGL_WORKSPACE_ID}/projects") - project = [project for project in projects if project["id"] == project_id][0] - return project["name"] - except Exception as e: - logging.warning(f"Error. Could not retrieve project name: {e}") - - -def get_human_date(timestamp): - return datetime.strptime(timestamp, "%Y-%m-%dT%H:%M:%S%z").strftime( - "%a %d %b (%H:%M)" - ) - - -def get_time_difference(start, end): - format = "%Y-%m-%dT%H:%M:%S%z" - datetime1 = datetime.strptime(start, format) - datetime2 = datetime.strptime(end, format) - difference = datetime2 - datetime1 - return get_hms(int(difference.total_seconds())) - - -def get_hms(unix_seconds): - return str(timedelta(seconds=unix_seconds)) - - -def timer_is_running(): - active_session = get_data("me/time_entries/current") - if not active_session: - return False - else: - return True - - -# def get_active_time_entry(): -# active_session = get_data("me/time_entries/current") -# if not active_session: -# return "No timer running" -# else: -# current_time = datetime.now(pytz.utc).strftime("%Y-%m-%dT%H:%M:%S%z") -# entry = { -# "project_id": get_project_name(active_session["project_id"]), -# "duration": get_time_difference(active_session["start"], current_time), -# "start": get_human_date(active_session["start"]), -# "description": active_session["description"], -# } -# return print_table([entry]) - - -def process_active_entry(entry): - time_now = datetime.now(pytz.utc).strftime("%Y-%m-%dT%H:%M:%S%z") - return { - "project_id": get_project_name(entry["project_id"]), - "duration": get_time_difference(entry["start"], time_now), - "start": get_human_date(entry["start"]), - "description": entry["description"], - } - - -def list_recent_time_entries(): - try: - recent_entries = get_data("me/time_entries") - properties = ["project_id", "duration", "start", "description"] - transformers = { - "project_id": get_project_name, - "start": get_human_date, - "duration": get_hms, - } - processed_entries = [] - first_entry = recent_entries[0] - if not first_entry["stop"]: - active_entry = process_active_entry(first_entry) - print(active_entry) - for entry in recent_entries[:5]: - processed_entry = {} - for prop in properties: - if prop in transformers: - processed_entry[prop] = transformers[prop](entry[prop]) or "null" - else: - processed_entry[prop] = entry[prop] or "null" - processed_entries.append(processed_entry) - processed_entries[0] = active_entry - return dedent( - tabulate(processed_entries, headers="keys", tablefmt="simple_outline") - ) - - except Exception as e: - return f"Error. Could not retrieve recent time entries: {e}" - - -def stop_running_timer(entry_id): - patch_url = ( - f"{TOGGL_API_URL}workspaces/{TOGGL_WORKSPACE_ID}/time_entries/{entry_id}/stop" - ) - response = requests.patch(patch_url, headers=HEADERS) - if response.status_code != 200: - print("Error: timer not stopped") - print(response.content) - else: - return - - -def main(): - output = {} - try: - if timer_is_running(): - output["text"] = " Tracker: active" - output["class"] = "active" - else: - output["text"] = " Tracker: inactive" - output["class"] = "inactive" - output["tooltip"] = list_recent_time_entries() - except Exception as e: - output["text"] = "Error" - - print(json.dumps(output)) - - -if __name__ == "__main__": - main() - -print(list_recent_time_entries()) -# print(get_project_name(193325937)) -# print(list_recent_time_entries()) -# print(get_active_time_entry()) -# print(get_active_session()) -# stop_running_timer(3318296941) diff --git a/swaync/style.css b/swaync/style.css index 7acc707..2250165 100644 --- a/swaync/style.css +++ b/swaync/style.css @@ -52,10 +52,15 @@ margin: 0; border-radius: 0; color: #282828; - background-color: #a89983; - border: 2px solid; - border-color: #ebdbb2 #665c54 #665c54 #ebdbb2; - padding: 0; + background-color: #bdae93; + border: 2px solid #ebdbb2; + + /* border-left: 2px solid #ebdbb2; */ + /* border-top: 2px solid #ebdbb2; */ + /* border-right: 2px solid #665c54; */ + /* border-bottom: 2px solid #665c54; */ + + padding: 2px 0; transition: background 0.15s ease-in-out; } @@ -402,6 +407,12 @@ .control-center { /* The Control Center which contains the old notifications + widgets */ + + box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2); + border-left: 2px solid #ebdbb2; + border-top: 2px solid #ebdbb2; + border-right: 2px solid #665c54; + border-bottom: 2px solid #665c54; background: #bdae93; border-radius: 0px; } @@ -411,11 +422,6 @@ opacity: 0.5; } -.control-center .control-center-list { - /* List of notifications */ - background: transparent; -} - .control-center .control-center-list .notification { box-shadow: none; /* box-shadow: */ diff --git a/waybar/config b/waybar/config index babe815..7abc727 100644 --- a/waybar/config +++ b/waybar/config @@ -1,106 +1,228 @@ { + "layer": "top", + "position": "bottom", "margin": "0", - "height": 25, - "spacing": 0, - -"modules-left": [ - "custom/os", - "hyprland/workspaces", - "wlr/taskbar" + "height": 20, + "spacing": "", + + "modules-left": [ + "image#os", + "wlr/taskbar" ], + "modules-center": [ ], + "modules-right": [ - "network", - "bluetooth", - "cpu", - "memory", - "temperature", - "backlight", - "disk", - "custom/diskBackup", - "battery", - "custom/wakatime", - "pulseaudio", - "clock", - "custom/timewarrior", - "custom/lock", - "custom/restart", - "custom/shutdown", - "custom/notification", -], + "group/timeTracker", + "group/workspaceList", + "group/metrics", + "group/clockOutput", + "group/controls", + ], + + "group/clockOutput": { + "orientation": "horizontal", + "modules": [ + "clock", + ] + }, - "wlr/taskbar": { + "group/workspaceList": { + "orientation": "horizontal", + "modules": [ + "hyprland/workspaces", + ] + }, + + "group/timeTracker": { + "orientation": "horizontal", + "modules": [ + "custom/timewarrior", + ] + }, + + "group/metrics": { + "orientation": "horizontal", + "modules": [ + "image#internet", + "network", + "image#bluetooth", + "bluetooth", + "image#memory", + "memory", + "image#cpu", + "cpu", + "image#harddrive", + "disk", + "image#backup", + "custom/diskBackup", + "image#backlight", + "backlight", + "image#volume", + "pulseaudio", + "image#battery", + "battery", + "image#code", + "custom/wakatime", + ] + }, + + "group/controls": { + "orientation": "horizontal", + "modules": [ + "image#timewarrior", + "image#notification", + "image#keys", + "image#restart", + "image#shutdown", + ] + }, + + "hyprland/workspaces": { + "format": "{icon}", + "on-click": "activate", + "sort-by-number": false, + "format-icons": { + "1": "Workspace 1", + "2": "Workspace 2", + "3": "Workspace 3", + "4": "Workspace 4", + "5": "Workspace 5", + }, + }, + + "image#code": { + "path": "/home/thomas/dotfiles/gruvbox-95/icons/binary-98.png", + "size": 22, + "interval": 5, + }, + + "image#battery": { + "path": "/home/thomas/dotfiles/gruvbox-95/icons/battery-98.png", + "size": 22, + "interval": 5, + }, + + "image#backup": { + "path": "/home/thomas/dotfiles/gruvbox-95/icons/floppy-98.png", + "size": 22, + "interval": 5, + }, + + "image#harddrive": { + "path": "/home/thomas/dotfiles/gruvbox-95/icons/hardisk-98.png", + "size": 22, + "interval": 5, + }, + + "image#volume": { + "path": "/home/thomas/dotfiles/gruvbox-95/icons/sound-98.png", + "size": 19, + "interval": 5, + }, + + "image#backlight": { + "path": "/home/thomas/dotfiles/gruvbox-95/icons/brightness-98.png", + "size": 18, + "interval": 5, + }, + + "image#memory": { + "path": "/home/thomas/dotfiles/gruvbox-95/icons/memory-98.png", + "size": 22, + "interval": 5, + }, + + "image#cpu": { + "path": "/home/thomas/dotfiles/gruvbox-95/icons/processor-98.png", + "size": 22, + "interval": 5, + }, + + "image#internet": { + "path": "/home/thomas/dotfiles/gruvbox-95/icons/internet-98.png", + "size": 22, + "interval": 5, + }, + + "image#bluetooth": { + "path": "/home/thomas/dotfiles/gruvbox-95/icons/bluetooth.png", + "size": 20, + "interval": 5, + }, + + + "image#os": { + "path": "/home/thomas/dotfiles/gruvbox-95/icons/computer-98.png", + "size": 26, + "interval": 5, + }, + + "image#keys": { + "path": "/home/thomas/dotfiles/gruvbox-95/icons/keys-98.png", + "size": 26, + "interval": 5, + "on-click": "sleep 0.1 && hyprlock", + }, + + "image#restart": { + "path": "/home/thomas/dotfiles/gruvbox-95/icons/restart-98.png", + "size": 26, + "interval": 5, + "on-click": "sleep 0.1 && systemctl reboot", + }, + + "image#shutdown": { + "path": "/home/thomas/dotfiles/gruvbox-95/icons/poweroff-98.png", + "size": 26, + "interval": 5, + "on-click": "sleep 0.1 && systemctl poweroff", + }, + + "image#notification": { + "path": "/home/thomas/dotfiles/gruvbox-95/icons/notification-98.png", + "size": 26, + "interval": 5, + "on-click": "sleep 0.2 && swaync-client -t -sw", + }, + + "image#timewarrior": { + "path": "/home/thomas/dotfiles/gruvbox-95/icons/timewarrior-98.png", + "size": 26, + "interval": 5, + "on-click": "sleep 0.15 && timew stop && notify-send 'Time Warrior' 'Timer stopped'", + "on-click-right": "sleep 0.1 && timew continue && notify-send 'Time Warrior' 'Timer resumed'", + }, + + "wlr/taskbar": { "format": "{icon}", - "icon-size": 20, - "icon-theme": "Pop", + "icon-size": 22, + "icon-theme": "Raleigh", "tooltip-format": "{title}", "on-click": "activate", - "on-click-middle": "close", - "ignore-list": [ - "Alacritty" - ], - "app_ids-mapping": { - "firefoxdeveloperedition": "firefox-developer-edition" - }, - "rewrite": { - "Firefox Web Browser": "Firefox", - "Foot Server": "Terminal" - } - }, - "keyboard-state": { - "numlock": true, - "capslock": true, - "format": "{name} {icon}", - "format-icons": { - "locked": "", - "unlocked": "" - } - }, - "mpd": { - "format": "{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S}) ⸨{songPosition}|{queueLength}⸩ {volume}% ", - "format-disconnected": "Disconnected ", - "format-stopped": "{consumeIcon}{randomIcon}{repeatIcon}{singleIcon}Stopped ", - "unknown-tag": "N/A", - "interval": 2, - "consume-icons": { - "on": " " - }, - "random-icons": { - "off": " ", - "on": " " - }, - "repeat-icons": { - "on": " " - }, - "single-icons": { - "on": "1 " - }, - "state-icons": { - "paused": "", - "playing": "" - }, - "tooltip-format": "MPD (connected)", - "tooltip-format-disconnected": "MPD (disconnected)" - }, - "idle_inhibitor": { - "format": "󰖨" }, + "tray": { "spacing": 10 }, + "clock": { "format": "{:%H:%M}", "format-alt": "{:%d/%m/%Y}" }, + "cpu": { - "format": "CPU: {usage}%", - "tooltip": false + "format": "{usage}%", + "tooltip": "CPU" }, + "memory": { - "format": "Mem: {}%", + "format": "{}%", + "tooltip": "Memory" }, + "temperature": { "critical-threshold": 80, "format": "Temp: {temperatureC}°C", @@ -110,157 +232,86 @@ "󱩅" ] }, + "backlight": { "device": "acpi_video1", - "format": "Dim: {percent}%", - "format-icons": [ - "󰪞 ", - "󰪟 ", - "󰪠 ", - "󰪡 ", - "󰪢 ", - "󰪣 ", - "󰪥 " - ] + "format": "{percent}%", }, + "battery": { "states": { "warning": 30, "critical": 15 }, - "format": "Bat: {capacity}%", - "format-charging": "Bat: {capacity}%", - "format-plugged": "Bat: {capacity}%", - "format-icons": [ - "󰁻", - "󰁼", - "󰁿", - "󰂀", - "󰁹" - ] - }, - "battery#bat2": { - "bat": "BAT2" + "format": "{capacity}%", + "format-charging": "{capacity}%", + "format-plugged": "{capacity}%", }, + "network": { - "format-wifi": "Net: {essid}", + "format-wifi": "{essid}", "format-ethernet": "{ipaddr}/{cidr}", "tooltip-format": "{ifname} via {gwaddr}", "format-linked": "{ifname} (No IP)", "format-disconnected": "Net: none", - "format-alt": "Sig: {essid} ({signalStrength}%)" + "format-alt": "{essid} ({signalStrength}%)" }, + "pulseaudio": { - "format": "Vol: {volume}%", - "format-bluetooth": "Vol: {volume}%", + "format": "{volume}%", + "format-bluetooth": "{volume}%", "format-bluetooth-muted": "", - "format-muted": "Vol: mute", - "format-source": "Vol: {volume}%", - "format-source-muted": "Vole: mute", - "format-icons": { - "headphone": "", - "hands-free": "", - "phone": "", - "portable": "", - "car": "", - "default": [ - "", - "", - "" - ] - }, + "format-muted": "Mute", + "format-source": "{volume}%", + "format-source-muted": "Mute", "on-click": "pavucontrol" }, + "disk": { "interval": 30, - "format": "Disk: {percentage_used}%", + "format": "{percentage_used}%", "path": "/home" }, + "bluetooth": { "controller": "bluetoothctl", - "format": "BT: active", - "format-connected": "BT: connected", - "format-alt": "BT: {device_alias}", - "format-connected-battery": "BT: {device_battery_percentage}%", + "format": "Active", + "format-connected": "Connected", + "format-alt": "{device_alias}", + "format-connected-battery": "{device_battery_percentage}%", "tooltip-format": "{controller_alias}\t{controller_address}\n\n{num_connections} connected", "tooltip-format-connected": "{controller_alias}\t{controller_address}\n\n{num_connections} connected\n\n{device_enumerate}", "tooltip-format-enumerate-connected": "{device_alias}\t{device_address}", "tooltip-format-enumerate-connected-battery": "{device_alias}\t{device_address}\t{device_battery_percentage}%" - }, - "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" - }, - "custom/os": { - "format": "", - "tooltip": false - }, + }, + "custom/wakatime": { "exec": "source $HOME/.env && python3 $HOME/.config/waybar/resources/custom_modules/wakatime.py", - "format": "Code: {}", + "format": "{}", "return-type": "json", "interval": 600 }, + "custom/timewarrior": { "exec": "python3 $HOME/.config/waybar/resources/custom_modules/time_warrior_waybar.py", "format": "{}", - "on-click": "sleep 0.15 && timew stop && notify-send 'Time Warrior' 'Timer stopped'", - "on-click-right": "sleep 0.1 && timew continue && notify-send 'Time Warrior' 'Timer resumed'", "return-type": "json", "interval": 5, "tooltip": false }, - "custom/logout": { - "format": "󰛂", - "on-click": "sleep 0.1 && 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": "sleep 0.2 && swaync-client -t -sw", - "on-click-right": "swaync-client -d -sw", - "escape": true - }, + "custom/diskBackup": { - "format": "Bak: {}", + "format": "{}", "exec": "df -h /media/backups | awk 'NR==2{print $5}'", "interval": 60, - "tooltip": false - }, - "custom/lock": { - "format": "󰍁", - "on-click": "hyprlock", "tooltip": false }, - "custom/shutdown": { + + "custom/shutdown": { "format": "󱠡", "tooltip": false, "on-click": "systemctl poweroff" }, - "custom/restart": { - "format": "󰑓", - "tooltip": false, - "on-click": "systemctl reboot" - } + + } diff --git a/waybar/resources/custom_modules/time_warrior_waybar.py b/waybar/resources/custom_modules/time_warrior_waybar.py index e2fae6f..68907a2 100755 --- a/waybar/resources/custom_modules/time_warrior_waybar.py +++ b/waybar/resources/custom_modules/time_warrior_waybar.py @@ -36,10 +36,10 @@ def main(): output = {} try: if timer_active(): - output["text"] = "󱫐" + output["text"] = "Timer running" output["class"] = "active" else: - output["text"] = "󱫦" + output["text"] = "No timer" output["class"] = "inactive" except Exception as e: output["text"] = "Error" diff --git a/waybar/style.css b/waybar/style.css index 39826b8..18a2311 100644 --- a/waybar/style.css +++ b/waybar/style.css @@ -1,219 +1,117 @@ * { - font-weight: 400; + min-height: 0; } window#waybar { font-family: "Sys TT", "Font Awesome"; - background-color: #458588; - border-bottom: 2px solid #282828; - font-size: 16px; + background-color: #bdae93; + padding: 2px 0; + border-left: 2px solid #ebdbb2; + border-top: 2px solid #ebdbb2; + border-right: 2px solid #665c54; + border-bottom: 2px solid #665c54; } -button { - border-radius: 0; +#workspaces button { + font-size: 14px; +} + +#workspaces button.active { + font-style: italic; +} + +#workspaces button:hover { + background-color: transparent; border: none; - opacity: 1; +} + +#timeTracker, +#workspaceList, +#clockOutput, +#metrics { + background-color: #bdae93; + border-left: 2px solid #665c54; + border-top: 2px solid #665c54; + border-right: 2px solid #ebdbb2; + border-bottom: 2px solid #ebdbb2; + margin: 5px 3px; + padding: 0 10px; +} + +#controls, +#workspaces > *:last-child { + margin-right: 3px; +} + +#image.timewarrior, +#image.notification, +#image.os, +#image.keys, +#image.shutdown, +#image.restart, +#taskbar button { + background-color: #bdae93; + color: #282828; + border-top: 2px solid #ebdbb2; + border-left: 2px solid #ebdbb2; + border-bottom: 2px solid #665c54; + border-right: 2px solid #665c54; + margin: 5px 3px; + margin-right: 0; + padding: 3px; +} + +#image.code, +#image.battery, +#image.backup, +#image.harddrive, +#image.volume, +#image.backlight, +#image.cpu, +#image.memory, +#image.internet, +#image.bluetooth { + margin-right: 5px; +} + +#image.code, +#image.battery, +#image.backup, +#image.harddrive, +#image.volume, +#image.backlight, +#image.cpu, +#image.memory { + margin-left: 10px; +} + +#image.backlight, +#image.volume { + padding-bottom: 2px; +} + +#image.harddrive, +#image.backup { + padding-bottom: 5px; +} + +#network { + margin-right: 10px; } tooltip { color: #282828; - border-width: 0; border-radius: 0; font-weight: 400; background-color: #bdae93; - box-shadow: none; + border-left: 1px solid #ebdbb2; + border-top: 1px solid #ebdbb2; + border-right: 1px solid #665c54; + border-bottom: 1px solid #665c54; + padding: 4px 8px; + box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2); } tooltip label { color: #282828; } - -/* Layout */ - -#taskbar { - margin-right: 10px; -} - -#clock, -#custom-wakatime, -#network, -#bluetooth, -#cpu, -#memory, -#temperature, -#backlight, -#pulseaudio, -#disk, -#custom-diskBackup, -#battery { - padding: 2px 8px 0; - margin: 5px 3px 6px; -} - -#taskbar button { - margin: 5px 0 6px; - font-size: 18px; - padding: 0px 4px; -} - -#custom-timewarrior, -#custom-notification, -#custom-lock, -#custom-shutdown, -#custom-restart, -#idle_inhibitor, -#custom-logout { - margin: 5px 0 6px; - font-size: 18px; - padding: 0px 8px; - /* margin: 8px 0 10px; */ -} - -#taskbar button { - background-color: #a89984; - border: 2px solid; /* Base border */ - border-color: #ebdbb2 #665c54 #665c54 #ebdbb2; -} - -#workspaces button { - margin: 5px 0 6px; - font-size: 18px; - color: #ebdbb2; - padding: 3px 5px 0; - background-color: #665c54; - border: 2px solid; /* Base border */ - border-color: #928374 #282828 #282828 #928374; -} - -#workspaces > *:last-child { - margin-right: 10px; -} - -#custom-notification { - margin-right: 5px; -} - -/* Colours */ - -#taskbar button.active { - background-color: #ebdbb2; - border: 2px solid; /* Base border */ - border-color: #fbf1c7 #a89984 #a89984 #fbf1c7; -} - -#battery, -#battery.charging, -#battery.plugged { - color: #282828; - background-color: #a89984; - border: 2px solid; /* Base border */ - border-color: #ebdbb2 #665c54 #665c54 #ebdbb2; -} - -#clock { - color: #282828; - background-color: #a89984; - border: 2px solid; /* Base border */ - border-color: #ebdbb2 #665c54 #665c54 #ebdbb2; -} -#cpu, -#memory, -#temperature, -#backlight { - color: #282828; - background-color: #a89984; - border: 2px solid; /* Base border */ - border-color: #ebdbb2 #665c54 #665c54 #ebdbb2; - - color: #282828; -} - -#disk, -#custom-diskBackup { - color: #282828; - background-color: #a89984; - border: 2px solid; /* Base border */ - border-color: #ebdbb2 #665c54 #665c54 #ebdbb2; -} - -#network, -#bluetooth, -#pulseaudio { - color: #282828; - background-color: #a89984; - border: 2px solid; /* Base border */ - border-color: #ebdbb2 #665c54 #665c54 #ebdbb2; - - /* background-color: #c0c0c0; */ - /* border: 2px solid; /1* Base border *1/ */ - /* border-color: #ffffff #808080 #808080 #ffffff; */ - /* color: #282828; */ -} - -#workspaces button.urgent, -#temperature.critical, -#network.disconnected, -#battery.critical:not(.charging) { - color: #ebdbb2; - background-color: #cc241d; - border-color: #fb4924 #9d0006 #9d0006 #fb4924; -} - -#custom-wakatime { - color: #282828; - background-color: #a89984; - border: 2px solid; /* Base border */ - border-color: #ebdbb2 #665c54 #665c54 #ebdbb2; -} - -#workspaces button.active { - color: #282828; - background-color: #ebdbb2; - border: 2px solid; /* Base border */ - border-color: #fbf1c7 #a89984 #a89984 #fbf1c7; -} - -#custom-timewarrior.active { - color: #282828; - background-color: #98971a; - border: 2px solid; /* Base border */ - border-color: #b8bb27 #79740e #79740e #b8bb27; -} - -#custom-timewarrior { - margin-left: 10px; -} - -/* Specific module styles */ - -#custom-os { - margin: 5px 15px 5px 5px; - font-size: 18px; - padding: 0 12px 0 5px; - /* padding-right: 14px; */ - color: #282828; - background-color: #a89984; - border: 2px solid; /* Base border */ - border-color: #ebdbb2 #665c54 #665c54 #ebdbb2; -} - -#custom-notification { - margin-left: 10px; -} - -#custom-timewarrior { - margin-right: 10px; -} - -#custom-timewarrior, -#custom-notification, -#custom-lock, -#custom-shutdown, -#custom-restart, -#idle_inhibitor, -#custom-logout { - background-color: #665c54; - border: 2px solid; /* Base border */ - border-color: #928374 #282828 #282828 #928374; - color: #ebdbb2; -}