mirror of
https://github.com/ellmau/nixos.git
synced 2025-12-19 09:29:36 +01:00
Fix waybar error in config, update styles, mako and sway
* swayconfig keybindings for special multimedia keys * waybar base stylefile + basic modules * mako timeout, so notifications are not hovering there all the time
This commit is contained in:
parent
5cac4da126
commit
b83ae8f2c0
313
users/ellmau/conf/waybar/style.css
Normal file
313
users/ellmau/conf/waybar/style.css
Normal file
@ -0,0 +1,313 @@
|
|||||||
|
/* -----------------------------------------------------------------------------
|
||||||
|
* Keyframes
|
||||||
|
* -------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
@keyframes blink-warning {
|
||||||
|
70% {
|
||||||
|
color: @light;
|
||||||
|
}
|
||||||
|
|
||||||
|
to {
|
||||||
|
color: @light;
|
||||||
|
background-color: @warning;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes blink-critical {
|
||||||
|
70% {
|
||||||
|
color: @light;
|
||||||
|
}
|
||||||
|
|
||||||
|
to {
|
||||||
|
color: @light;
|
||||||
|
background-color: @critical;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@define-color critical #cc241d;
|
||||||
|
@define-color warning #fabd2f;
|
||||||
|
|
||||||
|
* {
|
||||||
|
/* `otf-font-awesome` is required to be installed for icons */
|
||||||
|
font-family: FontAwesome, Roboto, Helvetica, Arial, sans-serif;
|
||||||
|
font-size: 13px;
|
||||||
|
border: none;
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
window#waybar {
|
||||||
|
background-color: rgba(43, 48, 59, 0.5);
|
||||||
|
border-bottom: 3px solid rgba(100, 114, 125, 0.5);
|
||||||
|
color: #ffffff;
|
||||||
|
transition-property: background-color;
|
||||||
|
transition-duration: .5s;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
window#waybar.hidden {
|
||||||
|
opacity: 0.2;
|
||||||
|
}*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
window#waybar.empty {
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
window#waybar.solo {
|
||||||
|
background-color: #FFFFFF;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/* Each module that should blink */
|
||||||
|
#mode,
|
||||||
|
#battery {
|
||||||
|
animation-timing-function: linear;
|
||||||
|
animation-iteration-count: infinite;
|
||||||
|
animation-direction: alternate;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Each critical that should blink */
|
||||||
|
#mode,
|
||||||
|
#battery.critical.discharging {
|
||||||
|
animation-name: blink-critical;
|
||||||
|
animation-duration: 2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Each warning */
|
||||||
|
#network.disconnected,
|
||||||
|
#battery.warning {
|
||||||
|
background-color: @warning;
|
||||||
|
color: #000000;
|
||||||
|
}
|
||||||
|
|
||||||
|
window#waybar.termite {
|
||||||
|
background-color: #3F3F3F;
|
||||||
|
}
|
||||||
|
|
||||||
|
window#waybar.chromium {
|
||||||
|
background-color: #000000;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#network.wifi {
|
||||||
|
background-color: #C9CBFF;
|
||||||
|
color: #000000;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button {
|
||||||
|
padding: 0 5px;
|
||||||
|
background-color: transparent;
|
||||||
|
color: #ffffff;
|
||||||
|
/* Use box-shadow instead of border so the text isn't offset */
|
||||||
|
box-shadow: inset 0 -3px transparent;
|
||||||
|
/* Avoid rounded borders under each workspace name */
|
||||||
|
border: none;
|
||||||
|
border-radius: 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
|
||||||
|
#workspaces button:hover {
|
||||||
|
background: rgba(0, 0, 0, 0.2);
|
||||||
|
box-shadow: inset 0 -2px #ecf0f1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.focused {
|
||||||
|
background-color: #64727D;
|
||||||
|
box-shadow: inset 0 -2px #ecf0f1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.urgent {
|
||||||
|
background-color: #eb4d4b;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mode {
|
||||||
|
background-color: #64727D;
|
||||||
|
border-bottom: 2px solid #ecf0f1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#clock,
|
||||||
|
#battery,
|
||||||
|
#cpu,
|
||||||
|
#memory,
|
||||||
|
#disk,
|
||||||
|
#temperature,
|
||||||
|
#backlight,
|
||||||
|
#network,
|
||||||
|
#pulseaudio,
|
||||||
|
#custom-media,
|
||||||
|
#tray,
|
||||||
|
#mode,
|
||||||
|
#idle_inhibitor,
|
||||||
|
#mpd {
|
||||||
|
margin-left: 2px;
|
||||||
|
margin-right: 2px;
|
||||||
|
padding: 0 10px;
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#window,
|
||||||
|
#workspaces {
|
||||||
|
margin: 0 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* If workspaces is the leftmost module, omit left margin */
|
||||||
|
.modules-left > widget:first-child > #workspaces {
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* If workspaces is the rightmost module, omit right margin */
|
||||||
|
.modules-right > widget:last-child > #workspaces {
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#clock {
|
||||||
|
background-color: #64727D;
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery {
|
||||||
|
background-color: #ffffff;
|
||||||
|
color: #000000;
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery.charging, #battery.plugged {
|
||||||
|
color: #ffffff;
|
||||||
|
background-color: #26A65B;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes blink {
|
||||||
|
to {
|
||||||
|
background-color: #ffffff;
|
||||||
|
color: #000000;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery.critical:not(.charging) {
|
||||||
|
background-color: #f53c3c;
|
||||||
|
color: #ffffff;
|
||||||
|
animation-name: blink;
|
||||||
|
animation-duration: 0.5s;
|
||||||
|
animation-timing-function: linear;
|
||||||
|
animation-iteration-count: infinite;
|
||||||
|
animation-direction: alternate;
|
||||||
|
}
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
#pulseaudio {
|
||||||
|
background-color: #f1c40f;
|
||||||
|
color: #000000;
|
||||||
|
}
|
||||||
|
|
||||||
|
#pulseaudio.muted {
|
||||||
|
background-color: #90b1b1;
|
||||||
|
color: #2a5c45;
|
||||||
|
}
|
||||||
|
|
||||||
|
#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);
|
||||||
|
}
|
||||||
@ -5,7 +5,9 @@
|
|||||||
enable = true;
|
enable = true;
|
||||||
iconPath = "${pkgs.numix-icon-theme}";
|
iconPath = "${pkgs.numix-icon-theme}";
|
||||||
font = "Hasklug Nerd Font 10";
|
font = "Hasklug Nerd Font 10";
|
||||||
defaultTimeout = 50003;
|
defaultTimeout = 50000;
|
||||||
|
ignoreTimeout = true;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
home.packages = [ pkgs.numix-icon-theme ];
|
home.packages = [ pkgs.numix-icon-theme ];
|
||||||
|
|||||||
@ -22,6 +22,7 @@
|
|||||||
home.packages = [
|
home.packages = [
|
||||||
pkgs.gnome-icon-theme
|
pkgs.gnome-icon-theme
|
||||||
pkgs.swaylock
|
pkgs.swaylock
|
||||||
|
pkgs.pulseaudioFull
|
||||||
];
|
];
|
||||||
|
|
||||||
wayland.windowManager.sway = {
|
wayland.windowManager.sway = {
|
||||||
@ -37,12 +38,19 @@
|
|||||||
keybindings =
|
keybindings =
|
||||||
let
|
let
|
||||||
modifier = config.wayland.windowManager.sway.config.modifier;
|
modifier = config.wayland.windowManager.sway.config.modifier;
|
||||||
|
bctl = "${pkgs.brightnessctl}/bin/brightnessctl";
|
||||||
in
|
in
|
||||||
lib.mkOptionDefault {
|
lib.mkOptionDefault {
|
||||||
"${modifier}+Shift+q" = "kill";
|
"${modifier}+Shift+q" = "kill";
|
||||||
"${modifier}+d" = "exec ${pkgs.rofi}/bin/rofi -show drun";
|
"${modifier}+d" = "exec ${pkgs.rofi}/bin/rofi -show drun";
|
||||||
"${modifier}+Tab" = "exec ${pkgs.rofi}/bin/rofi -show window";
|
"${modifier}+Tab" = "exec ${pkgs.rofi}/bin/rofi -show window";
|
||||||
"${modifier}+BackSpace" = ''mode "$mode_system"'';
|
"${modifier}+BackSpace" = ''mode "$mode_system"'';
|
||||||
|
XF86MonBrightnessDown = "exec ${bctl} s 2%-";
|
||||||
|
XF86MonBrightnessUp = "exec ${bctl} s 2%+";
|
||||||
|
XF86AudioMute = "exec ${pkgs.pamixer}/bin/pamixer -t";
|
||||||
|
XF86AudioLowerVolume = "exec ${pkgs.pulseaudioFull}/bin/pactl set-sink-volume @DEFAULT_SINK@ -10%";
|
||||||
|
XF86AudioRaiseVolume = "exec ${pkgs.pulseaudioFull}/bin/pactl set-sink-volume @DEFAULT_SINK@ +10%";
|
||||||
|
|
||||||
};
|
};
|
||||||
keycodebindings =
|
keycodebindings =
|
||||||
let
|
let
|
||||||
@ -66,6 +74,10 @@
|
|||||||
{
|
{
|
||||||
command = "--no-startup-id .config/i3/keepassxc.sh";
|
command = "--no-startup-id .config/i3/keepassxc.sh";
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
command = ''--no-startup-id swaymsg output "*" bg .background-image fill'';
|
||||||
|
always = true;
|
||||||
|
}
|
||||||
];
|
];
|
||||||
terminal = "alacritty";
|
terminal = "alacritty";
|
||||||
window = {
|
window = {
|
||||||
|
|||||||
@ -1,5 +1,8 @@
|
|||||||
{ config, pkgs, llib, ... }:
|
{ config, pkgs, llib, ... }:
|
||||||
{
|
{
|
||||||
|
xdg.configFile."waybar/style.css" = {
|
||||||
|
source = conf/waybar/style.css;
|
||||||
|
};
|
||||||
programs.waybar = {
|
programs.waybar = {
|
||||||
enable = true;
|
enable = true;
|
||||||
systemd.enable = true;
|
systemd.enable = true;
|
||||||
@ -7,14 +10,16 @@
|
|||||||
mainBar = {
|
mainBar = {
|
||||||
modules-left = [ "sway/workspaces" "sway/mode" ];
|
modules-left = [ "sway/workspaces" "sway/mode" ];
|
||||||
modules-center = [ "sway/window" ];
|
modules-center = [ "sway/window" ];
|
||||||
modules-right = [ "idle_inhibitor" "sway/language" "battery" "pulseaudio" "clock" "tray" ];
|
modules-right = [ "idle_inhibitor" "sway/language" "network#wifi" "network#base" "battery" "pulseaudio" "clock" "tray" ];
|
||||||
|
|
||||||
idle_inhibitor = {
|
"idle_inhibitor" = {
|
||||||
format = "{icon}";
|
format = "{icon}";
|
||||||
format-icons = {
|
format-icons = {
|
||||||
activated = "";
|
activated = "";
|
||||||
deactivated = "";
|
deactivated = "";
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
battery = {
|
battery = {
|
||||||
states = {
|
states = {
|
||||||
good = 95;
|
good = 95;
|
||||||
@ -27,24 +32,54 @@
|
|||||||
format-alt = "{time} {icon}";
|
format-alt = "{time} {icon}";
|
||||||
format-icons = [ "" "" "" "" "" ];
|
format-icons = [ "" "" "" "" "" ];
|
||||||
};
|
};
|
||||||
|
"clock" = {
|
||||||
|
format-alt = "{:%a, %d. %b %H:%M}";
|
||||||
|
};
|
||||||
|
|
||||||
|
"network#wifi" = {
|
||||||
|
interface = "wlp2s0";
|
||||||
|
format = "{ifname}";
|
||||||
|
format-wifi = "{essid} ({signalStrength}%) ";
|
||||||
|
format-ethernet = "{ipaddr}/{cidr} ";
|
||||||
|
format-disconnected = "wifi:";
|
||||||
|
tooltip-format = "{ifname} via {gwaddr} ";
|
||||||
|
tooltip-format-wifi = "{essid} ({signalStrength}%) ";
|
||||||
|
tooltip-format-ethernet = "{ifname} ";
|
||||||
|
tooltip-format-disconnected = "Disconnected";
|
||||||
|
max-length = 50;
|
||||||
|
};
|
||||||
|
|
||||||
|
"network#base" = {
|
||||||
|
format = "{ifname}";
|
||||||
|
format-wifi = "{essid} ({signalStrength}%) ";
|
||||||
|
format-ethernet = "{ipaddr}/{cidr} ";
|
||||||
|
format-disconnected = "";
|
||||||
|
tooltip-format = "{ifname} via {gwaddr} ";
|
||||||
|
tooltip-format-wifi = "{essid} ({signalStrength}%) ";
|
||||||
|
tooltip-format-ethernet = "{ifname} ";
|
||||||
|
tooltip-format-disconnected = "Disconnected";
|
||||||
|
max-length = 50;
|
||||||
|
};
|
||||||
|
|
||||||
pulseaudio = {
|
pulseaudio = {
|
||||||
format = "{icon} {volume:2}%";
|
format = "{icon} {volume:2}%";
|
||||||
format-bluetooth = "{icon} {volume}%";
|
format-bluetooth = "{icon} {volume}%";
|
||||||
format-muted = "MUTE";
|
format-muted = "🔇";
|
||||||
format-icons = {
|
format-icons = {
|
||||||
headphones = "";
|
headphones = "";
|
||||||
default = [
|
default = [
|
||||||
""
|
"🔈"
|
||||||
""
|
"🔉"
|
||||||
|
"🔊"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
scroll-step = 5;
|
scroll-step = 5;
|
||||||
on-click = "${pkgs.pamixer}/bin/pamixer -t";
|
on-click = "${pkgs.pamixer}/bin/pamixer -t";
|
||||||
on-click-right = "${pkgs.pavucontrol}/bin/pavucontrol &";
|
on-click-right = "${pkgs.pavucontrol}/bin/pavucontrol &";
|
||||||
};
|
};
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user