Comments (4)
Sorry I just switched to sway recently. Would this script look like this:
# put task in background
swayidle \
timeout 5 'swaymsg "output * dpms off"' \
resume 'swaymsg "output * dpms on"' &
# lcok screen
swaylock -c000000
# kill last background task
kill %%
Or is there a better way to do this?
from swaylock.
Here is another solution to this problem.
from swaylock.
trap
is a shell builtin, it doesn't matter whether it's X11 or Wayland.
Though, xset dpms
manages the timeout to enable DPMS. The Wayland equivalent would be swayidle
.
We should document this in the README or elsewhere too
Not in the README, no. You can add this to the wiki though.
from swaylock.
A year later this is not in readme, and there is no wiki at all. Been trying for hours to get this to work, only now found this issue. Mind you Google also doesn't know any solutions. I say it's a good fit for readme as is a typical usecase. Or at least open the wiki.
@piu130's approach seems to be working, although also gives an error: Failed to find session name: PID 2957 does not belong to any known session
.
Yet the trap command version doesn't integrate with swayidle. My purpose is to blank the screen immediately and then engage lock in 5 sec. So moving mouse too soon will cancel the locking also.
from swaylock.
Related Issues (20)
- Garbage characters already present in place of password after waking up from sleep mode
- Feature to allow unlocking via command HOT 2
- no password pass HOT 5
- swaylock work not well on 10 bit display HOT 1
- Fails to build with Clang due to -Werror=sign-compare HOT 1
- swaylock either migrated to another output or failed to catch hotplug on labwc HOT 2
- Multiple instances of swaylock HOT 3
- Immediate relaunch HOT 4
- Output on/off HOT 3
- 2 waybars on screen after unlocking
- swaylock doesn't allow typing on keyboard if it's not connected on activation HOT 1
- CRITICAL SECURITY ISSUE: Unlock when connecting external monitor HOT 1
- Swaylock red screens or doesn't work with udev rules HOT 2
- Swaylock using 940% of CPU HOT 2
- [bug] hyprland swaylock HOT 3
- view lockpad on wakeup ? HOT 4
- Mouse cursor visible in swaylock HOT 7
- [feature-request] Would it be possible to add the current time in the middle of circle or the current username HOT 4
- Swaylock prevents gnome calls from playing ringtone HOT 4
- Screencopy failed on hyprland dpms on HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swaylock.