Skip to content

Instantly share code, notes, and snippets.

@CheesecakeCG
Created November 17, 2021 03:16
Show Gist options
  • Save CheesecakeCG/efd93f038191a1cf58a6329652b75034 to your computer and use it in GitHub Desktop.
Save CheesecakeCG/efd93f038191a1cf58a6329652b75034 to your computer and use it in GitHub Desktop.
Waybar config
{
"layer": "top", // Waybar at top layer
"position": "top", // Waybar position (top|bottom|left|right)
"height": 36, // 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", "sway/window"],
"modules-center": ["sway/mode"],
"modules-right": ["temperature", "tray", "custom/ppc", "pulseaudio", "network", "battery", "custom/layout", "clock#date", "clock"],
"sway/mode": {
"format": " {}"
},
"sway/workspaces": {
"all-outputs": false,
"disable-scroll": true,
"format": " {icon} ",
"format-icons": {
"urgent": "",
"focused": "",
"default": ""
}
},
"wlr/taskbar": {
"format": "{icon}",
"icon-size": 24,
"active-first": "true",
"tooltip-format": "{title}",
"on-click": "activate",
"on-click-middle": "close"
},
"sway/window": {
"max-length": 120,
"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/ppc": {
"exec": "echo {\\\"text\\\": \\\"$text\\\",\\\"alt\\\":\\\"$(powerprofilesctl get)\\\"}",
"on-click": "~/Sync/Scripts/power-profile-rofi.py",
"format-icons": {
"performance": "sport",
"power-saver": "eco",
"balanced": "norm"
},
"format": "{icon} {text} fook",
"return-type": "json"
},
// Modules configuration
"sway/workspaces": {
"disable-scroll": true,
"all-outputs": true,
"format": "{icon} {name}",
"format-icons": {
"1": "",
// "2": "Skooma",
// "3": "",
// "4": "",
// "5": "",
"64": "Maximized",
"AUX": "",
"Music": "M",
"urgent": "",
"focused": "",
"default": ""
}
},
"idle_inhibitor": {
"format": "{icon}",
"format-icons": {
"activated": "",
"deactivated": ""
}
},
"tray": {
// "icon-size": 21,
"spacing": 10
},
"clock": {
"interval": 1,
"format": "{:%I:%M:%S}",
"tooltip": false
},
"clock#date": {
"format": "{:%a %b %d} -",
"tooltip": false
},
"cpu": {
"format": "{usage}% ",
"tooltip": false
},
"memory": {
"format": "{}% "
},
"temperature": {
// "thermal-zone": 2,
// "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input",
"critical-threshold": 69,
"format-critical": "{temperatureC}°C {icon}",
"format": "",
"format-icons": ["", "", ""]
},
"battery": {
"states": {
// "good": 80,
"warning": 20,
"critical": 8
},
"format": "{icon} {capacity}%",
"format-charging": " {capacity}%",
// "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}%)"
},
"backlight": {
// "device": "acpi_video1",
"format": "{icon}",
"format-icons": ["", ""]
},
"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
}
}
* {
border: none;
border-radius: 0;
font-family: "Compagnon";
font-size: 16px;
box-shadow: none;
text-shadow: none;
transition-duration: 0.12s;
}
/* window#waybar {
color: rgba(53, 185, 171, 1);
background-color: rgba(23, 63, 79, 0.4);
border-bottom: 2px solid rgba(53, 185, 171, 0.4);
} */
window#waybar {
background: @theme_base_color;
opacity: 0.75;
border-bottom: 1px solid @unfocused_borders;
color: @theme_text_color;
}
window#waybar.solo {
color: @theme_text_color;
}
#workspaces {
margin: 0 5px;
}
#workspaces button {
padding: 0 5px;
/* color: rgba(53, 185, 171, 1); */
transition-property: color;
}
#workspaces button.focused {
color: rgb(255, 255, 255);
}
/* #workspaces button.visible {
color: rgba(115, 186, 37, 1);
} */
#workspaces button.urgent {
color: rgb(255, 19, 30);
}
#mode,
#battery,
#cpu,
#memory,
#network,
#pulseaudio,
#idle_inhibitor,
#temperature,
#custom-layout,
#backlight {
margin: 0px 12px 0px 12px;
/* min-width: 30px;*/
}
#clock {
margin: 0px 6px 0px 10px;
}
#battery.warning {
color: rgba(255, 210, 4, 1);
}
#battery.critical {
color: rgba(238, 46, 36, 1);
}
#battery.charging {
color: @theme_text_color;
}
#taskbar button {
opacity: 0.5;
/* overflow: hidden; */
}
#taskbar button.active {
background-color: @theme_text_color;
opacity: 1.0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment