scratchpads: add the "lazy" option (closes #5)
This commit is contained in:
parent
7bcd11b36d
commit
647e8214d9
2 changed files with 9 additions and 3 deletions
|
@ -320,12 +320,16 @@ number of pixels for the animation.
|
|||
|
||||
#### `unfocus` (optional)
|
||||
|
||||
allow to hide the window when the focus is lost when set to "hide"
|
||||
when set to `true`, allow to hide the window when the focus is lost when set to "hide"
|
||||
|
||||
#### `margin` (optional)
|
||||
|
||||
number of pixels separating the scratchpad from the screen border
|
||||
|
||||
#### `lazy` (optional)
|
||||
|
||||
when set to `true`, prevents the command from being started when pypr starts, it will be started when the scratchpad is first used instead.
|
||||
|
||||
# Changelog
|
||||
|
||||
- Add `expose` addon
|
||||
|
|
|
@ -147,6 +147,7 @@ class Extension(Plugin):
|
|||
|
||||
# not known yet
|
||||
for name in new_scratches:
|
||||
if not self.scratches[name].conf.get("lazy", False):
|
||||
self.start_scratch_command(name)
|
||||
|
||||
def start_scratch_command(self, name: str) -> None:
|
||||
|
@ -290,6 +291,7 @@ class Extension(Plugin):
|
|||
|
||||
if not item.isAlive():
|
||||
print(f"{uid} is not running, restarting...")
|
||||
if uid in self.procs:
|
||||
self.procs[uid].kill()
|
||||
if item.pid in self.scratches_by_pid:
|
||||
del self.scratches_by_pid[item.pid]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue