From f10875412a7b8e711c5e238dbce066ac84b79046 Mon Sep 17 00:00:00 2001 From: Michael Housh Date: Wed, 24 Sep 2025 15:43:07 -0400 Subject: [PATCH] feat: Begins waybar configuration, adds theme for eza, some updates to other configuration. --- eza/theme.yml | 104 ++++++++ ghostty/config | 11 +- hypr/autostart.conf | 15 ++ hypr/hyprland.conf | 56 +--- hypr/input.conf | 36 +++ hypr/keybinds.conf | 3 +- hypr/monitors.conf | 2 +- nvim/lazynvim/lua/plugins/lsp.lua | 1 - scripts/arch/lid.sh | 9 +- scripts/arch/waybar-restart | 4 + tree-sitter/config.json | 68 +++++ walker/config.toml | 138 ++++++++++ waybar/config.jsonc | 414 +++++++++++++++--------------- waybar/power_menu.xml | 29 +++ waybar/style.css | 254 ++++++++++-------- 15 files changed, 767 insertions(+), 377 deletions(-) create mode 100644 eza/theme.yml create mode 100644 hypr/autostart.conf create mode 100644 hypr/input.conf create mode 100755 scripts/arch/waybar-restart create mode 100644 tree-sitter/config.json create mode 100644 walker/config.toml create mode 100644 waybar/power_menu.xml diff --git a/eza/theme.yml b/eza/theme.yml new file mode 100644 index 0000000..5c48624 --- /dev/null +++ b/eza/theme.yml @@ -0,0 +1,104 @@ +# see https://github.com/eza-community/eza-themes/blob/main/themes/catppuccin.yml + +colourful: true + +filekinds: + normal: { foreground: "#BAC2DE" } + directory: { foreground: "#89B4FA" } + symlink: { foreground: "#89DCEB" } + pipe: { foreground: "#7F849C" } + block_device: { foreground: "#EBA0AC" } + char_device: { foreground: "#EBA0AC" } + socket: { foreground: "#585B70" } + special: { foreground: "#CBA6F7" } + executable: { foreground: "#A6E3A1" } + mount_point: { foreground: "#74C7EC" } + +perms: + user_read: { foreground: "#CDD6F4" } + user_write: { foreground: "#F9E2AF" } + user_execute_file: { foreground: "#A6E3A1" } + user_execute_other: { foreground: "#A6E3A1" } + group_read: { foreground: "#BAC2DE" } + group_write: { foreground: "#F9E2AF" } + group_execute: { foreground: "#A6E3A1" } + other_read: { foreground: "#A6ADC8" } + other_write: { foreground: "#F9E2AF" } + other_execute: { foreground: "#A6E3A1" } + special_user_file: { foreground: "#CBA6F7" } + special_other: { foreground: "#585B70" } + attribute: { foreground: "#A6ADC8" } + +size: + major: { foreground: "#A6ADC8" } + minor: { foreground: "#89DCEB" } + number_byte: { foreground: "#CDD6F4" } + number_kilo: { foreground: "#BAC2DE" } + number_mega: { foreground: "#89B4FA" } + number_giga: { foreground: "#CBA6F7" } + number_huge: { foreground: "#CBA6F7" } + unit_byte: { foreground: "#A6ADC8" } + unit_kilo: { foreground: "#89B4FA" } + unit_mega: { foreground: "#CBA6F7" } + unit_giga: { foreground: "#CBA6F7" } + unit_huge: { foreground: "#74C7EC" } + +users: + user_you: { foreground: "#CDD6F4" } + user_root: { foreground: "#F38BA8" } + user_other: { foreground: "#CBA6F7" } + group_yours: { foreground: "#BAC2DE" } + group_other: { foreground: "#7F849C" } + group_root: { foreground: "#F38BA8" } + +links: + normal: { foreground: "#89DCEB" } + multi_link_file: { foreground: "#74C7EC" } + +git: + new: { foreground: "#A6E3A1" } + modified: { foreground: "#F9E2AF" } + deleted: { foreground: "#F38BA8" } + renamed: { foreground: "#94E2D5" } + typechange: { foreground: "#F5C2E7" } + ignored: { foreground: "#7F849C" } + conflicted: { foreground: "#EBA0AC" } + +git_repo: + branch_main: { foreground: "#CDD6F4" } + branch_other: { foreground: "#CBA6F7" } + git_clean: { foreground: "#A6E3A1" } + git_dirty: { foreground: "#F38BA8" } + +security_context: + colon: { foreground: "#7F849C" } + user: { foreground: "#BAC2DE" } + role: { foreground: "#CBA6F7" } + typ: { foreground: "#585B70" } + range: { foreground: "#CBA6F7" } + +file_type: + image: { foreground: "#F9E2AF" } + video: { foreground: "#F38BA8" } + music: { foreground: "#A6E3A1" } + lossless: { foreground: "#94E2D5" } + crypto: { foreground: "#585B70" } + document: { foreground: "#CDD6F4" } + compressed: { foreground: "#F5C2E7" } + temp: { foreground: "#EBA0AC" } + compiled: { foreground: "#74C7EC" } + build: { foreground: "#585B70" } + source: { foreground: "#89B4FA" } + +punctuation: { foreground: "#7F849C" } +date: { foreground: "#F9E2AF" } +inode: { foreground: "#A6ADC8" } +blocks: { foreground: "#9399B2" } +header: { foreground: "#CDD6F4" } +octal: { foreground: "#94E2D5" } +flags: { foreground: "#CBA6F7" } + +symlink_path: { foreground: "#89DCEB" } +control_char: { foreground: "#74C7EC" } +broken_symlink: { foreground: "#F38BA8" } +broken_path_overlay: { foreground: "#585B70" } diff --git a/ghostty/config b/ghostty/config index f0c1317..e79bf64 100644 --- a/ghostty/config +++ b/ghostty/config @@ -15,12 +15,13 @@ window-decoration = true copy-on-select = true quit-after-last-window-closed = true +quit-after-last-window-closed-delay = 5m -macos-auto-secure-input = true -macos-non-native-fullscreen = visible-menu -macos-titlebar-style = transparent -macos-titlebar-proxy-icon = hidden -macos-icon = custom-style +# macos-auto-secure-input = true +# macos-non-native-fullscreen = visible-menu +# macos-titlebar-style = transparent +# macos-titlebar-proxy-icon = hidden +# macos-icon = custom-style keybind = super+shift+t=toggle_quick_terminal diff --git a/hypr/autostart.conf b/hypr/autostart.conf new file mode 100644 index 0000000..f58a88e --- /dev/null +++ b/hypr/autostart.conf @@ -0,0 +1,15 @@ + +################# +### AUTOSTART ### +################# + +# Autostart necessary processes (like notifications daemons, status bars, etc.) +# Or execute your favorite apps at launch like this: + +exec-once = uwsm app -- elephant +exec-once = uwsm app -- hyprpaper +exec-once = uwsm app -- swaync +exec-once = uwsm app -- walker --gapplication-service & +exec-once = uwsm app -- waybar + + diff --git a/hypr/hyprland.conf b/hypr/hyprland.conf index e9c2fcb..695655c 100644 --- a/hypr/hyprland.conf +++ b/hypr/hyprland.conf @@ -10,18 +10,8 @@ source = ~/.config/hypr/env.conf source = ~/.config/hypr/monitors.conf source = ~/.config/hypr/windows.conf source = ~/.config/hypr/keybinds.conf - -################# -### AUTOSTART ### -################# - -# Autostart necessary processes (like notifications daemons, status bars, etc.) -# Or execute your favorite apps at launch like this: - -exec-once = hyprpaper -exec-once = swaync -exec-once = elephant -exec-once = waybar +source = ~/.config/hypr/input.conf +source = ~/.config/hypr/autostart.conf ################### ### PERMISSIONS ### @@ -143,49 +133,11 @@ dwindle { master { new_status = master mfact = 0.50 # Set master window to be 50% - orientation = right # set master to be on the right. + orientation = left # set master to be on the right. } # https://wiki.hyprland.org/Configuring/Variables/#misc misc { force_default_wallpaper = 1 # Set to 0 or 1 to disable the anime mascot wallpapers - disable_hyprland_logo = false # If true disables the random hyprland logo / anime girl background. :( -} - - -############# -### INPUT ### -############# - -# https://wiki.hyprland.org/Configuring/Variables/#input -input { - kb_layout = us - kb_variant = - kb_model = - kb_options = ctrl:nocaps - kb_rules = - - repeat_rate = 35 - repeat_delay = 200 - - follow_mouse = 2 - - sensitivity = 0 # -1.0 - 1.0, 0 means no modification. - - touchpad { - natural_scroll = true - tap-to-click = false - } -} - -# https://wiki.hyprland.org/Configuring/Variables/#gestures -gestures { - workspace_swipe = false -} - -# Example per-device config -# See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more -device { - name = epic-mouse-v1 - sensitivity = -0.5 + disable_hyprland_logo = true # If true disables the random hyprland logo / anime girl background. :( } diff --git a/hypr/input.conf b/hypr/input.conf new file mode 100644 index 0000000..fb205da --- /dev/null +++ b/hypr/input.conf @@ -0,0 +1,36 @@ +############# +### INPUT ### +############# + +# https://wiki.hyprland.org/Configuring/Variables/#input +input { + kb_layout = us + kb_variant = + kb_model = + kb_options = ctrl:nocaps + kb_rules = + + repeat_rate = 35 + repeat_delay = 200 + + follow_mouse = 2 + + sensitivity = 0 # -1.0 - 1.0, 0 means no modification. + + touchpad { + natural_scroll = true + tap-to-click = false + } +} + +# https://wiki.hyprland.org/Configuring/Variables/#gestures +gestures { + workspace_swipe = false +} + +# Example per-device config +# See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more +device { + name = epic-mouse-v1 + sensitivity = -0.5 +} diff --git a/hypr/keybinds.conf b/hypr/keybinds.conf index cd86782..51b6eaa 100644 --- a/hypr/keybinds.conf +++ b/hypr/keybinds.conf @@ -39,8 +39,9 @@ bind = $mainMod, G, exec, $pwa "https://git.housh.dev" bind = $mainMod, N, exec, $terminal -e nvim bind = $mainMod, P, exec, $pwa "https://pass.proton.me" bind = $mainMod, Y, exec, $pwa "https://youtube.com" - bind = $mainMod, W, killactive, +bind = $mainMod SHIFT, R, exec, ~/.local/bin/waybar-restart + # TODO: change modifier key. #bind = $mainMod SHIFT, L, exec, hyprlock # TODO: change modifier key. diff --git a/hypr/monitors.conf b/hypr/monitors.conf index d3435eb..41bdb32 100644 --- a/hypr/monitors.conf +++ b/hypr/monitors.conf @@ -4,6 +4,6 @@ # See https://wiki.hyprland.org/Configuring/Monitors/ monitor= ,preferred,auto,auto -monitor = HDMI-A-1, preferred, 0x0, 1.666667 +monitor = HDMI-A-1, preferred, 0x0, auto diff --git a/nvim/lazynvim/lua/plugins/lsp.lua b/nvim/lazynvim/lua/plugins/lsp.lua index c96c9c5..bc0c172 100644 --- a/nvim/lazynvim/lua/plugins/lsp.lua +++ b/nvim/lazynvim/lua/plugins/lsp.lua @@ -25,7 +25,6 @@ return { "jq", "latex", "make", - "swift", }, }, }, diff --git a/scripts/arch/lid.sh b/scripts/arch/lid.sh index 42640fa..11f26ba 100755 --- a/scripts/arch/lid.sh +++ b/scripts/arch/lid.sh @@ -1,6 +1,13 @@ #!/bin/bash -INTERNAL="eDP-1" # or eDP-1, check with `hyprctl monitors` +INTERNAL="eDP-1" # check with `hyprctl monitors` + +# Check lid event handler with: +# +# grep -A5 -i lid /proc/bus/input/devices +# +# The event is contained in the H: Handlers=kbd event +# DEVICE="/dev/input/event0" # replace with your lid event device evtest --grab "$DEVICE" | diff --git a/scripts/arch/waybar-restart b/scripts/arch/waybar-restart new file mode 100755 index 0000000..a93feb1 --- /dev/null +++ b/scripts/arch/waybar-restart @@ -0,0 +1,4 @@ +#!/bin/zsh + +pkill -x waybar +setsid uwsm app -- waybar >/dev/null 2>&1 & diff --git a/tree-sitter/config.json b/tree-sitter/config.json new file mode 100644 index 0000000..9847f64 --- /dev/null +++ b/tree-sitter/config.json @@ -0,0 +1,68 @@ +{ + "parser-directories": [ + "/home/michael/github", + "/home/michael/src", + "/home/michael/source", + "/home/michael/projects", + "/home/michael/dev", + "/home/michael/git" + ], + "theme": { + "attribute": { + "color": 124, + "italic": true + }, + "comment": { + "color": 245, + "italic": true + }, + "constant": 94, + "constant.builtin": { + "bold": true, + "color": 94 + }, + "constructor": 136, + "embedded": null, + "function": 26, + "function.builtin": { + "bold": true, + "color": 26 + }, + "keyword": 56, + "module": 136, + "number": { + "bold": true, + "color": 94 + }, + "operator": { + "bold": true, + "color": 239 + }, + "property": 124, + "property.builtin": { + "bold": true, + "color": 124 + }, + "punctuation": 239, + "punctuation.bracket": 239, + "punctuation.delimiter": 239, + "punctuation.special": 239, + "string": 28, + "string.special": 30, + "tag": 18, + "type": 23, + "type.builtin": { + "bold": true, + "color": 23 + }, + "variable": 252, + "variable.builtin": { + "bold": true, + "color": 252 + }, + "variable.parameter": { + "color": 252, + "underline": true + } + } +} \ No newline at end of file diff --git a/walker/config.toml b/walker/config.toml new file mode 100644 index 0000000..364284c --- /dev/null +++ b/walker/config.toml @@ -0,0 +1,138 @@ +force_keyboard_focus = false # forces keyboard forcus to stay in Walker +close_when_open = true # close walker when invoking while already opened +selection_wrap = false # wrap list if at bottom or top +global_argument_delimiter = "#" # query: firefox#https://benz.dev => part after delimiter will be ignored when querying. this should be the same as in the elephant config +keep_open_modifier = "shift" # won't close on activation, but rather select the next item in the list +exact_search_prefix = "'" # disable fuzzy searching +theme = "default" # theme to use +disable_mouse = false # disable mouse (on input and list only) + +[shell] +anchor_top = true +anchor_bottom = true +anchor_left = true +anchor_right = true + +[placeholders] +"default" = { input = "Search", list = "No Results" } # placeholders for input and empty list, key is the providers name, so f.e. "desktopapplications" or "menus:other" + +[keybinds] +close = "Escape" +next = "Down" +previous = "Up" +toggle_exact = "ctrl e" +resume_last_query = "ctrl r" +quick_activate = ["F1", "F2", "F3", "F4"] + +[providers] +default = [ + "desktopapplications", + "calc", + "runner", + "menus", + "websearch", +] # providers to be queried by default +empty = ["desktopapplications"] # providers to be queried when query is empty + +[[providers.prefixes]] +prefix = ";" +provider = "providerlist" + +[[providers.prefixes]] +prefix = "/" +provider = "files" + +[[providers.prefixes]] +prefix = "." +provider = "symbols" + +[[providers.prefixes]] +prefix = "!" +provider = "todo" + +[[providers.prefixes]] +prefix = "=" +provider = "calc" + +[[providers.prefixes]] +prefix = "@" +provider = "websearch" + +[[providers.prefixes]] +prefix = ":" +provider = "clipboard" + +[providers.archlinuxpkgs] +default = "install" +install = "Return" +remove = "ctrl d" + +[providers.calc] +default = "copy" +copy = "Return" +save = "ctrl s" +delete = "ctrl d" + +[providers.websearch] +default = "search" +search = "Return" +remove_history = "ctrl BackSpace" + +[providers.providerlist] +default = "activate" +activate = "Return" + +[providers.clipboard] +time_format = "%d.%m. - %H:%M" # format for the clipboard item date +default = "copy" +copy = "Return" +delete = "ctrl d" +edit = "ctrl o" +toggle_images_only = "ctrl i" + +[providers.desktopapplications] +default = "start" +start = "Return" +start_keep_open = "shift Return" +remove_history = "ctrl BackSpace" +toggle_pin = "ctrl p" + +[providers.files] +default = "open" +open = "Return" +open_dir = "ctrl Return" +copy_path = "ctrl shift c" +copy_file = "ctrl c" + +[providers.todo] +default = "save" +save = "Return" +delete = "ctrl d" +mark_active = "ctrl a" +mark_done = "ctrl f" +clear = "ctrl x" + +[providers.runner] +default = "start" +start = "Return" +start_terminal = "shift Return" +remove_history = "ctrl BackSpace" + +[providers.dmenu] +default = "select" +select = "Return" + +[providers.symbols] +default = "copy" +copy = "Return" +remove_history = "ctrl BackSpace" + +[providers.unicode] +default = "copy" +copy = "Return" +remove_history = "ctrl BackSpace" + +[providers.menus] +default = "activate" +activate = "Return" +remove_history = "ctrl BackSpace" diff --git a/waybar/config.jsonc b/waybar/config.jsonc index 67d5ff5..66bd6a3 100644 --- a/waybar/config.jsonc +++ b/waybar/config.jsonc @@ -1,219 +1,229 @@ // -*- mode: jsonc -*- { - // "layer": "top", // Waybar at top layer - // "position": "bottom", // Waybar position (top|bottom|left|right) - "height": 30, // Waybar height (to be removed for auto height) - // "width": 1280, // Waybar width - "spacing": 4, // Gaps between modules (4px) - // Choose the order of the modules - "modules-left": [ - "sway/workspaces", - "sway/mode", - "sway/scratchpad", - "custom/media" - ], - "modules-center": [ - "sway/window" - ], - "modules-right": [ - "mpd", - "idle_inhibitor", - "pulseaudio", - "network", - "power-profiles-daemon", - "cpu", - "memory", - "temperature", - "backlight", - "keyboard-state", - "sway/language", - "battery", - "battery#bat2", - "clock", - "tray", - "custom/power" - ], - // Modules configuration - // "sway/workspaces": { - // "disable-scroll": true, - // "all-outputs": true, - // "warp-on-scroll": false, - // "format": "{name}: {icon}", - // "format-icons": { - // "1": "", - // "2": "", - // "3": "", - // "4": "", - // "5": "", - // "urgent": "", - // "focused": "", - // "default": "" - // } + "reload_style_on_change": true, + "layer": "top", // Waybar at top layer + "position": "top", // Waybar position (top|bottom|left|right) + "height": 26, // Waybar height (to be removed for auto height) + // "width": 1280, // Waybar width + "spacing": 4, // Gaps between modules (4px) + // Choose the order of the modules + "modules-left": [ + "hyprland/workspaces", + "sway/mode", + "sway/scratchpad", + "custom/media", + ], + "modules-center": ["clock"], + "modules-right": [ + "mpd", + "idle_inhibitor", + "pulseaudio", + "network", + "cpu", + "memory", + "temperature", + "backlight", + "battery", + "battery#bat2", + "tray", + "custom/power", + ], + "hyprland/workspaces": { + "on-click": "activate", + "format": "{icon}", + "format-icons": { + "default": "", + "1": "1", + "2": "2", + "3": "3", + "4": "4", + "5": "5", + "6": "6", + "7": "7", + "8": "8", + "9": "9", + "active": "󱓻", + }, + // "persistent-workspaces": { + // "1": [], + // "2": [], + // "3": [], + // "4": [], + // "5": [], // }, - "keyboard-state": { - "numlock": true, - "capslock": true, - "format": "{name} {icon}", - "format-icons": { - "locked": "", - "unlocked": "" - } + }, + "sway/scratchpad": { + "format": "{icon} {count}", + "show-empty": false, + "format-icons": ["", ""], + "tooltip": true, + "tooltip-format": "{app}: {title}", + }, + "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": 5, + "consume-icons": { + "on": " ", }, - "sway/mode": { - "format": "{}" + "random-icons": { + "off": " ", + "on": " ", }, - "sway/scratchpad": { - "format": "{icon} {count}", - "show-empty": false, - "format-icons": ["", ""], - "tooltip": true, - "tooltip-format": "{app}: {title}" + "repeat-icons": { + "on": " ", }, - "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": 5, - "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)" + "single-icons": { + "on": "1 ", }, - "idle_inhibitor": { - "format": "{icon}", - "format-icons": { - "activated": "", - "deactivated": "" - } + "state-icons": { + "paused": "", + "playing": "", }, - "tray": { - // "icon-size": 21, - "spacing": 10, - // "icons": { - // "blueman": "bluetooth", - // "TelegramDesktop": "$HOME/.local/share/icons/hicolor/16x16/apps/telegram.png" - // } + "tooltip-format": "MPD (connected)", + "tooltip-format-disconnected": "MPD (disconnected)", + }, + "idle_inhibitor": { + "format": "{icon}", + "format-icons": { + "activated": "", + "deactivated": "", }, - "clock": { - // "timezone": "America/New_York", - "tooltip-format": "{:%Y %B}\n{calendar}", - "format-alt": "{:%Y-%m-%d}" + }, + "tray": { + // "icon-size": 21, + "spacing": 10, + // "icons": { + // "blueman": "bluetooth", + // "TelegramDesktop": "$HOME/.local/share/icons/hicolor/16x16/apps/telegram.png" + // } + }, + "clock": { + // "timezone": "America/New_York", + "tooltip-format": "{calendar}", + // "format-alt": "{:%Y-%m-%d}", + "format": "󰭦 {:%D - %H:%M}", + "calendar": { + "mode": "year", + "mode-mon-col": 3, + "weeks-pos": "right", + "on-scroll": 1, + "format": { + "months": "{}", + "days": "{}", + "weeks": "W{}", + "weekdays": "{}", + "today": "{}", + }, }, - "cpu": { - "format": "{usage}% ", - "tooltip": false + }, + "cpu": { + "format": "{usage}% ", + "tooltip": false, + }, + "memory": { + "format": "{}% ", + }, + "temperature": { + // "thermal-zone": 2, + // "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input", + "critical-threshold": 80, + // "format-critical": "{temperatureC}°C {icon}", + "format": "{temperatureC}°C {icon}", + "format-icons": ["", "", ""], + }, + "backlight": { + // "device": "acpi_video1", + "format": "{percent}% {icon}", + "format-icons": ["", "", "", "", "", "", "", "", ""], + }, + "battery": { + "states": { + // "good": 95, + "warning": 30, + "critical": 15, }, - "memory": { - "format": "{}% " + "format": "{capacity}% {icon}", + "format-full": "{capacity}% {icon}", + "format-charging": "{capacity}% ", + "format-plugged": "{capacity}% ", + "format-alt": "{time} {icon}", + // "format-good": "", // An empty format will hide the module + // "format-full": "", + "format-icons": ["", "", "", "", ""], + }, + "battery#bat2": { + "bat": "BAT2", + }, + "power-profiles-daemon": { + "format": "{icon}", + "tooltip-format": "Power profile: {profile}\nDriver: {driver}", + "tooltip": true, + "format-icons": { + "default": "", + "performance": "", + "balanced": "", + "power-saver": "", }, - "temperature": { - // "thermal-zone": 2, - // "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input", - "critical-threshold": 80, - // "format-critical": "{temperatureC}°C {icon}", - "format": "{temperatureC}°C {icon}", - "format-icons": ["", "", ""] + }, + "network": { + // "interface": "wlp2*", // (Optional) To force the use of this interface + "format-wifi": "{icon}: ({signalStrength}%)", + "format-ethernet": "{ipaddr}/{cidr} ", + "tooltip-format": "{essid} - {ifname} via {gwaddr} ", + "format-linked": "{ifname} (No IP) ", + "format-disconnected": "Disconnected ⚠", + "format-alt": "{ifname}: {ipaddr}/{cidr}", + "signalStrength": { + "low": 20, + "medium": 60, + "high": 100, }, - "backlight": { - // "device": "acpi_video1", - "format": "{percent}% {icon}", - "format-icons": ["", "", "", "", "", "", "", "", ""] + "format-icons": ["󰤯", "󰤟", "󰤢", "󰤨"], // Icons for different signal strengths + }, + "pulseaudio": { + // "scroll-step": 1, // %, can be a float + "format": "{volume}% {icon} {format_source}", + "format-bluetooth": "{volume}% {icon} {format_source}", + "format-bluetooth-muted": " {icon} {format_source}", + "format-muted": " {format_source}", + "format-source": "{volume}% ", + "format-source-muted": "", + "format-icons": { + "headphone": "", + "hands-free": "", + "headset": "", + "phone": "", + "portable": "", + "car": "", + "default": ["", "", ""], }, - "battery": { - "states": { - // "good": 95, - "warning": 30, - "critical": 15 - }, - "format": "{capacity}% {icon}", - "format-full": "{capacity}% {icon}", - "format-charging": "{capacity}% ", - "format-plugged": "{capacity}% ", - "format-alt": "{time} {icon}", - // "format-good": "", // An empty format will hide the module - // "format-full": "", - "format-icons": ["", "", "", "", ""] + "on-click": "pavucontrol", + }, + "custom/media": { + "format": "{icon} {text}", + "return-type": "json", + "max-length": 40, + "format-icons": { + "spotify": "", + "default": "🎜", }, - "battery#bat2": { - "bat": "BAT2" + "escape": true, + "exec": "$HOME/.config/waybar/mediaplayer.py 2> /dev/null", // Script in resources folder + // "exec": "$HOME/.config/waybar/mediaplayer.py --player spotify 2> /dev/null" // Filter player based on name + }, + "custom/power": { + "format": "⏻ ", + "tooltip": false, + "menu": "on-click", + "menu-file": "$HOME/.config/waybar/power_menu.xml", // Menu file in resources folder + "menu-actions": { + "shutdown": "shutdown", + "reboot": "reboot", + "suspend": "systemctl suspend", + "hibernate": "systemctl hibernate", }, - "power-profiles-daemon": { - "format": "{icon}", - "tooltip-format": "Power profile: {profile}\nDriver: {driver}", - "tooltip": true, - "format-icons": { - "default": "", - "performance": "", - "balanced": "", - "power-saver": "" - } - }, - "network": { - // "interface": "wlp2*", // (Optional) To force the use of this interface - "format-wifi": "{essid} ({signalStrength}%) ", - "format-ethernet": "{ipaddr}/{cidr} ", - "tooltip-format": "{ifname} via {gwaddr} ", - "format-linked": "{ifname} (No IP) ", - "format-disconnected": "Disconnected ⚠", - "format-alt": "{ifname}: {ipaddr}/{cidr}" - }, - "pulseaudio": { - // "scroll-step": 1, // %, can be a float - "format": "{volume}% {icon} {format_source}", - "format-bluetooth": "{volume}% {icon} {format_source}", - "format-bluetooth-muted": " {icon} {format_source}", - "format-muted": " {format_source}", - "format-source": "{volume}% ", - "format-source-muted": "", - "format-icons": { - "headphone": "", - "hands-free": "", - "headset": "", - "phone": "", - "portable": "", - "car": "", - "default": ["", "", ""] - }, - "on-click": "pavucontrol" - }, - "custom/media": { - "format": "{icon} {text}", - "return-type": "json", - "max-length": 40, - "format-icons": { - "spotify": "", - "default": "🎜" - }, - "escape": true, - "exec": "$HOME/.config/waybar/mediaplayer.py 2> /dev/null" // Script in resources folder - // "exec": "$HOME/.config/waybar/mediaplayer.py --player spotify 2> /dev/null" // Filter player based on name - }, - "custom/power": { - "format" : "⏻ ", - "tooltip": false, - "menu": "on-click", - "menu-file": "$HOME/.config/waybar/power_menu.xml", // Menu file in resources folder - "menu-actions": { - "shutdown": "shutdown", - "reboot": "reboot", - "suspend": "systemctl suspend", - "hibernate": "systemctl hibernate" - } - } + }, } diff --git a/waybar/power_menu.xml b/waybar/power_menu.xml new file mode 100644 index 0000000..144f6a7 --- /dev/null +++ b/waybar/power_menu.xml @@ -0,0 +1,29 @@ + + + + + + + Suspend + + + + + Hibernate + + + + + Shutdown + + + + + + + + Reboot + + + + diff --git a/waybar/style.css b/waybar/style.css index 7e83028..9567f6d 100644 --- a/waybar/style.css +++ b/waybar/style.css @@ -1,19 +1,37 @@ +/* --active-color: #f5e0dc; */ +/* --bg-color: rgba(24, 24, 37, 0.5); */ +/* --border-bottom-color: rgba(24, 24, 37, 0.9); */ +/* } */ +@define-color bg2 #504945; +@define-color foreground #cdd6f4; +@define-color background #181824; + * { - /* `otf-font-awesome` is required to be installed for icons */ - font-family: FontAwesome, Roboto, Helvetica, Arial, sans-serif; - font-size: 13px; + /* `otf-font-awesome` is required to be installed for icons */ + font-family: JetBrains Mono; + font-size: 15px; + border: none; + border-radius: 0; + min-height: 0; + margin: 0; + padding: 0; + box-shadow: none; + text-shadow: none; + icon-shadow: none; + color: @foreground; + background-color: @background; } window#waybar { - background-color: rgba(43, 48, 59, 0.5); - border-bottom: 3px solid rgba(100, 114, 125, 0.5); - color: #ffffff; - transition-property: background-color; - transition-duration: .5s; + background-color: rgba(24, 24, 37, 0.5); + border-bottom: 3px solid rgba(24, 24, 37, 0.9); + color: #f5e0dc; + transition-property: background-color; + transition-duration: 0.5s; } window#waybar.hidden { - opacity: 0.2; + opacity: 0.2; } /* @@ -26,55 +44,61 @@ window#waybar.solo { */ window#waybar.termite { - background-color: #3F3F3F; + background-color: #3f3f3f; } window#waybar.chromium { - background-color: #000000; - border: none; + background-color: #000000; + border: none; } button { - /* Use box-shadow instead of border so the text isn't offset */ - box-shadow: inset 0 -3px transparent; - /* Avoid rounded borders under each button name */ - border: none; - border-radius: 0; + /* Use box-shadow instead of border so the text isn't offset */ + box-shadow: inset 0 -3px transparent; + /* Avoid rounded borders under each button name */ + border: none; + border-radius: 0; } /* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */ button:hover { - background: inherit; - box-shadow: inset 0 -3px #ffffff; + background: inherit; + box-shadow: inset 0 -3px #ffffff; } /* you can set a style on hover for any module like this */ #pulseaudio:hover { - background-color: #a37800; + background-color: #a37800; } #workspaces button { - padding: 0 5px; - background-color: transparent; - color: #ffffff; + padding: 0 5px; + background-color: transparent; + color: #f5e0dc; } #workspaces button:hover { - background: rgba(0, 0, 0, 0.2); + background: rgba(0, 0, 0, 0.2); } #workspaces button.focused { - background-color: #64727D; - box-shadow: inset 0 -3px #ffffff; + background-color: #f38ba8; + box-shadow: inset 0 -3px #ffffff; +} +#workspaces button.active { + /* border: 1px solid #fab387; */ + /* border-radius: 8px; */ + color: #fab387; + /* background-color: rgb(24, 24, 37); */ } #workspaces button.urgent { - background-color: #eb4d4b; + background-color: #eb4d4b; } #mode { - background-color: #64727D; - box-shadow: inset 0 -3px #ffffff; + background-color: #64727d; + box-shadow: inset 0 -3px #ffffff; } #clock, @@ -94,234 +118,236 @@ button:hover { #scratchpad, #power-profiles-daemon, #mpd { - padding: 0 10px; - color: #ffffff; + min-width: 12px; + margin: 0 7.5px; } #window, #workspaces { - margin: 0 4px; + margin: 0 4px; } /* If workspaces is the leftmost module, omit left margin */ .modules-left > widget:first-child > #workspaces { - margin-left: 0; + margin-left: 0; } /* If workspaces is the rightmost module, omit right margin */ .modules-right > widget:last-child > #workspaces { - margin-right: 0; + margin-right: 0; } #clock { - background-color: #64727D; + color: @foreground; + /* background-color: #64727d; */ } #battery { - background-color: #ffffff; - color: #000000; + background-color: #ffffff; + color: #000000; } -#battery.charging, #battery.plugged { - color: #ffffff; - background-color: #26A65B; +#battery.charging, +#battery.plugged { + color: #ffffff; + background-color: #26a65b; } @keyframes blink { - to { - background-color: #ffffff; - color: #000000; - } + to { + background-color: #ffffff; + color: #000000; + } } /* Using steps() instead of linear as a timing function to limit cpu usage */ #battery.critical:not(.charging) { - background-color: #f53c3c; - color: #ffffff; - animation-name: blink; - animation-duration: 0.5s; - animation-timing-function: steps(12); - animation-iteration-count: infinite; - animation-direction: alternate; + background-color: #f53c3c; + color: #ffffff; + animation-name: blink; + animation-duration: 0.5s; + animation-timing-function: steps(12); + animation-iteration-count: infinite; + animation-direction: alternate; } #power-profiles-daemon { - padding-right: 15px; + padding-right: 15px; } #power-profiles-daemon.performance { - background-color: #f53c3c; - color: #ffffff; + background-color: #f53c3c; + color: #ffffff; } #power-profiles-daemon.balanced { - background-color: #2980b9; - color: #ffffff; + background-color: #2980b9; + color: #ffffff; } #power-profiles-daemon.power-saver { - background-color: #2ecc71; - color: #000000; + background-color: #2ecc71; + color: #000000; } label:focus { - background-color: #000000; + background-color: #000000; } -#cpu { - background-color: #2ecc71; - color: #000000; -} +/* #cpu { */ +/* background-color: #2ecc71; */ +/* color: #000000; */ +/* } */ #memory { - background-color: #9b59b6; + background-color: #9b59b6; } #disk { - background-color: #964B00; + background-color: #964b00; } #backlight { - background-color: #90b1b1; + background-color: #90b1b1; } #network { - background-color: #2980b9; + /* background-color: #2980b9; */ } #network.disconnected { - background-color: #f53c3c; + background-color: #f53c3c; } #pulseaudio { - background-color: #f1c40f; - color: #000000; + background-color: #f1c40f; + color: #000000; } #pulseaudio.muted { - background-color: #90b1b1; - color: #2a5c45; + background-color: #90b1b1; + color: #2a5c45; } #wireplumber { - background-color: #fff0f5; - color: #000000; + background-color: #fff0f5; + color: #000000; } #wireplumber.muted { - background-color: #f53c3c; + background-color: #f53c3c; } #custom-media { - background-color: #66cc99; - color: #2a5c45; - min-width: 100px; + background-color: #66cc99; + color: #2a5c45; + min-width: 100px; } #custom-media.custom-spotify { - background-color: #66cc99; + background-color: #66cc99; } #custom-media.custom-vlc { - background-color: #ffa000; + background-color: #ffa000; } #temperature { - background-color: #f0932b; + background-color: #f0932b; } #temperature.critical { - background-color: #eb4d4b; + background-color: #eb4d4b; } #tray { - background-color: #2980b9; + background-color: #2980b9; } #tray > .passive { - -gtk-icon-effect: dim; + -gtk-icon-effect: dim; } #tray > .needs-attention { - -gtk-icon-effect: highlight; - background-color: #eb4d4b; + -gtk-icon-effect: highlight; + background-color: #eb4d4b; } #idle_inhibitor { - background-color: #2d3436; + background-color: #2d3436; } #idle_inhibitor.activated { - background-color: #ecf0f1; - color: #2d3436; + background-color: #ecf0f1; + color: #2d3436; } #mpd { - background-color: #66cc99; - color: #2a5c45; + background-color: #66cc99; + color: #2a5c45; } #mpd.disconnected { - background-color: #f53c3c; + background-color: #f53c3c; } #mpd.stopped { - background-color: #90b1b1; + background-color: #90b1b1; } #mpd.paused { - background-color: #51a37a; + background-color: #51a37a; } #language { - background: #00b093; - color: #740864; - padding: 0 5px; - margin: 0 5px; - min-width: 16px; + background: #00b093; + color: #740864; + padding: 0 5px; + margin: 0 5px; + min-width: 16px; } #keyboard-state { - background: #97e1ad; - color: #000000; - padding: 0 0px; - margin: 0 5px; - min-width: 16px; + background: #97e1ad; + color: #000000; + padding: 0 0px; + margin: 0 5px; + min-width: 16px; } #keyboard-state > label { - padding: 0 5px; + padding: 0 5px; } #keyboard-state > label.locked { - background: rgba(0, 0, 0, 0.2); + background: rgba(0, 0, 0, 0.2); } #scratchpad { - background: rgba(0, 0, 0, 0.2); + background: rgba(0, 0, 0, 0.2); } #scratchpad.empty { - background-color: transparent; + background-color: transparent; } #privacy { - padding: 0; + padding: 0; } #privacy-item { - padding: 0 5px; - color: white; + padding: 0 5px; + color: white; } #privacy-item.screenshare { - background-color: #cf5700; + background-color: #cf5700; } #privacy-item.audio-in { - background-color: #1ca000; + background-color: #1ca000; } #privacy-item.audio-out { - background-color: #0069d4; + background-color: #0069d4; }