CL7RP3ZICLJT7YUI3O54IB2GZY7QMKK7ZC6GZPDXFYQKOOM64CHQC
enable = true;
systemd.enable = true;
style = builtins.readFile ./waybar_style.css;
settings = [
{
layer = "top";
position = "top";
height = 24;
modules-left = ["sway/workspaces" "sway/mode" "custom/spotify"];
modules-center = [ "clock" "sway/window" ];
modules-right = [ "pulseaudio" "network" "bluetooth" "cpu" "memory" "battery" ];
modules = {
"sway/workspaces" = {
disable-scroll = true;
all-outputs = false;
format = "{icon}";
format-icons = {
"1:web" = "1: đ„";
"2:code" = "2: ïĄ";
"3:term" = "3: ï ";
"4:work" = "4: ï„";
"5:music" = "5: ï„";
"6:docs" = "6: â";
urgent = "đ„";
focused = "ï";
default = "ï";
programs.waybar = {
enable = true;
systemd.enable = true;
style = builtins.readFile ./waybar_style.css;
settings = [
{
layer = "top";
position = "top";
height = 24;
modules-left = ["sway/workspaces" "sway/mode" "custom/spotify"];
modules-center = [ "clock" "sway/window" ];
modules-right = [ "pulseaudio" "network" "bluetooth" "cpu" "memory" "battery" ];
modules = {
"sway/workspaces" = {
disable-scroll = true;
all-outputs = false;
format = "{icon}";
format-icons = {
"1:web" = "1: đ„";
"2:code" = "2: ïĄ";
"3:term" = "3: ï ";
"4:work" = "4: ï„";
"5:music" = "5: ï„";
"6:docs" = "6: â";
urgent = "đ„";
focused = "ï";
default = "ï";
};
clock = {
format = "{:%I:%M %p}";
format-alt = "{:%Y-%m-%d}";
};
cpu.format = "ïŒŁïŒ°ïŒ”{usage}%";
memory.format = "ïŒïŒ„ïŒ{}%";
battery = {
bat = "BAT0";
states = {
good = 95;
warning = 30;
critical = 15;
clock = {
format = "{:%I:%M %p}";
format-alt = "{:%Y-%m-%d}";
format = "{capacity}% {icon}";
format-good = ""; # An empty format will hide the module
format-full = "";
format-icons = [ "ï" "ï" "ï" "ï" "ï" ];
};
network = {
# interface = "wlp2s0"; # (Optional) To force the use of this interface
format-wifi = "ï«";
format-ethernet = "ï«";
format-disconnected = "â ï«";
tooltip-format-wifi = "{essid} ({signalStrength}%) ï«";
tooltip-format-ethernet = "ethernet: {ifname}: {ipaddr}/{cidr}";
tooltip-format-disconnected = "Disconnected";
};
pulseaudio = {
# scroll-step = 1;
format = "{volume}% {icon}";
format-bluetooth = "{volume}% {icon}ï";
format-muted = "ïŠ";
format-icons = {
headphones = "ï„";
handsfree = "ï";
headset = "ï";
phone = "ï";
portable = "ï";
car = "ïč";
default = [ "ï§" "ïš" ];
cpu.format = "ïŒŁïŒ°ïŒ”{usage}%";
memory.format = "ïŒïŒ„ïŒ{}%";
battery = {
bat = "BAT0";
states = {
good = 95;
warning = 30;
critical = 15;
};
format = "{capacity}% {icon}";
format-good = ""; # An empty format will hide the module
format-full = "";
format-icons = [ "ï" "ï" "ï" "ï" "ï" ];
};
network = {
# interface = "wlp2s0"; # (Optional) To force the use of this interface
format-wifi = "ï«";
format-ethernet = "ï«";
format-disconnected = "â ï«";
tooltip-format-wifi = "{essid} ({signalStrength}%) ï«";
tooltip-format-ethernet = "ethernet: {ifname}: {ipaddr}/{cidr}";
tooltip-format-disconnected = "Disconnected";
};
pulseaudio = {
# scroll-step = 1;
format = "{volume}% {icon}";
format-bluetooth = "{volume}% {icon}ï";
format-muted = "ïŠ";
format-icons = {
headphones = "ï„";
handsfree = "ï";
headset = "ï";
phone = "ï";
portable = "ï";
car = "ïč";
default = [ "ï§" "ïš" ];
};
on-click = "pavucontrol";
};
"custom/spotify" = {
format = "ïŒ {}";
max-length = 40;
interval = 30; # Remove this if your script is endless and write in loop
exec = pkgs.writeShellScript "mediaplayer" (builtins.readFile ./playerctl.sh);
# exec-if = "pgrep spotify";
"custom/spotify" = {
format = "ïŒ {}";
max-length = 40;
interval = 30; # Remove this if your script is endless and write in loop
exec = pkgs.writeShellScript "mediaplayer" (builtins.readFile ./playerctl.sh);
# exec-if = "pgrep spotify";
};
};
}
];
}
];
};
{ config, pkgs, ... }:
{
config.xdg.configFile."swappy/config".text = ''
[Default]
save_dir=$HOME/screenshots
save_filename_format=%Y%m%d-%H%M%S-screenshot.png
show_panel=false
line_size=5
text_size=20
text_font=sans-serif
'';
config.home.packages = with pkgs; [
grim
slurp
swappy
];
}
{ config, pkgs, ... }:
{
config.xdg.configFile."nwg-launchers/nwgbar/icons".source = ./icons;
config.xdg.configFile."nwg-launchers/nwgbar/bar.json".text = ''
[
{
"name": "Lock screen",
"exec": "swaylock -f -c 000000",
"icon": "${config.xdg.configHome}/nwg-luanchers/nwgbar/icons/system-lock-screen.svg"
},
{
"name": "Logout",
"exec": "swaynag -t warning -m 'close sway and wayland?' -b 'yes' 'swaymsg exit'",
"icon": "${config.xdg.configHome}/nwg-luanchers/nwgbar/icons/system-log-out.svg"
},
{
"name": "Reboot",
"exec": "systemctl reboot",
"icon": "${config.xdg.configHome}/nwg-luanchers/nwgbar/icons/system-reboot.svg"
},
{
"name": "Shutdown",
"exec": "systemctl -i poweroff",
"icon": "${config.xdg.configHome}/nwg-luanchers/nwgbar/icons/system-shutdown.svg"
}
]
'';
config.xdg.configFile."nwg-launchers/nwgbar/style.css".text = ''
#bar {
margin: 30px /* affects top/bottom & left/right alignment */
}
button, image {
background: none;
border-style: none;
box-shadow: none;
color: #999
}
button {
padding-left: 10px;
padding-right: 10px;
margin: 5px
}
button:hover {
background-color: rgba (255, 255, 255, 0.1)
}
button:focus {
box-shadow: 0 0 2px;
}
grid {
/* e.g. for common background to all buttons */
}
'';
config.home.packages = with pkgs; [ nwg-launchers ];
}
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="16"
height="16"
version="1"
id="svg8"
sodipodi:docname="system-shutdown.svg"
inkscape:version="0.92.4 5da689c313, 2019-01-14">
<metadata
id="metadata14">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs12" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1910"
inkscape:window-height="1045"
id="namedview10"
showgrid="false"
inkscape:zoom="14.75"
inkscape:cx="-31.016949"
inkscape:cy="8"
inkscape:window-x="1925"
inkscape:window-y="30"
inkscape:window-maximized="1"
inkscape:current-layer="svg8" />
<circle
fill="#c2352a"
cx="8"
cy="8"
r="8"
id="circle2"
style="fill:none;fill-opacity:1" />
<path
fill="#fff"
d="m8 3a5 5 0 0 0 -5 5 5 5 0 0 0 5 5 5 5 0 0 0 5 -5 5 5 0 0 0 -5 -5zm0 1a4 4 0 0 1 4 4 4 4 0 0 1 -4 4 4 4 0 0 1 -4 -4 4 4 0 0 1 4 -4z"
id="path4" />
<path
fill="#fff"
d="m8 6c-0.554 0-1 0.223-1 0.5v3c0 0.277 0.446 0.5 1 0.5s1-0.223 1-0.5v-3c0-0.277-0.446-0.5-1-0.5z"
id="path6" />
</svg>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="16"
height="16"
version="1"
id="svg6"
sodipodi:docname="system-reboot.svg"
inkscape:version="1.1 (c4e8f9ed74, 2021-05-24)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<metadata
id="metadata12">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs10" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1559"
inkscape:window-height="913"
id="namedview8"
showgrid="false"
inkscape:zoom="14.75"
inkscape:cx="-0.033898305"
inkscape:cy="17.288136"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="0"
inkscape:current-layer="svg6"
inkscape:pagecheckerboard="0" />
<circle
fill="#eac046"
cx="8"
cy="8"
r="8"
id="circle2"
style="fill:none;fill-opacity:1" />
<g
aria-label=""
id="text830"
style="font-size:13.7728px;line-height:1.25;letter-spacing:0px;word-spacing:0px;fill:#ffffff;stroke-width:0.344321">
<path
d="m 11.873587,5.5521109 q 0.33625,0.5245501 0.52455,1.1567001 0.20175,0.63215 0.20175,1.2912 0,0.95495 -0.36315,1.7888501 -0.36315,0.8338999 -0.9953,1.4660499 -0.6187,0.6187 -1.4525998,0.98185 -0.8339,0.36315 -1.7888501,0.36315 v 1.7216 l -2.2865,-2.3134 2.2865,-2.2864999 v 1.7215999 q 0.71285,0 1.3450001,-0.269 0.63215,-0.269 1.0894498,-0.7263 0.47075,-0.4707499 0.73975,-1.1028999 0.269,-0.6187001 0.269,-1.3450001 0,-0.44385 -0.1076,-0.84735 -0.1076,-0.4035 -0.2959,-0.76665 z m -3.8735999,-0.9953 q -0.71285,0 -1.345,0.269 -0.63215,0.269 -1.1029001,0.73975 -0.4573,0.4707501 -0.7263,1.0894501 -0.269,0.63215 -0.269,1.345 0,0.44385 0.09415,0.84735 0.1076,0.4035001 0.30935,0.7666501 l -0.8339,0.8338999 q -0.33625,-0.5245499 -0.538,-1.1432499 -0.1883,-0.6321501 -0.1883,-1.3046501 0,-0.9415 0.36315,-1.7754 0.36315,-0.8473501 0.98185,-1.4660501 0.63215,-0.63215 1.4660501,-0.9953 0.8339,-0.36315 1.78885,-0.36315 V 1.6785108 L 10.286487,3.9919109 7.9999871,6.278411 Z"
id="path824" />
</g>
</svg>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="16"
height="16"
version="1"
id="svg6"
sodipodi:docname="system-log-out.svg"
inkscape:version="0.92.4 5da689c313, 2019-01-14">
<metadata
id="metadata12">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs10" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1910"
inkscape:window-height="1045"
id="namedview8"
showgrid="false"
inkscape:zoom="14.75"
inkscape:cx="-31.016949"
inkscape:cy="8"
inkscape:window-x="1925"
inkscape:window-y="30"
inkscape:window-maximized="1"
inkscape:current-layer="svg6" />
<circle
fill="#7bbb36"
cx="8"
cy="8"
r="8"
id="circle2"
style="fill:none;fill-opacity:1" />
<path
d="M 8,3 A 5,5 0 0 1 13,8 5,5 0 0 1 8,13 5,5 0 0 1 3,8 5,5 0 0 1 8,3 Z M 8,4 A 4,4 0 0 0 4,8 4,4 0 0 0 8,12 4,4 0 0 0 12,8 4,4 0 0 0 8,4 Z M 8,6 9.4863,7.0254 11,8 9.4863,8.9746 8,10 8.0117,9 H 6.5 C 6.223,9 6,8.554 6,8 6,7.446 6.223,7 6.5,7 h 1.5117 z"
id="path4"
inkscape:connector-curvature="0"
style="fill:#ffffff" />
</svg>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="16"
height="16"
version="1"
id="svg6"
sodipodi:docname="system-lock-screen.svg"
inkscape:version="0.92.4 5da689c313, 2019-01-14">
<metadata
id="metadata12">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs10" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1910"
inkscape:window-height="1045"
id="namedview8"
showgrid="false"
inkscape:zoom="38.074548"
inkscape:cx="0.24958953"
inkscape:cy="6.9152542"
inkscape:window-x="1925"
inkscape:window-y="30"
inkscape:window-maximized="1"
inkscape:current-layer="svg6" />
<circle
fill="#ea882b"
cx="8"
cy="8"
r="8"
id="circle2"
style="fill:none;fill-opacity:1" />
<path
style="fill:#ffffff"
d="M 8 2.9746094 C 6.3883 2.9746094 5 4.2491312 5 5.8320312 L 5 6.9746094 L 4.5097656 6.9746094 C 4.2278656 6.9746094 4 7.2253531 4 7.5019531 L 4 11.474609 C 4 11.751609 4.2278656 11.974609 4.5097656 11.974609 L 11.490234 11.974609 C 11.772234 11.974609 12 11.751609 12 11.474609 L 12 7.5019531 C 12 7.2253531 11.771234 6.9568094 11.490234 6.9746094 L 11 6.9746094 L 11 5.8320312 C 11 4.2491313 9.6114 2.9746094 8 2.9746094 z M 8 3.8632812 C 9.1751 3.8632812 10 4.68154 10 5.75 L 10 6.8632812 L 6 6.8632812 L 6 5.75 C 6 4.6814 6.8247 3.8632812 8 3.8632812 z M 7.9980469 8.4628906 A 1.0374384 1.0374384 0 0 1 9.0351562 9.5 A 1.0374384 1.0374384 0 0 1 7.9980469 10.537109 A 1.0374384 1.0374384 0 0 1 6.9609375 9.5 A 1.0374384 1.0374384 0 0 1 7.9980469 8.4628906 z "
id="path4" />
</svg>