diff --git a/.config/sway/config b/.config/sway/config index c666900..c751f28 100644 --- a/.config/sway/config +++ b/.config/sway/config @@ -201,28 +201,6 @@ mode "resize" { } bindsym $mod+r mode "resize" -# -# Status Bar: -# -bar { - position top - - status_command ~/.config/sway/i3status-wrapper - - status_edge_padding 6 - status_padding 0 - separator_symbol " " - workspace_min_width 30 - - colors { - statusline $foreground - background $background - focused_workspace $foreground $foreground $background - active_workspace $accentish $accentish $background - inactive_workspace $background $background $foreground - } -} - client.focused #0353A4 #0353A4 #eeeeee #3799FB client.focused_inactive $muted $muted $background client.unfocused $backgroundish $backgroundish $foreground @@ -278,4 +256,5 @@ exec "foot --server" exec "wlsunset -l -34.61315 -L -58.37723" exec swaync exec kanshi -exec poweralertd +exec waybar +exec "nm-applet --indicator" diff --git a/.config/waybar/config b/.config/waybar/config new file mode 100644 index 0000000..1844016 --- /dev/null +++ b/.config/waybar/config @@ -0,0 +1,99 @@ +{ + // "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"], + "modules-center": [], + "modules-right": ["custom/zeit", "idle_inhibitor", "pulseaudio", "battery", "clock", "tray"], + // Modules configuration + // "sway/workspaces": { + // "disable-scroll": true, + // "all-outputs": true, + // "format": "{name}: {icon}", + // "format-icons": { + // "1": "", + // "2": "", + // "3": "", + // "4": "", + // "5": "", + // "urgent": "", + // "focused": "", + // "default": "" + // } + // }, + "keyboard-state": { + "numlock": true, + "capslock": true, + "format": "{name} {icon}", + "format-icons": { + "locked": "", + "unlocked": "" + } + }, + "sway/mode": { + "format": "{}" + }, + "sway/scratchpad": { + "format": "{icon} {count}", + "show-empty": false, + "format-icons": ["", ""], + "tooltip": true, + "tooltip-format": "{app}: {title}" + }, + "idle_inhibitor": { + "format": "{icon}", + "format-icons": { + "activated": "", + "deactivated": "" + } + }, + "tray": { + // "icon-size": 21, + "spacing": 10 + }, + "clock": { + "tooltip-format": "{:%Y %B}\n{calendar}", + "format-alt": "{:%Y-%m-%d}" + }, + "battery": { + "states": { + // "good": 95, + "warning": 30, + "critical": 15 + }, + "format": "{icon} {capacity}%", + "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" + }, + "pulseaudio": { + // "scroll-step": 1, // %, can be a float + "format": "{icon} {volume}%", + "format-bluetooth": "{volume}% {icon} {format_source}", + "format-bluetooth-muted": " {icon} {format_source}", + "format-muted": " {format_source}", + "format-icons": { + "headphone": "", + "hands-free": "", + "headset": "", + "phone": "", + "portable": "", + "car": "", + "default": ["", "", ""] + }, + "on-click": "pavucontrol" + }, + "custom/zeit": { + "exec": "$HOME/.config/waybar/zeit.sh" + } +} + diff --git a/.config/waybar/style.css b/.config/waybar/style.css new file mode 100644 index 0000000..cb837c5 --- /dev/null +++ b/.config/waybar/style.css @@ -0,0 +1,128 @@ +* { + /* `otf-font-awesome` is required to be installed for icons */ + font-family: Inter, FontAwesome; + font-size: 16px; +} + +window#waybar { + background-color: rgba(43, 48, 59, 1); + /*border-bottom: 3px solid rgba(100, 114, 125, 0.5);*/ + color: #ffffff; + transition-property: background-color; + transition-duration: 0.5s; +} + +window#waybar.hidden { + opacity: 0.2; +} + +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; +} + +/* 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; +} + +#workspaces button { + padding: 0 10px; + background-color: transparent; + color: #ffffff; +} + +#workspaces button:hover { + background: rgba(0, 0, 0, 0.2); +} + +#workspaces button.focused { + background-color: #64727d; +} + +#workspaces button.urgent { + background-color: #eb4d4b; +} + +#mode { + background-color: #64727d; + border-bottom: 3px solid #ffffff; +} + +#clock, +#battery, +#cpu, +#memory, +#disk, +#temperature, +#backlight, +#network, +#pulseaudio, +#wireplumber, +#custom-media, +#tray, +#mode, +#idle_inhibitor, +#scratchpad, +#mpd, +#custom-zeit { + padding: 0 10px; +} + +#window, +#workspaces { + margin: 0 4px; +} + +/* If workspaces is the leftmost module, omit left margin */ +.modules-left > widget:first-child > #workspaces { + margin-left: 0; +} + +/* If workspaces is the rightmost module, omit right margin */ +.modules-right > widget:last-child > #workspaces { + margin-right: 0; +} + +@keyframes blink { + to { + background-color: #ffffff; + color: #000000; + } +} + +#battery.critical:not(.charging) { + background-color: #f53c3c; + color: #ffffff; + animation-name: blink; + animation-duration: 0.5s; + animation-timing-function: linear; + animation-iteration-count: infinite; + animation-direction: alternate; +} + +label:focus { + background-color: #000000; +} + +#tray > .passive { + -gtk-icon-effect: dim; +} + +#tray > .needs-attention { + -gtk-icon-effect: highlight; + background-color: #eb4d4b; +} + +#idle_inhibitor { + background-color: #2d3436; +} + +#idle_inhibitor.activated { + background-color: #ecf0f1; + color: #2d3436; +} diff --git a/.config/waybar/zeit.sh b/.config/waybar/zeit.sh new file mode 100755 index 0000000..db43be9 --- /dev/null +++ b/.config/waybar/zeit.sh @@ -0,0 +1,16 @@ +#!/bin/sh +. ~/.profile + +update_zeit() { + zeit tracking --no-colors +} +update_zeit + +(busybox inotifyd - "$ZEIT_DB":c | while read -r; do + update_zeit +done) & + +while true; do + sleep 30 + update_zeit +done