Change waybar to be more minimalistic

This commit is contained in:
Pablu23
2024-06-26 12:41:32 +02:00
parent 93f3acca75
commit 0489965103
3 changed files with 166 additions and 451 deletions

View File

@@ -1,59 +1,64 @@
{
"layer": "top",
"position": "top",
"height": 24,
"modules-left": [
"hyprland/mode",
"hyprland/workspaces",
"custom/arrow10",
// "hyprland/mode",
"hyprland/workspaces"
// "custom/arrow10",
],
"modules-center": [
"hyprland/window"
],
"modules-right": [
"custom/arrow9",
// "custom/arrow9",
"pulseaudio",
"custom/arrow8",
// "custom/arrow8",
"network",
"custom/arrow7",
// "custom/arrow7",
"memory",
"custom/arrow6",
// "custom/arrow6",
"cpu",
"custom/arrow5",
"temperature",
"custom/arrow4",
"battery",
"custom/arrow3",
// "custom/arrow5",
// "temperature",
// "custom/arrow4",
// "battery",
// "custom/arrow3",
"hyprland/language",
"custom/arrow2",
// "custom/arrow2",
"tray",
"clock#date",
"custom/arrow1",
// "custom/arrow1",
"clock#time"
],
// Modules
"battery": {
"interval": 10,
"states": {
"warning": 30,
"critical": 15
},
"format-time": "{H}:{M:02}",
"format": "{icon} {capacity}% ({time})",
"format-charging": " {capacity}% ({time})",
"format-charging-full": " {capacity}%",
"format-full": "{icon} {capacity}%",
"format-alt": "{icon} {power}W",
"format-icons": [
"",
"",
"",
"",
""
],
"tooltip": false
},
// "battery": {
// "interval": 10,
// "states": {
// "warning": 30,
// "critical": 15
// },
// "format-time": "{H}:{M:02}",
// "format": "{icon} {capacity}% ({time})",
// "format-charging": " {capacity}% ({time})",
// "format-charging-full": " {capacity}%",
// "format-full": "{icon} {capacity}%",
// "format-alt": "{icon} {power}W",
// "format-icons": [
// "",
// "",
// "",
// "",
// ""
// ],
// "tooltip": false
// },
"clock#time": {
"interval": 10,
@@ -71,8 +76,7 @@
"cpu": {
"interval": 5,
"tooltip": false,
"format": " {usage}%",
"format-alt": " {load}",
"format": "CPU: {usage}%",
"states": {
"warning": 70,
"critical": 90
@@ -88,7 +92,7 @@
"memory": {
"interval": 5,
"format": " {used:0.1f}G/{total:0.1f}G",
"format": "MEM: {used:0.1f}G/{total:0.1f}G",
"states": {
"warning": 70,
"critical": 90
@@ -98,15 +102,10 @@
"network": {
"interval": 5,
"format-wifi": " {essid} ({signalStrength}%)",
"format-ethernet": " {ifname}",
// "format-wifi": " {essid} ({signalStrength}%)",
"format-ethernet": "UP:{bandwidthUpBytes} DOWN:{bandwidthDownBytes}",
"format-disconnected": "No connection",
"format-alt": " {ipaddr}/{cidr}",
"tooltip": false
},
"hyprland/mode": {
"format": "{}",
// "format-alt": " {ipaddr}/{cidr}",
"tooltip": false
},
@@ -124,91 +123,91 @@
},
"pulseaudio": {
"format": "{icon} {volume}%",
"format-bluetooth": "{icon} {volume}%",
"format-muted": "",
"format-icons": {
"headphone": "",
"hands-free": "",
"headset": "",
"phone": "",
"portable": "",
"car": "",
"default": ["", ""]
},
"format": "AUD: {volume}%",
// "format-bluetooth": "{icon} {volume}%",
"format-muted": "AUD: 0%",
// "format-icons": {
// "headphone": "",
// "hands-free": "",
// "headset": "",
// "phone": "",
// "portable": "",
// "car": "",
// "default": ["", ""]
// },
"scroll-step": 1,
"on-click": "pactl set-sink-mute @DEFAULT_SINK@ toggle",
"tooltip": false
},
"temperature": {
"critical-threshold": 90,
"interval": 5,
"format": "{icon} {temperatureC}°",
"format-icons": [
"",
"",
"",
"",
""
],
"tooltip": false
},
// "temperature": {
// "critical-threshold": 90,
// "interval": 5,
// "format": "{icon} {temperatureC}°",
// "format-icons": [
// "",
// "",
// "",
// "",
// ""
// ],
// "tooltip": false
// },
"tray": {
"icon-size": 18
//"spacing": 10
},
"custom/arrow1": {
"format": "",
"tooltip": false
},
// "custom/arrow1": {
// "format": "",
// "tooltip": false
// },
"custom/arrow2": {
"format": "",
"tooltip": false
},
// "custom/arrow2": {
// "format": "",
// "tooltip": false
// },
"custom/arrow3": {
"format": "",
"tooltip": false
},
// "custom/arrow3": {
// "format": "",
// "tooltip": false
// },
"custom/arrow4": {
"format": "",
"tooltip": false
},
"custom/arrow5": {
"format": "",
"tooltip": false
},
"custom/arrow6": {
"format": "",
"tooltip": false
},
"custom/arrow7": {
"format": "",
"tooltip": false
},
"custom/arrow8": {
"format": "",
"tooltip": false
},
"custom/arrow9": {
"format": "",
"tooltip": false
},
"custom/arrow10": {
"format": "",
"tooltip": false
}
// "custom/arrow4": {
// "format": "",
// "tooltip": false
// },
//
// "custom/arrow5": {
// "format": "",
// "tooltip": false
// },
//
// "custom/arrow6": {
// "format": "",
// "tooltip": false
// },
//
// "custom/arrow7": {
// "format": "",
// "tooltip": false
// },
//
// "custom/arrow8": {
// "format": "",
// "tooltip": false
// },
//
// "custom/arrow9": {
// "format": "",
// "tooltip": false
// },
//
// "custom/arrow10": {
// "format": "",
// "tooltip": false
// }
}
// vi:ft=jsonc

View File

@@ -1,202 +0,0 @@
// -*- mode: jsonc -*-
{
// "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",
"custom/media"
],
"modules-center": [
"sway/window"
],
"modules-right": [
"mpd",
"idle_inhibitor",
"pulseaudio",
"network",
"power-profiles-daemon",
"cpu",
"memory",
"temperature",
"backlight",
"keyboard-state",
"sway/language",
"battery",
"battery#bat2",
"clock",
"tray"
],
// Modules configuration
// "sway/workspaces": {
// "disable-scroll": true,
// "all-outputs": true,
// "warp-on-scroll": false,
// "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": "<span style=\"italic\">{}</span>"
},
"sway/scratchpad": {
"format": "{icon} {count}",
"show-empty": false,
"format-icons": ["", ""],
"tooltip": true,
"tooltip-format": "{app}: {title}"
},
"mpd": {
"format": "{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S}) ⸨{songPosition}|{queueLength}⸩ {volume}% ",
"format-disconnected": "Disconnected ",
"format-stopped": "{consumeIcon}{randomIcon}{repeatIcon}{singleIcon}Stopped ",
"unknown-tag": "N/A",
"interval": 5,
"consume-icons": {
"on": " "
},
"random-icons": {
"off": "<span color=\"#f53c3c\"></span> ",
"on": " "
},
"repeat-icons": {
"on": " "
},
"single-icons": {
"on": "1 "
},
"state-icons": {
"paused": "",
"playing": ""
},
"tooltip-format": "MPD (connected)",
"tooltip-format-disconnected": "MPD (disconnected)"
},
"idle_inhibitor": {
"format": "{icon}",
"format-icons": {
"activated": "",
"deactivated": ""
}
},
"tray": {
// "icon-size": 21,
"spacing": 10
},
"clock": {
// "timezone": "America/New_York",
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
"format-alt": "{:%Y-%m-%d}"
},
"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": "{capacity}% {icon}",
"format-full": "{capacity}% {icon}",
"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"
},
"power-profiles-daemon": {
"format": "{icon}",
"tooltip-format": "Power profile: {profile}\nDriver: {driver}",
"tooltip": true,
"format-icons": {
"default": "",
"performance": "",
"balanced": "",
"power-saver": ""
}
},
"network": {
// "interface": "wlp2*", // (Optional) To force the use of this interface
"format-wifi": "{essid} ({signalStrength}%) ",
"format-ethernet": "{ipaddr}/{cidr} ",
"tooltip-format": "{ifname} via {gwaddr} ",
"format-linked": "{ifname} (No IP) ",
"format-disconnected": "Disconnected ⚠",
"format-alt": "{ifname}: {ipaddr}/{cidr}"
},
"pulseaudio": {
// "scroll-step": 1, // %, can be a float
"format": "{volume}% {icon} {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
}
}

View File

@@ -87,19 +87,6 @@
padding-right: 8pt;
}
/* Each critical module */
#mode,
#memory.critical,
#cpu.critical,
#temperature.critical,
#battery.critical.discharging {
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-direction: alternate;
animation-name: blink-critical;
animation-duration: 1s;
}
/* Each warning */
#network.disconnected,
#memory.warning,
@@ -109,21 +96,12 @@
color: @warning;
}
/* And now modules themselves in their respective order */
/* Current sway mode (resize etc) */
#mode {
color: @white;
background: @mode;
}
/* Workspaces stuff */
#workspaces button {
/*font-weight: bold;*/
padding-left: 2pt;
padding-right: 2pt;
color: @white;
background: @unfocused;
}
/* Inactive (on unfocused output) */
@@ -155,112 +133,52 @@
margin-left: 35pt;
}
#pulseaudio {
background: @sound;
color: @black;
}
#network {
background: @network;
color: @white;
}
#memory {
background: @memory;
color: @black;
}
#cpu {
background: @cpu;
color: @white;
}
#temperature {
background: @temp;
color: @black;
}
#language {
background: @layout;
color: @black;
}
#battery {
background: @battery;
color: @white;
}
#tray {
background: @date;
}
#clock.date {
background: @date;
color: @white;
}
#clock.time {
background: @time;
color: @black;
}
#custom-arrow1 {
font-size: 11pt;
color: @time;
background: @date;
}
#custom-arrow2 {
font-size: 11pt;
color: @date;
background: @layout;
}
#custom-arrow3 {
font-size: 11pt;
color: @layout;
background: @battery;
}
#custom-arrow4 {
font-size: 11pt;
color: @battery;
background: @temp;
}
#custom-arrow5 {
font-size: 11pt;
color: @temp;
background: @cpu;
}
#custom-arrow6 {
font-size: 11pt;
color: @cpu;
background: @memory;
}
#custom-arrow7 {
font-size: 11pt;
color: @memory;
background: @network;
}
#custom-arrow8 {
font-size: 11pt;
color: @network;
background: @sound;
}
#custom-arrow9 {
font-size: 11pt;
color: @sound;
background: transparent;
}
#custom-arrow10 {
font-size: 11pt;
color: @unfocused;
background: transparent;
}
/* #pulseaudio { */
/* background: @sound; */
/* color: @black; */
/* } */
/**/
/* #network { */
/* background: @network; */
/* color: @white; */
/* } */
/**/
/* #memory { */
/* background: @memory; */
/* color: @black; */
/* } */
/**/
/* #cpu { */
/* background: @cpu; */
/* color: @white; */
/* } */
/**/
/* #temperature { */
/* background: @temp; */
/* color: @black; */
/* } */
/**/
/* #language { */
/* background: @layout; */
/* color: @black; */
/* } */
/**/
/* #battery { */
/* background: @battery; */
/* color: @white; */
/* } */
/**/
/* #tray { */
/* background: @date; */
/* } */
/**/
/* #clock.date { */
/* background: @date; */
/* color: @white; */
/* } */
/**/
/* #clock.time { */
/* background: @time; */
/* color: @black; */
/* } */
/**/