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", "layer": "top",
"position": "top", "position": "top",
"height": 24,
"modules-left": [ "modules-left": [
"hyprland/mode", // "hyprland/mode",
"hyprland/workspaces", "hyprland/workspaces"
"custom/arrow10", // "custom/arrow10",
],
"modules-center": [
"hyprland/window" "hyprland/window"
], ],
"modules-right": [ "modules-right": [
"custom/arrow9", // "custom/arrow9",
"pulseaudio", "pulseaudio",
"custom/arrow8", // "custom/arrow8",
"network", "network",
"custom/arrow7", // "custom/arrow7",
"memory", "memory",
"custom/arrow6", // "custom/arrow6",
"cpu", "cpu",
"custom/arrow5", // "custom/arrow5",
"temperature", // "temperature",
"custom/arrow4", // "custom/arrow4",
"battery", // "battery",
"custom/arrow3", // "custom/arrow3",
"hyprland/language", "hyprland/language",
"custom/arrow2", // "custom/arrow2",
"tray", "tray",
"clock#date", "clock#date",
"custom/arrow1", // "custom/arrow1",
"clock#time" "clock#time"
], ],
// Modules // Modules
"battery": { // "battery": {
"interval": 10, // "interval": 10,
"states": { // "states": {
"warning": 30, // "warning": 30,
"critical": 15 // "critical": 15
}, // },
"format-time": "{H}:{M:02}", // "format-time": "{H}:{M:02}",
"format": "{icon} {capacity}% ({time})", // "format": "{icon} {capacity}% ({time})",
"format-charging": " {capacity}% ({time})", // "format-charging": " {capacity}% ({time})",
"format-charging-full": " {capacity}%", // "format-charging-full": " {capacity}%",
"format-full": "{icon} {capacity}%", // "format-full": "{icon} {capacity}%",
"format-alt": "{icon} {power}W", // "format-alt": "{icon} {power}W",
"format-icons": [ // "format-icons": [
"", // "",
"", // "",
"", // "",
"", // "",
"" // ""
], // ],
"tooltip": false // "tooltip": false
}, // },
"clock#time": { "clock#time": {
"interval": 10, "interval": 10,
@@ -71,8 +76,7 @@
"cpu": { "cpu": {
"interval": 5, "interval": 5,
"tooltip": false, "tooltip": false,
"format": " {usage}%", "format": "CPU: {usage}%",
"format-alt": " {load}",
"states": { "states": {
"warning": 70, "warning": 70,
"critical": 90 "critical": 90
@@ -88,7 +92,7 @@
"memory": { "memory": {
"interval": 5, "interval": 5,
"format": " {used:0.1f}G/{total:0.1f}G", "format": "MEM: {used:0.1f}G/{total:0.1f}G",
"states": { "states": {
"warning": 70, "warning": 70,
"critical": 90 "critical": 90
@@ -98,15 +102,10 @@
"network": { "network": {
"interval": 5, "interval": 5,
"format-wifi": " {essid} ({signalStrength}%)", // "format-wifi": " {essid} ({signalStrength}%)",
"format-ethernet": " {ifname}", "format-ethernet": "UP:{bandwidthUpBytes} DOWN:{bandwidthDownBytes}",
"format-disconnected": "No connection", "format-disconnected": "No connection",
"format-alt": " {ipaddr}/{cidr}", // "format-alt": " {ipaddr}/{cidr}",
"tooltip": false
},
"hyprland/mode": {
"format": "{}",
"tooltip": false "tooltip": false
}, },
@@ -124,91 +123,91 @@
}, },
"pulseaudio": { "pulseaudio": {
"format": "{icon} {volume}%", "format": "AUD: {volume}%",
"format-bluetooth": "{icon} {volume}%", // "format-bluetooth": "{icon} {volume}%",
"format-muted": "", "format-muted": "AUD: 0%",
"format-icons": { // "format-icons": {
"headphone": "", // "headphone": "",
"hands-free": "", // "hands-free": "",
"headset": "", // "headset": "",
"phone": "", // "phone": "",
"portable": "", // "portable": "",
"car": "", // "car": "",
"default": ["", ""] // "default": ["", ""]
}, // },
"scroll-step": 1, "scroll-step": 1,
"on-click": "pactl set-sink-mute @DEFAULT_SINK@ toggle", "on-click": "pactl set-sink-mute @DEFAULT_SINK@ toggle",
"tooltip": false "tooltip": false
}, },
"temperature": { // "temperature": {
"critical-threshold": 90, // "critical-threshold": 90,
"interval": 5, // "interval": 5,
"format": "{icon} {temperatureC}°", // "format": "{icon} {temperatureC}°",
"format-icons": [ // "format-icons": [
"", // "",
"", // "",
"", // "",
"", // "",
"" // ""
], // ],
"tooltip": false // "tooltip": false
}, // },
"tray": { "tray": {
"icon-size": 18 "icon-size": 18
//"spacing": 10 //"spacing": 10
}, },
"custom/arrow1": { // "custom/arrow1": {
"format": "", // "format": "",
"tooltip": false // "tooltip": false
}, // },
"custom/arrow2": { // "custom/arrow2": {
"format": "", // "format": "",
"tooltip": false // "tooltip": false
}, // },
"custom/arrow3": { // "custom/arrow3": {
"format": "", // "format": "",
"tooltip": false // "tooltip": false
}, // },
"custom/arrow4": { // "custom/arrow4": {
"format": "", // "format": "",
"tooltip": false // "tooltip": false
}, // },
//
"custom/arrow5": { // "custom/arrow5": {
"format": "", // "format": "",
"tooltip": false // "tooltip": false
}, // },
//
"custom/arrow6": { // "custom/arrow6": {
"format": "", // "format": "",
"tooltip": false // "tooltip": false
}, // },
//
"custom/arrow7": { // "custom/arrow7": {
"format": "", // "format": "",
"tooltip": false // "tooltip": false
}, // },
//
"custom/arrow8": { // "custom/arrow8": {
"format": "", // "format": "",
"tooltip": false // "tooltip": false
}, // },
//
"custom/arrow9": { // "custom/arrow9": {
"format": "", // "format": "",
"tooltip": false // "tooltip": false
}, // },
//
"custom/arrow10": { // "custom/arrow10": {
"format": "", // "format": "",
"tooltip": false // "tooltip": false
} // }
} }
// vi:ft=jsonc // 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; 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 */ /* Each warning */
#network.disconnected, #network.disconnected,
#memory.warning, #memory.warning,
@@ -109,21 +96,12 @@
color: @warning; color: @warning;
} }
/* And now modules themselves in their respective order */
/* Current sway mode (resize etc) */
#mode {
color: @white;
background: @mode;
}
/* Workspaces stuff */ /* Workspaces stuff */
#workspaces button { #workspaces button {
/*font-weight: bold;*/ /*font-weight: bold;*/
padding-left: 2pt; padding-left: 2pt;
padding-right: 2pt; padding-right: 2pt;
color: @white; color: @white;
background: @unfocused;
} }
/* Inactive (on unfocused output) */ /* Inactive (on unfocused output) */
@@ -155,112 +133,52 @@
margin-left: 35pt; margin-left: 35pt;
} }
#pulseaudio { /* #pulseaudio { */
background: @sound; /* background: @sound; */
color: @black; /* color: @black; */
} /* } */
/**/
#network { /* #network { */
background: @network; /* background: @network; */
color: @white; /* color: @white; */
} /* } */
/**/
#memory { /* #memory { */
background: @memory; /* background: @memory; */
color: @black; /* color: @black; */
} /* } */
/**/
#cpu { /* #cpu { */
background: @cpu; /* background: @cpu; */
color: @white; /* color: @white; */
} /* } */
/**/
#temperature { /* #temperature { */
background: @temp; /* background: @temp; */
color: @black; /* color: @black; */
} /* } */
/**/
#language { /* #language { */
background: @layout; /* background: @layout; */
color: @black; /* color: @black; */
} /* } */
/**/
#battery { /* #battery { */
background: @battery; /* background: @battery; */
color: @white; /* color: @white; */
} /* } */
/**/
#tray { /* #tray { */
background: @date; /* background: @date; */
} /* } */
/**/
#clock.date { /* #clock.date { */
background: @date; /* background: @date; */
color: @white; /* color: @white; */
} /* } */
/**/
#clock.time { /* #clock.time { */
background: @time; /* background: @time; */
color: @black; /* 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;
}