move sway config files to nix files
This commit is contained in:
220
utils/modules/sway/xdg-waybar-config.nix
Normal file
220
utils/modules/sway/xdg-waybar-config.nix
Normal file
@@ -0,0 +1,220 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
environment.etc = {
|
||||
"xdg/waybar/config".text = ''
|
||||
// -*- mode: json -*-
|
||||
|
||||
{
|
||||
"layer": "top",
|
||||
"position": "top",
|
||||
|
||||
"modules-left": [
|
||||
"sway/workspaces",
|
||||
"custom/right-arrow-dark"
|
||||
],
|
||||
"modules-center": [
|
||||
"custom/left-arrow-dark",
|
||||
"clock#1",
|
||||
"custom/left-arrow-light",
|
||||
"custom/left-arrow-dark",
|
||||
"clock#2",
|
||||
"custom/right-arrow-dark",
|
||||
"custom/right-arrow-light",
|
||||
"clock#3",
|
||||
"custom/right-arrow-dark"
|
||||
],
|
||||
"modules-right": [
|
||||
"custom/left-arrow-dark",
|
||||
"network",
|
||||
"custom/left-arrow-light",
|
||||
"custom/left-arrow-dark",
|
||||
"pulseaudio",
|
||||
"custom/left-arrow-light",
|
||||
"custom/left-arrow-dark",
|
||||
"memory",
|
||||
"custom/left-arrow-light",
|
||||
"custom/left-arrow-dark",
|
||||
"cpu",
|
||||
"custom/left-arrow-light",
|
||||
"custom/left-arrow-dark",
|
||||
"battery",
|
||||
"custom/left-arrow-light",
|
||||
"custom/left-arrow-dark",
|
||||
"disk",
|
||||
"custom/left-arrow-light",
|
||||
"custom/left-arrow-dark",
|
||||
"tray"
|
||||
],
|
||||
|
||||
"custom/left-arrow-dark": {
|
||||
"format": "",
|
||||
"tooltip": false
|
||||
},
|
||||
"custom/left-arrow-light": {
|
||||
"format": "",
|
||||
"tooltip": false
|
||||
},
|
||||
"custom/right-arrow-dark": {
|
||||
"format": "",
|
||||
"tooltip": false
|
||||
},
|
||||
"custom/right-arrow-light": {
|
||||
"format": "",
|
||||
"tooltip": false
|
||||
},
|
||||
|
||||
"sway/workspaces": {
|
||||
"disable-scroll": true,
|
||||
"format": "{name}"
|
||||
},
|
||||
|
||||
"clock#1": {
|
||||
"format": "{:%a}",
|
||||
"tooltip": false
|
||||
},
|
||||
"clock#2": {
|
||||
"format": "{:%H:%M}",
|
||||
"tooltip": false
|
||||
},
|
||||
"clock#3": {
|
||||
"format": "{:%d.%m}",
|
||||
"tooltip": false
|
||||
},
|
||||
|
||||
"pulseaudio": {
|
||||
"format": "{icon}{volume}%",
|
||||
"format-muted": "ﱝ",
|
||||
"format-icons": {
|
||||
"phone": ["奄", "奔", "墳"],
|
||||
"default": ["奄", "奔", "墳"]
|
||||
},
|
||||
"scroll-step": 5,
|
||||
"on-click": "pavucontrol",
|
||||
"tooltip": false
|
||||
},
|
||||
"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}"
|
||||
},
|
||||
"memory": {
|
||||
"interval": 5,
|
||||
"format": "{}%"
|
||||
},
|
||||
"cpu": {
|
||||
"interval": 5,
|
||||
"format": "{usage:2}%"
|
||||
},
|
||||
"battery": {
|
||||
"states": {
|
||||
"good": 95,
|
||||
"warning": 30,
|
||||
"critical": 15
|
||||
},
|
||||
"format": "{icon} {capacity}%",
|
||||
"format-icons": [
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
""
|
||||
]
|
||||
},
|
||||
"disk": {
|
||||
"interval": 5,
|
||||
"format": "{percentage_used:2}%",
|
||||
"path": "/home/"
|
||||
},
|
||||
"tray": {
|
||||
"icon-size": 20
|
||||
}
|
||||
}
|
||||
'';
|
||||
|
||||
"xdg/waybar/style.css".text = ''
|
||||
* {
|
||||
font-size: 20px;
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background: #282a36;
|
||||
color: #f8f8f2;
|
||||
}
|
||||
|
||||
#custom-right-arrow-dark,
|
||||
#custom-left-arrow-dark {
|
||||
color: #252525;
|
||||
}
|
||||
#custom-right-arrow-light,
|
||||
#custom-left-arrow-light {
|
||||
color: #282a36;
|
||||
background: #252525;
|
||||
}
|
||||
|
||||
#workspaces,
|
||||
#clock.1,
|
||||
#clock.2,
|
||||
#clock.3,
|
||||
#network,
|
||||
#pulseaudio,
|
||||
#memory,
|
||||
#cpu,
|
||||
#battery,
|
||||
#disk,
|
||||
#tray {
|
||||
background: #252525;
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
padding: 0 2px;
|
||||
color: #f8f8f2;
|
||||
}
|
||||
#workspaces button.focused {
|
||||
color: #50fa7b;
|
||||
}
|
||||
#workspaces button:hover {
|
||||
box-shadow: inherit;
|
||||
text-shadow: inherit;
|
||||
}
|
||||
#workspaces button:hover {
|
||||
background: #252525;
|
||||
border: #252525;
|
||||
padding: 0 3px;
|
||||
}
|
||||
|
||||
#network {
|
||||
color: #8be9fd;
|
||||
}
|
||||
#pulseaudio {
|
||||
color: #6272a4;
|
||||
}
|
||||
#memory {
|
||||
color: #f8f8f2;
|
||||
}
|
||||
#cpu {
|
||||
color: #bd93f9;
|
||||
}
|
||||
#battery {
|
||||
color: #f1fa8c;
|
||||
}
|
||||
#disk {
|
||||
color: #ffb86c;
|
||||
}
|
||||
|
||||
#clock,
|
||||
#network,
|
||||
#pulseaudio,
|
||||
#memory,
|
||||
#cpu,
|
||||
#battery,
|
||||
#disk {
|
||||
padding: 0 10px;
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user