diff --git a/.config/sway/config b/.config/sway/config index 1e9d2e1..0717de8 100644 --- a/.config/sway/config +++ b/.config/sway/config @@ -205,7 +205,7 @@ bindsym $mod+r mode "resize" # Status Bar: # # Read `man 5 sway-bar` for more information about this section. -bar { +bar 1 { position top # When the status_command prints a new line to stdout, swaybar updates. diff --git a/.config/sway/config.d/50-barre.conf b/.config/sway/config.d/50-barre.conf new file mode 100644 index 0000000..efa2f84 --- /dev/null +++ b/.config/sway/config.d/50-barre.conf @@ -0,0 +1,10 @@ +# Barre d'état + +# désactive la barre principale +bar 1 mode invisible + +# active une nouvelle barre +bar olivier { + position top + status_command waybar +} diff --git a/.config/waybar/config b/.config/waybar/config new file mode 100644 index 0000000..ad34628 --- /dev/null +++ b/.config/waybar/config @@ -0,0 +1,101 @@ +{ + "height": 27, // Waybar height (to be removed for auto height) + "modules-left": ["sway/workspaces", "sway/mode", "custom/media", "sway/window"], + //"modules-center": ["sway/window"], + "modules-right": ["backlight", "pulseaudio", "memory", "cpu", "network", "battery", "temperature", "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": "" + } + }, + "sway/mode": { + "format": "{}" + }, + "tray": { + // "icon-size": 21, + "spacing": 10 + }, + "clock": { + "timezone": "Europe/Paris", + "tooltip-format": "{:%Y %B}\n{calendar}", + "format": "{:%a %d %b %R}", + "format-alt": "{:%Y-%m-%d %R:%S}" + }, + "cpu": { + "format": " {usage}%", + "tooltip": false + }, + "memory": { + "format": " {}%" + }, + "temperature": { + "critical-threshold": 80, + "format": "{icon} {temperatureC}°C", + "format-icons": ["", "", ""] + }, + "backlight": { + "format": " {percent}% {icon}", + "format-icons": ["🌕", "🌔", "🌓", "🌒", "🌑"] + }, + "battery": { + "states": { + "warning": 30, + "critical": 15 + }, + "format": "{icon} {capacity}%", + "format-charging": "{capacity}% ", + "format-plugged": "{capacity}% ", + "format-alt": "{time} {icon}", + "format-icons": ["", "", "", "", ""] + }, + "network": { + // "interface": "wlp2*", // (Optional) To force the use of this interface + "format-wifi": " {essid} ({signalStrength}%)", + "format-ethernet": "{ifname}: {ipaddr}/{cidr} ", + "format-linked": "{ifname} (No IP) ", + "format-disconnected": "Disconnected ⚠", + "format-alt": "{ifname}: {ipaddr}/{cidr}" + }, + "pulseaudio": { + // "scroll-step": 1, // %, can be a float + "format": "{icon} {volume}% {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} {}", + "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 + } +} diff --git a/.config/waybar/style.css b/.config/waybar/style.css new file mode 100644 index 0000000..8f0c800 --- /dev/null +++ b/.config/waybar/style.css @@ -0,0 +1,198 @@ +* { + border: none; + border-radius: 0; + /* `otf-font-awesome` is required to be installed for icons */ + font-family: DejaVu Sans Mono, Roboto, Helvetica, Arial, sans-serif; + font-size: 16px; + min-height: 0; +} + +window#waybar { + background-color: #222; + border-bottom: 3px solid rgba(100, 114, 125, 0.5); + color: #dfdfdf; + transition-property: background-color; + transition-duration: .5s; +} + +window#waybar.hidden { + opacity: 0.2; +} + +/* +window#waybar.empty { + background-color: transparent; +} +window#waybar.solo { + background-color: #FFFFFF; +} +*/ + +window#waybar.termite { + background-color: #3F3F3F; +} + +window#waybar.chromium { + background-color: #000000; + border: none; +} + +#workspaces button { + padding: 0 5px; + background-color: transparent; + color: #ffffff; + /* Use box-shadow instead of border so the text isn't offset */ + box-shadow: inset 0 -3px transparent; +} + +/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */ +#workspaces button:hover { + background: rgba(0, 0, 0, 0.2); + box-shadow: inset 0 -3px #ffffff; +} + +#workspaces button.focused { + background-color: #ffb52a; + color: #000; + box-shadow: inset 0 -3px #ffffff; +} + +#workspaces button.urgent { + background-color: #bd2c40; +} + +#mode { + background-color: #64727d; + border-bottom: 3px solid #ffffff; +} + +#clock, +#battery, +#cpu, +#memory, +#disk, +#temperature, +#backlight, +#network, +#pulseaudio, +#custom-media, +#tray, +#mode, +#idle_inhibitor, +#mpd { + padding: 0 10px; + margin: 0 4px; + color: #ffffff; +} + +#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; +} + +#clock { + background-color: inherit; + border-bottom: 3px solid #f4a70a; +} + +#battery { + background-color: inherit; + border-bottom: 3px solid #ffb52a; +} + +#battery.charging, #battery.plugged { + color: #ffffff; + background-color: #26A65B; +} + +@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; +} + +#cpu { + background-color: inherit; + border-bottom: 3px solid #f90000; +} + +#memory { + background-color: inherit; + border-bottom: 3px solid #4bffdc; +} + +#backlight { + background-color: inherit; + border-bottom: 3px solid #9f78e1; +} + +#network { + background-color: inherit; + border-bottom: 3px solid #9f78e1; +} + +#network.disconnected { + background-color: inherit; +} + +#pulseaudio { + background-color: inherit; + border-bottom: 3px solid #f4a70a; +} + +#pulseaudio.muted { + background-color: inherit; + color: #666; +} + +#custom-media { + background-color: #66cc99; + color: #2a5c45; + min-width: 100px; +} + +#custom-media.custom-spotify { + background-color: #66cc99; +} + +#custom-media.custom-vlc { + background-color: #ffa000; +} + +#temperature { + background-color: inherit; + border-bottom: 3px solid #f50a4d; +} + +#temperature.critical { + background-color: #eb4d4b; +} + +#tray { + background-color: inherit; +}