Add Idle Inhibitor
This commit is contained in:
parent
68b7e7e623
commit
201bedcc26
|
@ -1 +1 @@
|
|||
version="2.6.1"
|
||||
version="2.6.2"
|
||||
|
|
2
.settings/swayidle.sh
Normal file
2
.settings/swayidle.sh
Normal file
|
@ -0,0 +1,2 @@
|
|||
timeswaylock=60
|
||||
timeoff=70
|
|
@ -1,3 +1,10 @@
|
|||
Version 2.6.2
|
||||
https://gitlab.com/stephan-raabe/dotfiles/-/releases/2.6.1
|
||||
--------------------------------------------------------
|
||||
Hyprland:
|
||||
- New Waybar Module Idle Inhibitor to deactivate the automatic start of swaylock e.g. to watch videos or for online meetings
|
||||
- Create own customization of ML4W waybar themes: <a href="https://gitlab.com/stephan-raabe/dotfiles/-/tree/main/waybar?ref_type=heads#define-your-own-config-and-stylecss-for-a-ml4w-theme">README.md</a>
|
||||
|
||||
Version 2.6.1
|
||||
https://gitlab.com/stephan-raabe/dotfiles/-/releases/2.6.1
|
||||
--------------------------------------------------------
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# ML4W dotfiles 2.6.1
|
||||
# ML4W dotfiles 2.6.2 DEV
|
||||
|
||||
This is my configuration of Hyprland (Wayland) and Qtile (Xorg & Wayland) for Arch. This package includes an installation script to install and setup the required components.
|
||||
|
||||
|
|
|
@ -9,9 +9,7 @@
|
|||
# by Stephan Raabe (2023)
|
||||
# -----------------------------------------------------
|
||||
|
||||
timeswaylock=600
|
||||
timeoff=660
|
||||
|
||||
source ~/dotfiles/.settings/swayidle.sh
|
||||
if [ -f "/usr/bin/swayidle" ]; then
|
||||
echo "swayidle is installed."
|
||||
swayidle -w timeout $timeswaylock 'swaylock -f' timeout $timeoff 'hyprctl dispatch dpms off' resume 'hyprctl dispatch dpms on'
|
||||
|
|
11
hypr/scripts/swayidle.sh
Executable file
11
hypr/scripts/swayidle.sh
Executable file
|
@ -0,0 +1,11 @@
|
|||
#!/bin/bash
|
||||
|
||||
pgrep_output=$(pgrep swayidle)
|
||||
pgrep_arr=($pgrep_output)
|
||||
if [[ "${#pgrep_arr[@]}" == "1" ]] || [[ "${#pgrep_arr[@]}" == "0" ]]; then
|
||||
echo "Swayidle is not running. Starting Swayidle."
|
||||
./lockscreentime.sh
|
||||
else
|
||||
echo "Swayidle is running. Killing swayidle."
|
||||
killall swayidle
|
||||
fi
|
|
@ -339,5 +339,14 @@
|
|||
"format": "{user}",
|
||||
"interval": 60,
|
||||
"icon": false,
|
||||
},
|
||||
|
||||
"idle_inhibitor": {
|
||||
"format": "{icon}",
|
||||
"tooltip": false,
|
||||
"format-icons":{
|
||||
"activated": "Auto lock OFF",
|
||||
"deactivated": "ON"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -52,6 +52,7 @@
|
|||
"group/hardware",
|
||||
"group/settings",
|
||||
"custom/cliphist",
|
||||
"idle_inhibitor",
|
||||
"custom/exit",
|
||||
"clock"
|
||||
]
|
||||
|
|
|
@ -54,6 +54,7 @@
|
|||
"network",
|
||||
"group/hardware",
|
||||
"custom/cliphist",
|
||||
"idle_inhibitor",
|
||||
"custom/exit",
|
||||
"clock"
|
||||
]
|
||||
|
|
|
@ -175,6 +175,28 @@ window#waybar.empty #window {
|
|||
margin-right:15px;
|
||||
}
|
||||
|
||||
/* -----------------------------------------------------
|
||||
* Idle Inhibator
|
||||
* ----------------------------------------------------- */
|
||||
|
||||
#idle_inhibitor {
|
||||
margin-right: 15px;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
opacity: 0.8;
|
||||
color: @iconcolor;
|
||||
}
|
||||
|
||||
#idle_inhibitor.activated {
|
||||
background-color: #dc2f2f;
|
||||
font-size: 16px;
|
||||
color: #FFFFFF;
|
||||
border-radius: 15px;
|
||||
padding: 2px 10px 0px 10px;
|
||||
margin: 8px 15px 8px 0px;
|
||||
opacity:0.8;
|
||||
}
|
||||
|
||||
/* -----------------------------------------------------
|
||||
* Custom Modules
|
||||
* ----------------------------------------------------- */
|
||||
|
|
|
@ -54,6 +54,7 @@
|
|||
"network",
|
||||
"group/hardware",
|
||||
"custom/cliphist",
|
||||
"idle_inhibitor",
|
||||
"custom/exit",
|
||||
"clock"
|
||||
]
|
||||
|
|
|
@ -54,6 +54,7 @@
|
|||
"network",
|
||||
"group/hardware",
|
||||
"custom/cliphist",
|
||||
"idle_inhibitor",
|
||||
"custom/exit",
|
||||
"clock"
|
||||
]
|
||||
|
|
|
@ -176,6 +176,27 @@ window#waybar.empty #window {
|
|||
margin-right:15px;
|
||||
}
|
||||
|
||||
/* -----------------------------------------------------
|
||||
* Idle Inhibator
|
||||
* ----------------------------------------------------- */
|
||||
|
||||
#idle_inhibitor {
|
||||
margin-right: 15px;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
opacity: 0.8;
|
||||
color: @iconcolor;
|
||||
}
|
||||
|
||||
#idle_inhibitor.activated {
|
||||
background-color: #dc2f2f;
|
||||
font-size: 16px;
|
||||
color:#ffffff;
|
||||
border-radius: 15px;
|
||||
padding: 2px 10px 0px 10px;
|
||||
margin: 5px 15px 5px 0px;
|
||||
opacity:0.8;
|
||||
}
|
||||
|
||||
/* -----------------------------------------------------
|
||||
* Custom Modules
|
||||
|
@ -196,7 +217,7 @@ window#waybar.empty #window {
|
|||
* Custom Exit
|
||||
* ----------------------------------------------------- */
|
||||
|
||||
#custom-exit, #custom-exitwlr {
|
||||
#custom-exit {
|
||||
margin: 0px 20px 0px 0px;
|
||||
padding:0px;
|
||||
font-size:20px;
|
||||
|
|
Loading…
Reference in New Issue
Block a user