Comments (6)
I uses non-forking with a trap:
trap "…" EXIT
Seems to work fine for me. Why do you fork if you want to wait anyway?
from i3lock.
Hey Airblader,
thank's for your quick reply.
I know I can watch the PID and launch my command after, it works I did it in my wrapper script,
but it break the suspend.
So maybe I miss something, but I think forking is needed to let the suspend work.
from i3lock.
I think you should explain how you are running that script so that we get a bit more context.
from i3lock.
Hello @stapelberg , yes this is how I do
I created a systemd service, like explained in the debian / arch wiki here: https://wiki.debian.org/ScreenLockingOnSleep and here: https://bbs.archlinux.org/viewtopic.php?pid=1170536#p1170536
[Unit]
Description=i3lock
Before=sleep.target
[Service]
User=username
Type=forking
Environment=DISPLAY=:0
ExecStart=/usr/bin/i3lock -d -e -f -c 000000
[Install]
WantedBy=sleep.target
Then enable it, in systemd and you go, you have to unlock after come back from suspend, witch is want we want.
But I am searching a way to trigger on the 'unlock event' witch basically is end of the pid of i3lock to launch some command on unlock, here deactivate DPMS of my screen, but could be useful for many things.
So if I have done a script witch poll the pid of a running i3lock to check it, it work for locking only but it didn't work for locking + suspending (in my test at least), so I would like to embed the call to a script in i3lock.
Guillaume
from i3lock.
@GuillaumeSeren I think what you should do (based on what you describe you want) is create a service file with After=sleep.target
, see also https://bbs.archlinux.org/viewtopic.php?id=151640
There’s nothing we need to change in i3lock for your use case.
from i3lock.
@stapelberg Yes I think too but I was just asking to know if you get a better solution.
Guillaume
from i3lock.
Related Issues (20)
- Please provide an option to lock the screen only a while after blanking HOT 4
- i3lock doesn't accept correct password after entering incorrect ones. HOT 4
- Mod-key reset after screen lock. HOT 4
- Non-standard License (not sure which SPDX identifier to use) HOT 3
- Please add functional for show layers (en,ru and etc) HOT 2
- Option to compile i3lock without PAM on Linux HOT 1
- Pam interaction when time-limit on logins is configured HOT 2
- Add Space Mode HOT 2
- Better Computer Wake Handling. HOT 1
- Allow configuring of invalid password cooldown? HOT 5
- Feature Request: Keyboard Language In Password/Lock Screen HOT 2
- i3bar is shown in i3lock lock screen when it is positioned at the bottom with picom running HOT 3
- password unrecognized HOT 3
- [bug] background image rendering not taking screen rotation into account
- Custom password HOT 1
- lock circumvented (broken) when issuing setxkbmp and xkbcomp and fast typing HOT 8
- numlock indicator is unaesthetic and not useful - can't disable? HOT 2
- [bug] i3lock doesn't seem to register the first couple of keypresses of password HOT 6
- `i3lock` package from i3's official repos outdated (2.14) HOT 5
- i3lock is pausing for 30 seconds after verifying my password HOT 2
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 i3lock.