mirror of
https://gitlab.com/Zaney/zaneyos.git
synced 2025-01-23 12:48:35 +01:00
Adding Idle Inhibitor script and button for waybar
This commit is contained in:
parent
ff5eefa7d1
commit
53a1a87948
@ -11,7 +11,7 @@
|
||||
|
||||
modules-left = [ "hyprland/window" ];
|
||||
modules-center = [ "network" "pulseaudio" "cpu" "hyprland/workspaces" "memory" "disk" "clock" ];
|
||||
modules-right = [ "custom/themeselector" "custom/notification" "tray" ];
|
||||
modules-right = [ "idle_inhibitor" "custom/themeselector" "custom/notification" "tray" ];
|
||||
"hyprland/workspaces" = {
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
@ -44,6 +44,15 @@
|
||||
format = " {free}";
|
||||
tooltip = true;
|
||||
};
|
||||
"idle_inhibitor" = {
|
||||
format = "{icon}";
|
||||
tooltip = true;
|
||||
format-icons = {
|
||||
activated = "";
|
||||
deactivated = "";
|
||||
};
|
||||
on-click-right = "swaylock";
|
||||
};
|
||||
"network" = {
|
||||
format-icons = ["" "" "" "" ""];
|
||||
format-ethernet = ": {bandwidthDownOctets} : {bandwidthUpOctets}";
|
||||
@ -183,6 +192,13 @@
|
||||
margin: 5px;
|
||||
padding: 2px 20px;
|
||||
}
|
||||
#idle_inhibitor {
|
||||
color: #${config.colorScheme.colors.base0A};
|
||||
background: #${config.colorScheme.colors.base00};
|
||||
border-radius: 50px 15px 50px 15px;
|
||||
margin: 5px;
|
||||
padding: 2px 20px;
|
||||
}
|
||||
#cpu {
|
||||
color: #${config.colorScheme.colors.base07};
|
||||
background: #${config.colorScheme.colors.base00};
|
||||
|
9
config/scripts/trnoffmon.nix
Normal file
9
config/scripts/trnoffmon.nix
Normal file
@ -0,0 +1,9 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
pkgs.writeShellScriptBin "trnoffmon" ''
|
||||
if [[ ! $@ ]]; then
|
||||
pkill swayidle
|
||||
else
|
||||
swayidle -w timeout 5 'hyprctl dispatch dpms off' resume 'hyprctl dispatch dpms on'
|
||||
fi
|
||||
''
|
Loading…
Reference in New Issue
Block a user