diff --git a/dot_config/fish/conf.d/10-env.fish b/dot_config/fish/conf.d/10-env.fish index 3e52508..5bd4161 100644 --- a/dot_config/fish/conf.d/10-env.fish +++ b/dot_config/fish/conf.d/10-env.fish @@ -24,7 +24,7 @@ set -gx ANDROID_HOME $HOME/.local/share/android set -gx ANDROID_SDK_ROOT $ANDROID_HOME # Git hosts (non-secret; tokens are in secrets.fish) -set -gx GITEA_LOGIN code.sonr.org +set -gx GITEA_LOGIN prad.codes set -gx GITLAB_HOST git.sonr.org set -gx EDITOR nvim set -gx VISUAL nvim diff --git a/dot_config/hypr/monitors.lua b/dot_config/hypr/monitors.lua index 683e0ad..baf0ff2 100644 --- a/dot_config/hypr/monitors.lua +++ b/dot_config/hypr/monitors.lua @@ -7,6 +7,11 @@ local omarchy_monitor_scale = 2 hl.env("GDK_SCALE", tostring(omarchy_gdk_scale)) hl.monitor({ output = "", mode = "preferred", position = "auto", scale = omarchy_monitor_scale }) +-- Apple Studio Display on the left, laptop panel (eDP-1) on the right. +-- Logical widths at scale 2: 5120/2 = 2560, so eDP-1 starts at x=2560. +hl.monitor({ output = "DP-4", mode = "5120x2880@60", position = "0x0", scale = 2 }) +hl.monitor({ output = "eDP-1", mode = "2560x1600@180", position = "2560x0", scale = 2 }) + -- Configure a specific monitor. -- hl.monitor({ output = "DP-2", mode = "2560x1440@144", position = "0x0", scale = 1 }) diff --git a/dot_config/waybar/V6.cb.png b/dot_config/waybar/V6.cb.png new file mode 100644 index 0000000..881e19e Binary files /dev/null and b/dot_config/waybar/V6.cb.png differ diff --git a/dot_config/waybar/config.jsonc b/dot_config/waybar/config.jsonc new file mode 100644 index 0000000..44a48cb --- /dev/null +++ b/dot_config/waybar/config.jsonc @@ -0,0 +1,327 @@ +{ + "exclusive": true, + "reload_style_on_change": true, + "position": "bottom", + "fixed-center": true, + "spacing": 2, + "margin-top": 1, + "modules-left": [ + "custom/separator", + "custom/omarchy", + "custom/separator", + "hyprland/workspaces", + "custom/separator", + "tray", + "custom/separator", + "custom/voxtype", + "custom/update", + "custom/screenrecording-indicator", + "custom/updatespacman", + "custom/separator", + "idle_inhibitor" + ], + "modules-center": [ + "custom/windowpill" + ], + "modules-right": [ + "group/right-group2", + "group/right-group1" + ], + +"group/right-group1": { + "orientation": "vertical", + "justify": "left", + "align": "left", + "modules": [ + "group/right1" + ] +}, + +"group/right-group2": { + "orientation": "vertical", + "justify": "left", + "align": "left", + "modules": [ + "group/right2" + ] +}, +"group/right1":{ + "orientation": "horizontal", + "modules": ["clock"] +}, +"group/right2":{ + "orientation": "horizontal", + "modules": [ + "group/tray-expander", + ] +}, + "hyprland/workspaces": { + "on-click": "activate", + "cursor": true, + "format": "{icon}", + "persistent-workspaces": { + "1": [], + "2": [], + "3": [], + "4": [], + "5": [], + "7": [], + "8": [], + "9": [] + } +}, +"custom/separator": { + "format": "|", + "tooltip": false +}, +"custom/separator2": { + "format": "|", + "tooltip": false +}, +"custom/separator3": { + "format": "|", + "tooltip": false +}, + "custom/omarchy": { + "format": "\ue900", + "on-click": "omarchy-menu", + "on-click-right": "xdg-terminal-exec", + "tooltip-format": "Omarchy Menu\n\nSuper + Alt + Space" + }, + "custom/update": { + "format": "", + "exec": "omarchy-update-available", + "on-click": "omarchy-launch-floating-terminal-with-presentation omarchy-update", + "tooltip-format": "Omarchy update available", + "signal": 7, + "interval": 21600 + }, + "custom/voxtype": { + "exec": "omarchy-voxtype-status", + "return-type": "json", + "format": "{icon}", + "format-icons": { + "idle": "", + "recording": "󰍬", + "transcribing": "󰔟" + }, + "tooltip": true, + "on-click-right": "omarchy-voxtype-config", + "on-click": "omarchy-voxtype-model" + }, + "power-profiles-daemon": { + "format": "{icon}", + "tooltip-format": "Power profile: {profile}\nDriver: {driver}", + "tooltip": true, + "format-icons": { + "performance": "", + "balanced": "", + "power-saver": "" + } + }, + "idle_inhibitor": { + "format": "{icon}", + "format-icons": { + "activated": "󰛊", + "deactivated": "󰾫" + } + }, + "custom/windowpill": { + "format": "{}", + "exec": "~/.config/waybar/window_pill.py", + "return-type": "json", + "restart-interval": 1, + "align": "center", + "justify": "center" + }, + "cpu": { + "interval": 10, + "format": " {usage}%", + "on-click": "omarchy-launch-or-focus-tui btop" + }, + "memory": { + "interval": 2, + "format": " {used:0.1f}G", + "on-click": "omarchy-launch-or-focus-tui btop" + }, + "backlight": { + "device": "intel_backlight", + "format": "{icon}", + "tooltip-format": "{percent}%", + "format-icons": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "clock": { + "justify": "right", + "format": "{:%H:%M\n%d/%m/%Y}", + "format-alt": "{:%H:%M - %d/%m/%Y}", + "tooltip-format": "{calendar}", + "calendar": { + "mode": "month", + "mode-mon-col": 3, + "on-click-right": "mode", + "format": { + "month": "{}", + "weekdays": "{}", + "today": "{}", + }, + }, + "on-click-right": "omarchy-launch-floating-terminal-with-presentation omarchy-tz-select" + }, + "network": { + "format-icons": [ + "󰤯", + "󰤟", + "󰤢", + "󰤥", + "󰤨" + ], + "format": "{icon}", + "format-wifi": "{icon}", + "format-ethernet": "󰈀", + "format-disconnected": "󰤮", + "tooltip-format-wifi": "{essid} ({frequency} GHz)\n⇣{bandwidthDownBytes} ⇡{bandwidthUpBytes}", + "tooltip-format-ethernet": "⇣{bandwidthDownBytes} ⇡{bandwidthUpBytes}", + "tooltip-format-disconnected": "Disconnected", + "interval": 3, + "spacing": 1, + "on-click": "omarchy-launch-wifi" + }, + "battery": { + "format": "{capacity}% {icon}", + "format-discharging": "{capacity}% {icon}", + "format-charging": "{capacity}% {icon}", + "format-plugged": "", + "format-icons": { + "charging": [ + "󰢜", + "󰂆", + "󰂇", + "󰂈", + "󰢝", + "󰂉", + "󰢞", + "󰂊", + "󰂋", + "󰂅" + ], + "default": [ + "󰁺", + "󰁻", + "󰁼", + "󰁽", + "󰁾", + "󰁿", + "󰂀", + "󰂁", + "󰂂", + "󰁹" + ] + }, + "format-full": "󰂅 {capacity}%", + "tooltip-format-discharging": "{timeTo}", + "tooltip-format-charging": "{timeTo}", + "interval": 5, + "on-click": "omarchy-menu power", + "on-click-right": "notify-send -u low \"$(omarchy-battery-status)\"", + "states": { + "warning": 20, + "critical": 10 + } + }, + "bluetooth": { + "format": "", + "format-disabled": "󰂲", + "format-connected": "󰂱", + "tooltip-format": "Devices connected: {num_connections}", + "on-click": "omarchy-launch-bluetooth" + }, + "pulseaudio#input": { + "format-source": "", + "format-source-muted": "", + "format": "{format_source}", + "tooltip-format": "{format_source} {source_volume}%", + "scroll-step": 1, + "smooth-scrolling-threshold": 1, + "max-volume": 100, + "on-click": "omarchy-launch-audio", + "on-click-right": "pamixer -t", + "on-scroll-up": "pactl set-source-volume @DEFAULT_SOURCE@ +1%", + "on-scroll-down": "pactl set-source-volume @DEFAULT_SOURCE@ -1%", + }, + "pulseaudio#output": { + "format": "{icon}", + "tooltip-format": "{icon} {volume}%", + "format-muted": "", + "format-icons": { + "headphone": "", + "default": ["", "", ""] + }, + "max-volume": 100, + "scroll-step": 2, + "smooth-scrolling-threshold": 1, + "on-click": "omarchy-launch-audio", + "on-click-right": "pamixer -t" + }, + "custom/updatespacman": { + "format": "{}{icon}", + "return-type": "json", + "format-icons": { + "has-updates": " 󰏖", + "updated": "" + }, + "exec-if": "which waybar-module-pacman-updates", + "exec": "waybar-module-pacman-updates --no-zero-output" + }, + "custom/screenrecording-indicator": { + "on-click": "omarchy-capture-screenrecording", + "exec": "$OMARCHY_PATH/default/waybar/indicators/screen-recording.sh", + "signal": 8, + "return-type": "json" + }, + "group/tray-expander": { + "orientation": "inherit", + "drawer": { + "transition-duration": 600, + "children-class": "tray-group-item" + }, + "modules": [ + "custom/expand-icon", + "backlight", + "bluetooth", + "pulseaudio#output", + "pulseaudio#input", + "power-profiles-daemon", + "network", + "memory", + "cpu", + "battery" + ] + }, + "custom/expand-icon": { + "format": "", + "tooltip": false + }, + "tray": { + "icon-size": 12, + "spacing": 5, + "cursor": true, + "show-passive-items": true + }, + +} diff --git a/dot_config/waybar/style.css b/dot_config/waybar/style.css new file mode 100644 index 0000000..db432e8 --- /dev/null +++ b/dot_config/waybar/style.css @@ -0,0 +1,237 @@ +@import "/home/prad/.local/state/omarchy/current/theme/waybar.css"; + + +* { + /* background-color: @background; */ + /* color: @foreground; */ + + border-radius: 0; + border: none; + text-shadow: none; + padding: 0; + min-height: 0; + font-family: 'CaskaydiaCove Nerd Font Propo'; +} + +#waybar { + background-color: @transparent; +} + +#waybar > box { + color: @foreground; + background-color: @background; + margin: 2px 6px 2px 6px; + padding: 0px; + box-shadow: 0 1px 2px rgba(0, 0, 0, 1); + border-radius: 4px; + font-weight: 700; + font-size: 12px; + transition-property: background-color; + transition-duration: .5s; + min-height: 30px; +} + +.modules-left { + margin-left: 4px; +} + +.modules-right { + margin-right: 4px; +} + +#right2 { + margin-right: 4px; + padding-top: 8px; +} + +#workspaces { + padding: 0 0px; + margin-top: 2px; +} + +#workspaces button { + all: initial; + padding: 0 1px; + margin: 0 3px; + opacity: 0.55; + color: @foreground; + font-size: 12px; + font-weight: bold; +} + +#workspaces button.active { + color: @foreground; + opacity: 1.0; + font-size: 12px; +} + +#workspaces button.empty { + opacity: 0.2; + font-size: 12px; + color: @foreground; +} + +#workspaces button.empty.active { + font-size: 12px; + color: @foreground; + opacity: 1.0; +} + + +#custom-expand-icon, +#tray, +#cpu, +#memory, +#battery, +#backlight, +#network, +#bluetooth, +#pulseaudio, +#power-profiles-daemon, +#idle_inhibitor, +#custom-windowpill, +#group-tray-expander, +#custom-update, +#custom-voxtype, +#custom-voxtype.recording, +#custom-voxtype.transcribing, +#custom-expand-icon, +#custom-omarchy, +#custom-updatespacman, +#custom-screenrecording-indicator { + min-width: 12px; + padding-left: 6px; + padding-right: 6px; + margin: 1px 1px 1px 1px; + padding-top: 0px; + padding-bottom: 0px; +} + +#clock{ + padding-top: 4px; +} + + + +tooltip { + padding: 2px; +} + +#custom-omarchy { + padding-top: 2px; + padding-left: 3px; +} + +#custom-update { + font-size: 10px; +} + +#custom-expand-icon { + margin-right: 0px; + opacity: 0.5; +} + +#tray { + background-color: @background; +} + +#tray > .passive { + -gtk-icon-effect: dim; +} + +#tray > .needs-attention { + -gtk-icon-effect: highlight; + background-color: @background; +} + +.hidden { + opacity: 0; +} + +#power-profiles-daemon, +#power-profiles-daemon.performance, +#power-profiles-daemon.balanced, +#power-profiles-daemon.power-saver { + margin: 0; + padding-left: 2px; +} + +#custom-updatespacman { + opacity: 0.55; +} + +#custom-separator { + opacity: 0.25; + padding-left: 2px; + padding-right: 4px; +} + +#custom-separator3 { + opacity: 0.25; + padding-left: 2px; + padding-right: 6px; +} + +tooltip { + padding: 4px; + background: @background; + font-size: 12px; + border-radius: 8px; + border: 1.5px solid rgba(255, 255, 255, 0.25); +} +tooltip label { + color: @foreground; +} + + +/* Specific animation Module */ + +#custom-screenrecording-indicator { + animation-timing-function: linear; + animation-iteration-count: infinite; + animation-direction: alternate; + color: transparent; +} + +#custom-screenrecording-indicator.active { + color: #eb7087; + animation-name: blink-recording; + animation-duration: 0.5s; +} + +@keyframes blink-recording { + to { + color: @background; + } +} + +#custom-voxtype { + min-width: 12px; + margin: 0px 0 0 0px; +} + +#custom-voxtype.recording { + color: #a55555; +} + +#battery.warning { + color: #c95d0f; + background-color: @background; +} + +@keyframes blink2 { + to { + background-color: @background; + color: #f53c3c; + } +} + +#battery.critical:not(.charging) { + background-color: transparent; + color: #e6d8ba; + animation-name: blink2; + animation-duration: 0.5s; + animation-timing-function: steps(12); + animation-iteration-count: infinite; + animation-direction: alternate; +} diff --git a/dot_config/waybar/window_pill.py b/dot_config/waybar/window_pill.py new file mode 100644 index 0000000..d6e9e33 --- /dev/null +++ b/dot_config/waybar/window_pill.py @@ -0,0 +1,90 @@ +#!/usr/bin/env python3 +import os +import socket +import sys +import json +import subprocess +import html +import re + +# Configuration +MAX_TITLE_LEN = 80 + +def get_hyprland_data(command): + try: + output = subprocess.check_output(["hyprctl", command, "-j"], text=True) + return json.loads(output) + except Exception: + return {} + +def print_status(): + # 1. Get Active Window + window = get_hyprland_data("activewindow") + + # Defaults for "Desktop" state + top_line = "Desktop" + bottom_line = "" + + # 2. Determine State + if window and window.get("address"): + # CASE A: Window is active + top_line = window.get("class", "Unknown") or "Unknown" + + title = window.get("title", "") or "" + + # Safely get class (Hyprland may return null) + app_class = (window.get("class") or "").lower() + + # Remove Discord/Vesktop unread counter like "(209) " + if "discord" in app_class or "vesktop" in app_class: + title = re.sub(r"^\(\d+\)\s*", "", title) + title = re.sub(r"^Discord\s*\|\s*", "", title) + + if len(title) > MAX_TITLE_LEN: + title = title[:MAX_TITLE_LEN - 3] + + bottom_line = title + + else: + # CASE B: Desktop / Empty Workspace + workspace = get_hyprland_data("activeworkspace") + ws_id = workspace.get("id", "1") + top_line = f"Workspace {ws_id}" + bottom_line = "\u00A0" + + # 3. Sanitize for Pango + top_line = html.escape(top_line) + bottom_line = html.escape(bottom_line) + + # 4. Format with Pango Markup + text = ( + f"{top_line}\n " + f"{bottom_line}" + ) + + # 5. Output JSON + print(json.dumps({ + "text": text, + "class": "custom-window", + "tooltip": f"{top_line}: {bottom_line}" + }), flush=True) + +# Initial Run +print_status() + +# Listen to Hyprland Socket for instant updates +hypr_sig = os.getenv("HYPRLAND_INSTANCE_SIGNATURE") +if not hypr_sig: + sys.exit(1) + +socket_path = f"/tmp/hypr/{hypr_sig}/.socket2.sock" + +if os.path.exists(socket_path): + with socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) as client: + client.connect(socket_path) + while True: + data = client.recv(1024).decode("utf-8", errors="ignore") + if not data: + break + if "activewindow>>" in data or "workspace>>" in data: + print_status() diff --git a/dot_config/yazi/theme.toml b/dot_config/yazi/theme.toml index e321a81..3224748 100644 --- a/dot_config/yazi/theme.toml +++ b/dot_config/yazi/theme.toml @@ -1,11 +1,12 @@ [flavor] light = "cyberdream" -dark = "cyberdream" +dark = "cyberdream" use = "cyberdream" [icon] prepend_dirs = [ { name = "Applications", text = "" }, + { name = "Code", text = "" }, { name = "Desktop", text = "" }, { name = "Developer", text = "" }, { name = "github.com", text = "" }, @@ -13,16 +14,16 @@ prepend_dirs = [ { name = "wltbs", text = "󱃪" }, { name = "Shared", text = "" }, { name = "Templates", text = "" }, - {name = "env", text = ""}, - {name = "go", text = "󰟓"}, - {name = "js", text = ""}, - {name = "dart", text = ""}, - {name = "py", text = ""}, - {name = "rs", text = ""}, - {name = "tex", text = ""}, - {name = "md", text = ""}, - {name = "docs", text = ""}, - {name = "prad.codes", text = ""} + { name = "env", text = "" }, + { name = "go", text = "󰟓" }, + { name = "js", text = "" }, + { name = "dart", text = "" }, + { name = "py", text = "" }, + { name = "rs", text = "" }, + { name = "tex", text = "" }, + { name = "md", text = "" }, + { name = "docs", text = "" }, + { name = "prad.codes", text = "" }, ]