Compare commits

...

2 commits

Author SHA1 Message Date
919132f1ae
waybar 2024-11-21 19:48:11 +01:00
4ebbb35037
Some waybar stuff 2024-11-21 18:54:11 +01:00
3 changed files with 448 additions and 56 deletions

View file

@ -40,7 +40,6 @@ environment {
// GDK_BACKEND "x11"
}
//
output "Philips Consumer Electronics Company PHL 345B1C 0x00008E7C" {
mode "3440x1440@60"
scale 1
@ -48,12 +47,12 @@ output "Philips Consumer Electronics Company PHL 345B1C 0x00008E7C" {
position x=0 y=0
}
output "DP-4" {
mode "2560x1440"
scale 1
position x=0 y=0
off
}
//output "DP-4" {
//mode "2560x1440"
//scale 1
//position x=0 y=0
//off
//}
output "eDP-1" {
mode "1920x1080@60"
@ -61,7 +60,7 @@ output "eDP-1" {
transform "normal"
position x=0 y=1440
}
//
layout {
gaps 16

View file

@ -1,12 +1,14 @@
// -*- mode: jsonc -*-
{
// "layer": "top", // Waybar at top layer
// "position": "bottom", // Waybar position (top|bottom|left|right)
"height": 24, // Waybar height (to be removed for auto height)
// "width": 1280, // Waybar width
"spacing": 4, // Gaps between modules (4px)
"position": "top", // Waybar position (top|bottom|left|right)
//"height": 24, // Waybar height (to be removed for auto height)
//"width": 24, // Waybar width
"spacing": 6, // Gaps between modules (4px)
"reload_style_on_change": true,
// Choose the order of the modules
"modules-left": [
"niri/workspaces",
"sway/workspaces",
"sway/mode",
"sway/scratchpad",
@ -18,22 +20,60 @@
"clock#date"
],
"modules-right": [
"mpd",
"idle_inhibitor",
"pulseaudio",
"network",
"power-profiles-daemon",
//"mpd",
//"idle_inhibitor",
"privacy",
//"network",
"cpu",
"memory",
"temperature",
"custom/display-scale",
"power-profiles-daemon",
"pulseaudio",
"backlight",
"keyboard-state",
"sway/language",
"battery",
"battery#bat2",
//"battery#bat2",
"tray",
"custom/power"
],
"niri/workspaces": {
"format": "{icon}",
"format-icons": {
// Named workspaces
// (you need to configure them in niri)
"browser": "",
"discord": "",
"chat": "<b></b>",
// Icons by state
//"focused": "◈",
"focused": "◆",
"active": "◆",
"default": "◆"
}
},
"privacy": {
"icon-spacing": 4,
"icon-size": 18,
"transition-duration": 250,
"modules": [
{
"type": "screenshare",
"tooltip": true,
"tooltip-icon-size": 24
},
{
"type": "audio-out",
"tooltip": true,
"tooltip-icon-size": 24
},
{
"type": "audio-in",
"tooltip": true,
"tooltip-icon-size": 24
}
]
},
// Modules configuration
// "sway/workspaces": {
// "disable-scroll": true,
@ -66,7 +106,10 @@
"sway/scratchpad": {
"format": "{icon} {count}",
"show-empty": false,
"format-icons": ["", ""],
"format-icons": [
"",
""
],
"tooltip": true,
"tooltip-format": "{app}: {title}"
},
@ -130,12 +173,30 @@
"critical-threshold": 80,
// "format-critical": "{temperatureC}°C {icon}",
"format": "{temperatureC}°C {icon}",
"format-icons": ["", "", ""]
"format-icons": [
"",
"",
""
]
},
"backlight": {
// "device": "acpi_video1",
"device": "intel_backlight",
"format": "{percent}% {icon}",
"format-icons": ["", "", "", "", "", "", "", "", ""]
"format-icons": [
"",
"",
"",
"",
"",
"",
"",
"",
""
],
"on-scroll-up": "brightnessctl s 5%+",
"on-scroll-down": "brightnessctl s 1%-",
"on-click-right": "brightnessctl s 1%",
"on-click": "brightnessctl s 50%"
},
"battery": {
"states": {
@ -150,7 +211,13 @@
"format-alt": "{time} {icon}",
// "format-good": "", // An empty format will hide the module
// "format-full": "",
"format-icons": ["", "", "", "", ""]
"format-icons": [
"",
"",
"",
"",
""
]
},
"battery#bat2": {
"bat": "BAT2"
@ -190,24 +257,16 @@
"phone": "",
"portable": "",
"car": "",
"default": ["", "", ""]
"default": [
"",
"",
""
]
},
"on-click": "pavucontrol"
},
"custom/media": {
"format": "{icon} {text}",
"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
},
"custom/power": {
"format" : "⏻ ",
"format": "⏻",
"tooltip": false,
"menu": "on-click",
"menu-file": "$HOME/.config/waybar/power_menu.xml", // Menu file in resources folder
@ -217,5 +276,11 @@
"suspend": "systemctl suspend",
"hibernate": "systemctl hibernate"
}
},
"custom/display-scale": {
"format": "",
"on-click": "niri msg output eDP-1 scale 1.0",
"on-click-right": "niri msg output eDP-1 scale 1.25"
}
}

View file

@ -0,0 +1,328 @@
* {
/* `otf-font-awesome` is required to be installed for icons */
font-family: Terminus, "Font awesome 6 Free", Helvetica, Arial, sans-serif;
/*font-family: FontAwesome, Roboto, Helvetica, Arial, sans-serif;*/
font-size: 16px;
}
window.eDP-1 * { font-size: 10px; }
window#waybar {
background-color: #1d2021;
/*border-bottom: 3px solid rgba(100, 114, 125, 0.5);*/
color: #ebdbb2;
/*transition-property: background-color;*/
/*transition-duration: .5s;*/
}
window .modules-right > * > * {
background-color: #282828;
padding: 0 10px;
}
window .modules-left, .modules-right, .modules-center {
margin: 3px 0;
}
window.eDP-1 .modules-left, window.eDP-1 .modules-right, window.eDP-1 .modules-center {
margin: 0px 0;
}
window#waybar.hidden {
opacity: 0.2;
}
#workspaces button * {
padding: 0px 0px;
color: #ebdbb2;
font-size: 24px;
padding-top: 0px;
}
#workspaces button.empty * {
color: #928374
}
#workspaces button.active * {
color: #8ec07c;
}
#window, #workspaces {
/*margin: 0 4px;*/
}
#workspaces * {
color: #ebdbb2;
}
/* If workspaces is the leftmost module, omit left margin */
.modules-left > widget:first-child > #workspaces {
margin-left: 0;
}
.modules-right > widget:last-child > * {
/*padding-right: 4px;*/
margin-right: 4px;
}
#battery.charging, #battery.plugged {
color: #b8bb26;
/*background-color: #26A65B;*/
}
@keyframes blink {
to {
background-color: #ffffff;
color: #000000;
}
}
/* Using steps() instead of linear as a timing function to limit cpu usage */
#battery.critical:not(.charging) {
/*background-color: #f53c3c;*/
color: #fb4934;
animation-name: blink;
animation-duration: 0.5s;
animation-timing-function: steps(12);
animation-iteration-count: infinite;
animation-direction: alternate;
}
#privacy {
padding: 0;
}
#privacy-item {
padding: 0 5px;
color: white;
}
#privacy-item.screenshare {
background-color: #cf5700;
}
#privacy-item.audio-in {
background-color: #1ca000;
}
#privacy-item.audio-out {
background-color: #0069d4;
}
#power-profiles-daemon {
min-width: 20px;
}
#power-profiles-daemon.performance {
background-color: #3c2525;
}
#power-profiles-daemon.balanced {
}
#power-profiles-daemon.power-saver {
background-color: #253125;
}
/*button {*/
/*[> Use box-shadow instead of border so the text isn't offset <]*/
/*box-shadow: inset 0 -3px transparent;*/
/*[> Avoid rounded borders under each button name <]*/
/*border: none;*/
/*border-radius: 0;*/
/*}*/
/*[> https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect <]*/
/*button:hover {*/
/*background: inherit;*/
/*box-shadow: inset 0 -3px #ffffff;*/
/*}*/
/*[> you can set a style on hover for any module like this <]*/
/*#pulseaudio:hover {*/
/*background-color: #a37800;*/
/*}*/
/*#workspaces button {*/
/*padding: 0 5px;*/
/*background-color: transparent;*/
/*color: #ffffff;*/
/*}*/
/*#workspaces button:hover {*/
/*background: rgba(0, 0, 0, 0.2);*/
/*}*/
/*#workspaces button.focused {*/
/*background-color: #64727D;*/
/*box-shadow: inset 0 -3px #ffffff;*/
/*}*/
/*#workspaces button.urgent {*/
/*background-color: #eb4d4b;*/
/*}*/
/*#mode {*/
/*background-color: #64727D;*/
/*box-shadow: inset 0 -3px #ffffff;*/
/*}*/
/*#clock,*/
/*#battery,*/
/*#cpu,*/
/*#memory,*/
/*#disk,*/
/*#temperature,*/
/*#backlight,*/
/*#network,*/
/*#pulseaudio,*/
/*#wireplumber,*/
/*#custom-media,*/
/*#tray,*/
/*#mode,*/
/*#idle_inhibitor,*/
/*#scratchpad,*/
/*#power-profiles-daemon,*/
/*#mpd {*/
/*padding: 0 5px;*/
/*color: #ebdbb2;*/
/*}*/
/*label:focus {*/
/*background-color: #000000;*/
/*}*/
/*#cpu {*/
/*background-color: #2ecc71;*/
/*color: #000000;*/
/*}*/
/*#memory {*/
/*background-color: #9b59b6;*/
/*}*/
/*#disk {*/
/*background-color: #964B00;*/
/*}*/
/*#backlight {*/
/*background-color: #90b1b1;*/
/*}*/
/*#network {*/
/*background-color: #2980b9;*/
/*}*/
/*#network.disconnected {*/
/*background-color: #f53c3c;*/
/*}*/
/*#pulseaudio {*/
/*background-color: #f1c40f;*/
/*color: #000000;*/
/*}*/
/*#pulseaudio.muted {*/
/*background-color: #90b1b1;*/
/*color: #2a5c45;*/
/*}*/
/*#wireplumber {*/
/*background-color: #fff0f5;*/
/*color: #000000;*/
/*}*/
/*#wireplumber.muted {*/
/*background-color: #f53c3c;*/
/*}*/
/*#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: #f0932b;*/
/*}*/
/*#temperature.critical {*/
/*background-color: #eb4d4b;*/
/*}*/
/*#tray {*/
/*background-color: #2980b9;*/
/*}*/
/*#tray > .passive {*/
/*-gtk-icon-effect: dim;*/
/*}*/
/*#tray > .needs-attention {*/
/*-gtk-icon-effect: highlight;*/
/*background-color: #eb4d4b;*/
/*}*/
/*#idle_inhibitor {*/
/*background-color: #2d3436;*/
/*}*/
/*#idle_inhibitor.activated {*/
/*background-color: #ecf0f1;*/
/*color: #2d3436;*/
/*}*/
/*#mpd {*/
/*background-color: #66cc99;*/
/*color: #2a5c45;*/
/*}*/
/*#mpd.disconnected {*/
/*background-color: #f53c3c;*/
/*}*/
/*#mpd.stopped {*/
/*background-color: #90b1b1;*/
/*}*/
/*#mpd.paused {*/
/*background-color: #51a37a;*/
/*}*/
/*#language {*/
/*background: #00b093;*/
/*color: #740864;*/
/*padding: 0 5px;*/
/*margin: 0 5px;*/
/*min-width: 16px;*/
/*}*/
/*#keyboard-state {*/
/*background: #97e1ad;*/
/*color: #000000;*/
/*padding: 0 0px;*/
/*margin: 0 5px;*/
/*min-width: 16px;*/
/*}*/
/*#keyboard-state > label {*/
/*padding: 0 5px;*/
/*}*/
/*#keyboard-state > label.locked {*/
/*background: rgba(0, 0, 0, 0.2);*/
/*}*/
/*#scratchpad {*/
/*background: rgba(0, 0, 0, 0.2);*/
/*}*/
/*#scratchpad.empty {*/
/*background-color: transparent;*/
/*}*/