nwg-panel: implement, but dont ship by default

This commit is contained in:
Colin 2024-06-14 03:41:59 +00:00
parent dc2c31f220
commit d52db06ffe
4 changed files with 313 additions and 0 deletions

View File

@ -94,6 +94,7 @@
./nmcli.nix
./notejot.nix
./ntfy-sh.nix
./nwg-panel
./objdump.nix
./obsidian.nix
./offlineimap.nix

View File

@ -0,0 +1,181 @@
[
{
"name": "panel-top",
"output": "",
"layer": "bottom",
"position": "top",
"controls": "right",
"width": "auto",
"height": 30,
"homogeneous": true,
"margin-top": 0,
"margin-bottom": 0,
"padding-horizontal": 0,
"padding-vertical": 0,
"spacing": 0,
"items-padding": 0,
"icons": "light",
"css-name": "panel-top",
"modules-left": [
"sway-workspaces"
],
"modules-center": [
"clock"
],
"modules-right": [
"playerctl"
],
"controls-settings": {
"components": [
"brightness",
"volume",
"battery"
],
"commands": {
"battery": ""
},
"show-values": false,
"interval": 1,
"icon-size": 16,
"hover-opens": false,
"leave-closes": true,
"click-closes": false,
"css-name": "controls-window",
"custom-items": [
{
"name": "Panel settings",
"icon": "nwg-panel",
"cmd": "nwg-panel-config"
}
],
"menu": {
"name": "Exit",
"icon": "system-shutdown-symbolic",
"items": [
{
"name": "Lock",
"cmd": "swaylock -f -c 000000"
},
{
"name": "Logout",
"cmd": "swaymsg exit"
},
{
"name": "Reboot",
"cmd": "systemctl reboot"
},
{
"name": "Shutdown",
"cmd": "systemctl -i poweroff"
}
]
}
},
"tray": {
"root-css-name": "tray",
"inner-css-name": "inner-tray"
},
"sway-taskbar": {
"workspace-menu": [
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8"
],
"name-max-len": 20,
"image-size": 16,
"workspaces-spacing": 0,
"task-padding": 0,
"show-app-icon": true,
"show-app-name": true,
"show-layout": false,
"workspace-buttons": false,
"all-workspaces": true,
"mark-autotiling": true,
"mark-xwayland": false,
"all-outputs": true,
"angle": 0.0
},
"sway-workspaces": {
"numbers": [
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"10"
],
"custom-labels": [],
"focused-labels": [],
"show-icon": true,
"image-size": 16,
"show-name": true,
"name-length": 40,
"mark-autotiling": true,
"mark-content": false,
"hide-empty": true,
"show-layout": false,
"angle": 0.0
},
"clock": {
"format": "%H:%M",
"tooltip-text": "%a, %d %b %H:%M:%S",
"on-left-click": "",
"on-middle-click": "",
"on-right-click": "",
"on-scroll-up": "",
"on-scroll-down": "",
"css-name": "clock",
"interval": 1,
"tooltip-date-format": true,
"root-css-name": "root-clock",
"angle": 0.0,
"calendar-path": "",
"calendar-css-name": "calendar-window",
"calendar-placement": "top",
"calendar-margin-horizontal": 0,
"calendar-margin-vertical": 0,
"calendar-icon-size": 24,
"calendar-interval": 60,
"calendar-on": true
},
"playerctl": {
"buttons-position": "left",
"icon-size": 16,
"chars": 30,
"scroll": false,
"button-css-name": "",
"label-css-name": "",
"interval": 1
},
"button-sample": {
"command": "notify-send 'sample button'",
"icon": "view-grid",
"label": "",
"label-position": "right",
"css-name": "button-custom",
"icon-size": 16
},
"menu-start": "off",
"exclusive-zone": true,
"sigrt": 64,
"use-sigrt": false,
"scratchpad": {},
"sway-mode": {},
"openweather": {},
"brightness-slider": {},
"dwl-tags": {},
"hyprland-taskbar": {},
"hyprland-workspaces": {},
"start-hidden": false,
"keyboard-layout": {}
}
]

View File

@ -0,0 +1,20 @@
# nwg-panel: a wayland status bar (like waybar, etc)
# documentation is in the GitHub Wiki:
# - <https://github.com/nwg-piotr/nwg-panel/wiki/Configuration>
#
# interactively configure with: `nwg-panel-config`
# ^ note that this may interfere with the `nwg-panel` service
{ ... }:
{
sane.programs.nwg-panel = {
fs.".config/nwg-panel/config".symlink.target = ./config;
fs.".config/nwg-panel/style.css".symlink.target = ./style.css;
services.nwg-panel = {
description = "nwg-panel status/topbar for wayland";
partOf = [ "graphical-session" ];
command = "nwg-panel";
};
};
}

View File

@ -0,0 +1,111 @@
/***** SUGGESTED TO CHANGE CAREFULLY *****/
/* Recommended if panel "height" unset or smaller then your theme default button height */
button {
margin: 2px
}
/* SwayTaskBar and SwayWorkspaces use custom widgets, that need this and the next name
to highlight currently focused task / workspace. */
#task-box {
padding-left: 4px;
padding-right: 4px
}
#task-box-focused {
background-color: rgba (255, 255, 255, 0.12);
padding-left: 4px;
padding-right: 4px
}
/***** MODIFY TO YOUR TASTE *****/
/* Sample button in sample config w/ no background nor border */
#button-custom {
background: rgba (0, 0, 0, 0.0);
border: 0
}
/* Top panel in sample config uses this name */
#panel-top {
background: #101010;
color: #eeeeee
}
/* Bottom panel in sample config uses this name */
#panel-bottom {
background: #101010;
color: #eeeeee
}
/* Controls window in sample config uses this name */
#controls-window {
border-radius: 15px;
background: #36364f;
color: #eeeeee
}
#controls-window scale value {
color: #eeeeee
}
/* Brightness slider popup window in sample config uses this name */
#brightness-popup {
border-radius: 15px;
background: #36364f;
color: #eeeeee
}
#brightness-popup box {
padding: 15px;
}
/* Executors usually behave better in monospace fonts */
#executor-label {
font-family: monospace
}
/* and so does the Clock */
#clock {
font-family: monospace;
font-size: 16px
}
/* Sample executor-weather uses "css-name": "weather" */
#weather {
font-size: 16px
}
/* dwl-tags module */
#dwl-tag-box {
padding-top: 4px;
padding-bottom: 4px
}
#dwl-tag-occupied {
font-family: monospace;
color: #eee;
background-color: #006699;
padding-left: 3px;
padding-right: 3px;
}
#dwl-tag-free {
font-family: monospace;
color: #eee;
background-color: rgba (32, 50, 90, 1.0);
padding-left: 3px;
padding-right: 3px;
}
#dwl-tag-urgent {
font-family: monospace;
color: #eee;
background-color: #ee6600;
padding-left: 3px;
padding-right: 3px;
}
#dwl-tag-selected {
border: solid 2px;
border-color: #81a1c1
}