From 3b44579bf3755378f26b50699b8db7b9de956e01 Mon Sep 17 00:00:00 2001 From: Massaki Archambault Date: Thu, 9 May 2019 17:37:18 -0400 Subject: [PATCH] replace swaybar with waybar --- files/.config/sway/config | 59 ++++++++++++------------- files/.config/waybar/config | 79 ++++++++++++++++++++++++++++++++++ files/.config/waybar/style.css | 29 +++++++++++++ 3 files changed, 138 insertions(+), 29 deletions(-) create mode 100644 files/.config/waybar/config create mode 100644 files/.config/waybar/style.css diff --git a/files/.config/sway/config b/files/.config/sway/config index 5db629c..5548964 100644 --- a/files/.config/sway/config +++ b/files/.config/sway/config @@ -20,19 +20,19 @@ client.background $bg set $font Hack Nerd Font font pango:$font 8 -set $ws1 "1:[1]" -set $ws2 "2:[2]" -set $ws3 "3:[3]" -set $ws4 "4:[4]" -set $ws5 "5:[5]" -set $ws6 "6:[6]" -set $ws7 "7:[7]" -set $ws8 "8:[8]" -set $ws9 "9:[9]" -set $ws10 "10:[10]" +set $ws1 "1" +set $ws2 "2" +set $ws3 "3" +set $ws4 "4" +set $ws5 "5" +set $ws6 "6" +set $ws7 "7" +set $ws8 "8" +set $ws9 "9" +set $ws10 "10" # default workspace -workspace "2:[2]" +workspace "2" # window title #for_window [class="^.*"] border pixel 2 title_format " %title" @@ -291,23 +291,24 @@ exec /bin/dex -a exec $terminal bar { - status_command i3status - - font pango:$font 10 - height 30 - tray_padding 7 - position top - separator_symbol " ▏" - strip_workspace_numbers yes - - colors { - background #000000 - statusline $fg - - focused_workspace #2c2f33 #2c2f33 $fg - active_workspace #000000 #000000 $fg - inactive_workspace #000000 #000000 #4b5056 - urgent_workspace #000000 #000000 #e27c77 - } + swaybar_command waybar +# status_command i3status +# +# font pango:$font 10 +# height 30 +# tray_padding 7 +# position top +# separator_symbol " ▏" +# strip_workspace_numbers yes +# +# colors { +# background #000000 +# statusline $fg +# +# focused_workspace #2c2f33 #2c2f33 $fg +# active_workspace #000000 #000000 $fg +# inactive_workspace #000000 #000000 #4b5056 +# urgent_workspace #000000 #000000 #e27c77 +# } } diff --git a/files/.config/waybar/config b/files/.config/waybar/config new file mode 100644 index 0000000..8bde15e --- /dev/null +++ b/files/.config/waybar/config @@ -0,0 +1,79 @@ +{ + "layer": "top", // Waybar at top layer + // "position": "bottom", // Waybar position (top|bottom|left|right) + "height": 24, // Waybar height (to be removed for auto height) + // Choose the order of the modules + "modules-left": ["sway/workspaces", "sway/mode"], + "modules-center": [], + "modules-right": ["clock", "network", "cpu", "memory", "battery", "backlight", "pulseaudio", "custom/vpn", "idle_inhibitor", "tray"], + + // Modules configuration + "sway/workspaces": { + "disable-scroll": true, + "all-outputs": true, + "format": "{name}" + }, + "sway/mode": { + "format": "{}" + }, + "idle_inhibitor": { + "format": "{icon}", + "format-icons": { + "activated": "", + "deactivated": "" + } + }, + "tray": { + // "icon-size": 21, + "spacing": 10 + }, + "clock": { + "format": " {:%Y-%m-%d %H:%M}" + }, + "cpu": { + "format": " {usage}%", + "tooltip": false + }, + "memory": { + "format": " {}%" + }, + "backlight": { + "format": "{icon} {percent}%", + "format-icons": ["", ""] + }, + "battery": { + "states": { + // "good": 95, + "warning": 30, + "critical": 15 + }, + "format": " {icon} {capacity}%", + // "format-good": "", // An empty format will hide the module + // "format-full": "", + "format-icons": ["", "", "", "", ""] + }, + "network": { + // "interface": "wlp2s0", // (Optional) To force the use of this interface + "format-wifi": " <{essid}> {ipaddr}/{cidr}", + "format-ethernet": " {ipaddr}/{cidr}", + "format-disconnected": "⚠ Disconnected" + }, + "pulseaudio": { + //"scroll-step": 1, + "format": "{icon} {volume}%", + //"format-bluetooth": "{icon} {volume}%", + "format-muted": "婢", + "format-icons": { + "headphones": "", + "headset": "", + "default": ["", ""] + }, + "on-click": "pavucontrol" + }, + "custom/vpn": { + "format": "{}", + "interval": 5, + "exec": "test -e /proc/sys/net/ipv4/conf/tun0 && echo  || echo " + } +} + diff --git a/files/.config/waybar/style.css b/files/.config/waybar/style.css new file mode 100644 index 0000000..3e2a282 --- /dev/null +++ b/files/.config/waybar/style.css @@ -0,0 +1,29 @@ +* { + border: none; + font-family: Verdana, sans-serif; + font-size: 13px; +} + +window#waybar { + background: rgba(43, 48, 59, 0.8); + color: white; +} + +#workspaces button { + padding: 0 5px; + background: transparent; + color: white; +} + +#workspaces button.focused { + background: #64727D; +} + +#clock, #battery, #cpu, #memory, #temperature, #backlight, #network, #pulseaudio, #mode { + padding: 0 10px; + border-right: 1px solid white; +} + +#idle_inhibitor, #tray, #custom-vpn { + margin-left: 10px; +}