From 59b77c8fbba36494044ea112b920bb6e4da82dd6 Mon Sep 17 00:00:00 2001 From: LinlyBoi Date: Mon, 21 Oct 2024 15:31:36 +0300 Subject: [PATCH] waybar .conf ) --- private_dot_config/waybar/config | 172 ++++++++++++ private_dot_config/waybar/style.css | 397 ++++++++++++++++++++++++++++ 2 files changed, 569 insertions(+) create mode 100644 private_dot_config/waybar/config create mode 100644 private_dot_config/waybar/style.css diff --git a/private_dot_config/waybar/config b/private_dot_config/waybar/config new file mode 100644 index 0000000..8807bba --- /dev/null +++ b/private_dot_config/waybar/config @@ -0,0 +1,172 @@ +{ + "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 + // "gtk-layer-shell": "false", + // Choose the order of the modules + "modules-left": ["sway/workspaces", "custom/scratchpad", "sway/mode"], + "modules-center": ["custom/clock"], + "modules-right": ["custom/zypper", "memory", "temperature", "backlight", "battery", "battery#bat2", "pulseaudio", "custom/layout", "network", "tray", "custom/notification"], + "sway/mode": { + "format": " {}" + }, + //"sway/workspaces": { + // "all-outputs": false, + // "disable-scroll": true, + // "format": " {icon} ", + // "format-icons": { + // "urgent": "", + // "focused": "", + // "default": "" + // } + //}, + "sway/window": { + "max-length": 80, + "tooltip": false + }, + "custom/layout": { + "tooltip": false, + "exec": "swaymsg -mrt subscribe '[\"input\"]' | jq -r --unbuffered \"select(.change == \\\"xkb_layout\\\") | .input | select(.type == \\\"keyboard\\\") | .xkb_active_layout_name | .[0:2]\"" + }, + "custom/zypper": { + "format": "{} ", + "interval": 3600, + "exec": "zypper lu | grep 'v |' | wc -l; echo 'packages to update'", + "exec-if": "exit 0", + "on-click": "exec alacritty -e sudo sh -c 'zypper ref; zypper dup; pkill -SIGRTMIN+8 waybar'", + "signal": 8 + }, + // Modules configuration + "sway/workspaces": { + "disable-scroll": true, + "all-outputs": true, + "format": "{icon} ", + "format-icons": { + "1": "", + "2": "", + "3": "", + "4": "", + "5": "", + "urgent": "", + "focused": "", + "default": "" + } + }, + "idle_inhibitor": { + "format": "{icon}", + "format-icons": { + "activated": "", + "deactivated": "" + } + }, + "tray": { + // "icon-size": 21, + "spacing": 10 + }, + "clock": { + //"timezone": "America/New_York", + "timezone": "Africa/Cairo", + "format": " {:%b %d %Y %R}", + "tooltip-format": "{:%Y %B}\n{calendar}", + "format-alt": "{:%a %d %b w:%V %H:%M}", + "today-format": "{}", + "calendar-weeks-pos": "left", + "format-calendar": "{}", + "format-calendar-weeks": "{}", + "format-calendar-weekdays": "{}", + "interval": 10 + }, + "custom/clock": { + "format": " {} ", + "interval": 1, + "exec": "date +'%b %d %Y %R'" + }, + "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 + }, + "format": "{icon}", + "format-charging": "", + "format-plugged": "", + "format-alt": "{capacity}% {time}", + "format-icons": ["", "", "", "", ""] + }, + "battery#bat2": { + "bat": "BAT2" + }, + "network": { + // "interface": "wlp2*", // (Optional) To force the use of this interface + "format-wifi": "", + "format-ethernet": "", + "format-linked": "", + "format-disconnected": "⚠", + "format-alt": "{ifname} {essid} ({signalStrength}%)" + }, + "pulseaudio": { + "format": "{icon}", + "format-alt": "{volume} {icon}", + "format-alt-click": "click-right", + "format-muted": "", + "format-icons": { + "headphones": "", + "handsfree": "", + "headset": "", + "phone": "", + "portable": "", + "car": "", + "default": ["", "", ""] + }, + "scroll-step": 10, + "on-click": "pactl set-sink-mute @DEFAULT_SINK@ toggle", + "on-click-right": "pavucontrol", + "tooltip": false + }, + "custom/scratchpad": { + "format-text": "{}", + "return-type": "json", + "interval": 3, + "exec": "/usr/share/openSUSEway/helpers/scratchpad-indicator.sh 2> /dev/null", + "exec-if": "exit 0", + "on-click": "swaymsg 'scratchpad show'", + "on-click-right": "swaymsg 'move scratchpad'" + }, + "custom/notification": { + "tooltip": true, + "format": "{icon}", + "format-icons": { + "notification": "", + "none": " ", + "dnd-notification": "", + "dnd-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/private_dot_config/waybar/style.css b/private_dot_config/waybar/style.css new file mode 100644 index 0000000..b9b80c5 --- /dev/null +++ b/private_dot_config/waybar/style.css @@ -0,0 +1,397 @@ +@keyframes blink-warning { + 70% { + color: @light; + } + + to { + color: @light; + background-color: @warning; + } +} + +@keyframes blink-critical { + 70% { + color: @light; + } + + to { + color: @light; + background-color: @critical; + } +} + + +/* ----------------------------------------------------------------------------- + * Styles + * -------------------------------------------------------------------------- */ + +/* COLORS */ + +/* Gruvbox Dark */ + +/*@define-color bg #353C4A;*/ +@define-color light #D8DEE9; +/*@define-color dark @nord_dark_font;*/ +@define-color warning #ebcb8b; +/*@define-color critical #BF616A;*/ +/*@define-color mode @bg;*/ +/*@define-color workspaces @bg;*/ +/*@define-color workspaces @nord_dark_font;*/ +/*@define-color workspacesfocused #655b53;*/ +/*@define-color tray @bg;*/ +/*@define-color workspacesfocused #4C566A; +@define-color tray @workspacesfocused; +@define-color sound #EBCB8B; +@define-color network #5D7096; +@define-color memory #546484; +@define-color cpu #596A8D; +@define-color temp #4D5C78; +@define-color layout #5e81ac; +@define-color battery #88c0d0; +@define-color date #434C5E; +@define-color time #434C5E; +@define-color backlight #434C5E;*/ +@define-color nord_bg #282828; +@define-color nord_bg_blue @bg; +@define-color nord_light #D8DEE9; + +@define-color nord_dark_font #272727; + + +@define-color bg #282828; +@define-color critical #BF616A; +@define-color tray @bg; +@define-color mode @bg; + +@define-color bluetint #448488; +@define-color bluelight #83a597; +@define-color magenta-dark #b16185; + + +@define-color font_gruv_normal #ebdbb2; +@define-color font_gruv_faded #a89985; +@define-color font_gruv_darker #D8DEE9; +@define-color font_dark_alternative #655b53; + +/* Reset all styles */ +* { + border: none; + border-radius: 0px; + min-height: 0; + /*margin: 0.15em 0.25em 0.15em 0.25em;*/ +} + +/* The whole bar */ +#waybar { + background: @bg; + color: @light; + font-family: "MonoCraft Nerd Font", "Font Awesome 6 Pro"; + font-size: 10pt; + font-weight: bold; +} + +/* Each module */ +#battery, +#clock, +#cpu, +#custom-layout, +#memory, +#mode, +#network, +#pulseaudio, +#temperature, +#custom-alsa, +#custom-pacman, +#custom-weather, +#custom-gpu, +#custom-playerctl, +#tray, +#backlight, +#language, +#custom-cpugovernor, +#custom-scratchpad-indicator, +#custom-pacman, +#idle_inhibitor, +#bluetooth { +/* padding-left: 0.3em; + padding-right: 0.3em;*/ + padding: 0.6em 0.8em; +} + +/* Each module that should blink */ +#mode, +#memory, +#temperature, +#battery { + animation-timing-function: linear; + animation-iteration-count: infinite; + animation-direction: alternate; +} + +/* Each critical module */ +#memory.critical, +#cpu.critical, +#temperature.critical, +#battery.critical { + color: @critical; +} + +/* Each critical that should blink */ +#mode, +#memory.critical, +#temperature.critical, +#battery.critical.discharging { + animation-name: blink-critical; + animation-duration: 2s; +} + +/* Each warning */ +#network.disconnected, +#memory.warning, +#cpu.warning, +#temperature.warning, +#battery.warning { + background: @warning; + color: @nord_dark_font; +} + +/* Each warning that should blink */ +#battery.warning.discharging { + animation-name: blink-warning; + animation-duration: 3s; +} + +/* Adding arrows to boxes */ +/*#custom-arrow1 { + font-size: 16px; + color: @sound; + background: transparent; +} + +#custom-arrow2 { + font-size: 16px; + color: @network; + background: @sound; +} + +#custom-arrow3 { + font-size: 16px; + color: @memory; + background: @network; +} + +#custom-arrow4 { + font-size: 16px; + color: @cpu; + background: @memory; +} + +#custom-arrow5 { + font-size: 16px; + color: @temp; + background: @cpu; +} + +#custom-arrow6 { + font-size: 16px; + color: @layout; + background: @temp; +} + +#custom-arrow7 { + font-size: 16px; + color: @battery; + background: @layout; +} + +#custom-arrow8 { + font-size: 16px; + color: @date; + background: @battery; +} + +#custom-arrow9 { + font-size: 16px; + color: @time; + background: @date; +}*/ + +#custom-arrow1 { + font-size: 2em; + color: @bg; + background: @bluetint; +} +#custom-arrow2 { + font-size: 2em; + color: @bluetint; + background: @font_dark_alternative; +} +#custom-arrow3 { + font-size: 2em; + color: @font_dark_alternative; + background: @bg; +} +#custom-arrow4 { + font-size: 2.1em; + color: @font_gruv_normal; + background: @bg; +} +#custom-arrow5 { + font-size: 2.12em; + color: @font_gruv_normal; + background: @bg; +} +#custom-arrow6 { + font-size: 2em; + color: @font_dark_alternative; + background: @bg; +} +#custom-arrow7 { + font-size: 2em; + color: @bluetint; + background: @font_dark_alternative; +} +#custom-arrow8 { + font-size: 2em; + color: @bg; + background: @bluetint; +} + +/* And now modules themselves in their respective order */ +#clock.time { + background: @bg; + color: @font_gruv_normal; +} +#clock.date { + background: @bg; + color: @font_gruv_faded; +} + +#custom-scratchpad-indicator { + background: @bluetint; + color: @font_gruv_normal; +} +#language { + background: @bg; + color: @font_gruv_normal; +} +#custom-kdeconnect { + background: @bg; + color: @font_gruv_normal; +} +#custom-pacman { + background: @bluetint; + color: @font_gruv_normal; +} +#idle_inhibitor { + background: @font_dark_alternative; + color: @font_gruv_normal; +} +#custom-playerctl { + font-size: 0.9em; + color: @font_gruv_normal; +} +#custom-playerctl.paused{ + color: @font_dark_alternative; + font-size: 0.9em; +} +/* Workspaces stuff */ +#workspaces { +} +#workspaces button { + background: @font_gruv_normal; + padding: 0em 1.2em; + color: @font_dark_alternative; + min-width: 0em; +} +#workspaces button.focused { + font-weight: bolder; /* Somewhy the bar-wide setting is ignored*/ +} +#workspaces button.urgent { + color: #c9545d; + opacity: 1; +} +#custom-cpugovernor { + background-color: @font_dark_alternative; + color: @font_gruv_normal; +} +#custom-cpugovernor.perf { + +} +#cpu { + background: @bluetint; + color: @font_gruv_normal; + padding-left: 0em; + padding-right: 0.2em; +} +#cpu.critical { + color: @nord_dark_font; + background: @critical; +} +#temperature { + background-color: @bg; + color: @font_gruv_normal; + padding-right: 0em; +} +#temperature.critical { + background: @critical; +} +#custom-gpu { + background: @bluetint; + color: @font_gruv_normal; + padding-left: 0em; +} +#pulseaudio { + background: @bg; + color: @font_gruv_normal; +} +#pulseaudio.muted { + color: #fb4833; +} +#pulseaudio.source-muted { + /* moved to config */ +} +#bluetooth { + background: @bg; + color: @font_gruv_normal; +} +#network { + background: @bg; + color: @font_gruv_faded; + padding-right: 1.5em; +} +#tray { + background: @bg; + color: @font_gruv_normal; +} + +#custom-alsa { + background: @sound; +} +#memory { + background: @memory; +} +#custom-layout { + background: @layout; +} +#mode { /* Shown current Sway mode (resize etc.) */ + color: @light; + background: @mode; +} +#battery { + background: @battery; +} + +#backlight { + background: @backlight; +} +#window { + margin-right: 40px; + margin-left: 40px; + font-weight: normal; +} +#custom-weather { + background: @mode; + font-weight: bold; + padding: 0 0.6em; +}