Switch to i3status-rust instead of waybar
This commit is contained in:
parent
63080224d2
commit
a592039b00
5 changed files with 59 additions and 194 deletions
|
@ -32,7 +32,7 @@
|
||||||
fonts = with pkgs; [
|
fonts = with pkgs; [
|
||||||
fira-code
|
fira-code
|
||||||
fira-code-symbols
|
fira-code-symbols
|
||||||
font-awesome
|
font-awesome_4
|
||||||
noto-fonts
|
noto-fonts
|
||||||
noto-fonts-cjk
|
noto-fonts-cjk
|
||||||
noto-fonts-emoji
|
noto-fonts-emoji
|
||||||
|
|
|
@ -26,6 +26,7 @@ in
|
||||||
set autoread
|
set autoread
|
||||||
"" Theming
|
"" Theming
|
||||||
|
|
||||||
|
set termguicolors
|
||||||
set background=light
|
set background=light
|
||||||
colorscheme snow
|
colorscheme snow
|
||||||
|
|
||||||
|
|
|
@ -5,11 +5,11 @@ let
|
||||||
launcher = import ./launcher.nix { inherit pkgs stdenv; };
|
launcher = import ./launcher.nix { inherit pkgs stdenv; };
|
||||||
color-picker = import ./color-picker.nix { inherit pkgs; };
|
color-picker = import ./color-picker.nix { inherit pkgs; };
|
||||||
screenshot = import ./screenshot.nix { inherit pkgs; };
|
screenshot = import ./screenshot.nix { inherit pkgs; };
|
||||||
|
status-configuration = import ./status-configuration.nix { inherit pkgs; };
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./kanshi.nix
|
./kanshi.nix
|
||||||
./waybar.nix
|
|
||||||
];
|
];
|
||||||
programs = {
|
programs = {
|
||||||
sway = {
|
sway = {
|
||||||
|
@ -290,7 +290,23 @@ in
|
||||||
#
|
#
|
||||||
# Read `man 5 sway-bar` for more information about this section.
|
# Read `man 5 sway-bar` for more information about this section.
|
||||||
bar {
|
bar {
|
||||||
swaybar_command ${pkgs.waybar}/bin/waybar
|
position top
|
||||||
|
|
||||||
|
status_command ${pkgs.i3status-rust}/bin/i3status-rs ${status-configuration}
|
||||||
|
status_padding 0
|
||||||
|
|
||||||
|
font Fira Code Normal 9
|
||||||
|
|
||||||
|
colors {
|
||||||
|
statusline #535c65
|
||||||
|
background #fbffff
|
||||||
|
focused_workspace #2b7ab2 #2b7ab2 #fbffff
|
||||||
|
active_workspace #6d7782 #6d7782 #fbffff
|
||||||
|
inactive_workspace #fbffff #fbffff #535c65
|
||||||
|
urgent_workspace #ae5865 #ae5865 #fbffff
|
||||||
|
}
|
||||||
|
|
||||||
|
icon_theme Arc
|
||||||
}
|
}
|
||||||
|
|
||||||
default_border pixel
|
default_border pixel
|
||||||
|
|
39
programs/sway/status-configuration.nix
Normal file
39
programs/sway/status-configuration.nix
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
pkgs.writeText "configuration.toml" ''
|
||||||
|
[theme]
|
||||||
|
name = "gruvbox-light"
|
||||||
|
[theme.overrides]
|
||||||
|
idle_bg="#fbffff"
|
||||||
|
idle_fg="#535c65"
|
||||||
|
info_bg="#2b7ab2"
|
||||||
|
info_fg="#fbffff"
|
||||||
|
good_bg="#2b7ab2"
|
||||||
|
good_fg="#fbffff"
|
||||||
|
warning_bg="#2b7ab2"
|
||||||
|
warning_fg="#fbffff"
|
||||||
|
critical_bg="#2b7ab2"
|
||||||
|
critical_fg="#fbffff"
|
||||||
|
separator=""
|
||||||
|
|
||||||
|
[icons]
|
||||||
|
name = "awesome"
|
||||||
|
|
||||||
|
[[block]]
|
||||||
|
block = "focused_window"
|
||||||
|
max_width = 100
|
||||||
|
|
||||||
|
[[block]]
|
||||||
|
block = "battery"
|
||||||
|
|
||||||
|
[[block]]
|
||||||
|
block = "backlight"
|
||||||
|
|
||||||
|
[[block]]
|
||||||
|
block = "sound"
|
||||||
|
|
||||||
|
[[block]]
|
||||||
|
block = "time"
|
||||||
|
interval = 1
|
||||||
|
format = "%a %d/%m %H:%M:%S"
|
||||||
|
''
|
|
@ -1,191 +0,0 @@
|
||||||
{ pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
home-manager.users.charlotte = { pkgs, ... }: {
|
|
||||||
nixpkgs.overlays = [
|
|
||||||
(self: super: { waybar = super.waybar.override { pulseSupport = true; mpdSupport = false; }; })
|
|
||||||
];
|
|
||||||
xdg.configFile = {
|
|
||||||
"waybar/config".text = ''
|
|
||||||
{
|
|
||||||
"layer": "bottom",
|
|
||||||
"position": "top",
|
|
||||||
"modules-left": ["sway/workspaces", "sway/mode"],
|
|
||||||
"modules-center": ["sway/window"],
|
|
||||||
"modules-right": ["idle_inhibitor", "pulseaudio", "network", "backlight", "battery", "tray", "clock"],
|
|
||||||
"sway/mode": {
|
|
||||||
"format": "<span style=\"italic\">{}</span>"
|
|
||||||
},
|
|
||||||
"sway/window": {
|
|
||||||
"max-length": 50
|
|
||||||
},
|
|
||||||
"idle_inhibitor": {
|
|
||||||
"format": "{icon}",
|
|
||||||
"format-icons": {
|
|
||||||
"activated": "",
|
|
||||||
"deactivated": ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"tray": {
|
|
||||||
"spacing": 10
|
|
||||||
},
|
|
||||||
"clock": {
|
|
||||||
"format": "{:%a %Y-%m-%d %H:%M}"
|
|
||||||
},
|
|
||||||
"cpu": {
|
|
||||||
"format": "{usage}% "
|
|
||||||
},
|
|
||||||
"memory": {
|
|
||||||
"format": "{}% "
|
|
||||||
},
|
|
||||||
"backlight": {
|
|
||||||
"format": "{percent}% {icon}",
|
|
||||||
"format-icons": ["", ""]
|
|
||||||
},
|
|
||||||
"battery": {
|
|
||||||
"bat": "BAT0",
|
|
||||||
"states": {
|
|
||||||
"warning": 30,
|
|
||||||
"critical": 15
|
|
||||||
},
|
|
||||||
"format": "{capacity}% {icon}",
|
|
||||||
"format-icons": ["", "", "", "", ""]
|
|
||||||
},
|
|
||||||
"network": {
|
|
||||||
"format-wifi": "{essid} ({signalStrength}%) ",
|
|
||||||
"format-ethernet": "{ipaddr} ",
|
|
||||||
"format-disconnected": "Disconnected ⚠"
|
|
||||||
},
|
|
||||||
"pulseaudio": {
|
|
||||||
"format": "{volume}% {icon}",
|
|
||||||
"format-bluetooth": "{volume}% {icon}",
|
|
||||||
"format-muted": "",
|
|
||||||
"format-icons": {
|
|
||||||
"headphones": "",
|
|
||||||
"handsfree": "",
|
|
||||||
"headset": "",
|
|
||||||
"phone": "",
|
|
||||||
"portable": "",
|
|
||||||
"car": "",
|
|
||||||
"default": ["", ""]
|
|
||||||
},
|
|
||||||
"on-click": "pavucontrol"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
"waybar/style.css".text = ''
|
|
||||||
* {
|
|
||||||
border: none;
|
|
||||||
border-radius: 0;
|
|
||||||
font-family: Noto;
|
|
||||||
font-size: 13px;
|
|
||||||
min-height: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
window#waybar {
|
|
||||||
background: rgba(43, 48, 59, 0.5);
|
|
||||||
border-bottom: 3px solid rgba(100, 114, 125, 0.5);
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
|
|
||||||
#workspaces button {
|
|
||||||
padding: 0 5px;
|
|
||||||
background: transparent;
|
|
||||||
color: white;
|
|
||||||
border-bottom: 3px solid transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
#workspaces button.focused {
|
|
||||||
background: #64727D;
|
|
||||||
border-bottom: 3px solid white;
|
|
||||||
}
|
|
||||||
|
|
||||||
#mode {
|
|
||||||
background: #64727D;
|
|
||||||
border-bottom: 3px solid white;
|
|
||||||
}
|
|
||||||
|
|
||||||
#clock, #battery, #cpu, #memory, #backlight, #network, #pulseaudio, #custom-spotify, #tray, #mode, #idle_inhibitor {
|
|
||||||
padding: 5px 10px;
|
|
||||||
margin: 0 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#clock {
|
|
||||||
background-color: #64727D;
|
|
||||||
}
|
|
||||||
|
|
||||||
#battery {
|
|
||||||
background-color: #ffffff;
|
|
||||||
color: black;
|
|
||||||
}
|
|
||||||
|
|
||||||
#battery.charging {
|
|
||||||
color: white;
|
|
||||||
background-color: #26A65B;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes blink {
|
|
||||||
to {
|
|
||||||
background-color: #ffffff;
|
|
||||||
color: black;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#battery.critical:not(.charging) {
|
|
||||||
background: #f53c3c;
|
|
||||||
color: white;
|
|
||||||
animation-name: blink;
|
|
||||||
animation-duration: 0.5s;
|
|
||||||
animation-timing-function: linear;
|
|
||||||
animation-iteration-count: infinite;
|
|
||||||
animation-direction: alternate;
|
|
||||||
}
|
|
||||||
|
|
||||||
#cpu {
|
|
||||||
background: #2ecc71;
|
|
||||||
color: #000000;
|
|
||||||
}
|
|
||||||
|
|
||||||
#memory {
|
|
||||||
background: #9b59b6;
|
|
||||||
}
|
|
||||||
|
|
||||||
#backlight {
|
|
||||||
background: #90b1b1;
|
|
||||||
}
|
|
||||||
|
|
||||||
#network {
|
|
||||||
background: #2980b9;
|
|
||||||
}
|
|
||||||
|
|
||||||
#network.disconnected {
|
|
||||||
background: #f53c3c;
|
|
||||||
}
|
|
||||||
|
|
||||||
#pulseaudio {
|
|
||||||
background: #f1c40f;
|
|
||||||
color: black;
|
|
||||||
}
|
|
||||||
|
|
||||||
#pulseaudio.muted {
|
|
||||||
background: #90b1b1;
|
|
||||||
color: #2a5c45;
|
|
||||||
}
|
|
||||||
|
|
||||||
#tray {
|
|
||||||
background-color: #2980b9;
|
|
||||||
}
|
|
||||||
|
|
||||||
#idle_inhibitor {
|
|
||||||
background-color: #2d3436;
|
|
||||||
}
|
|
||||||
|
|
||||||
#idle_inhibitor.activated {
|
|
||||||
background-color: #ecf0f1;
|
|
||||||
color: #2d3436;
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
Loading…
Add table
Add a link
Reference in a new issue