remove CoC
This commit is contained in:
parent
c205256c50
commit
4b67b2f131
@ -1,7 +0,0 @@
|
|||||||
Go Fuck Yourself
|
|
||||||
=============
|
|
||||||
|
|
||||||
Offended? Go away. We don't need people who are offended because of a stranger on the internet.
|
|
||||||
Not offended? You're welcome to contribute.
|
|
||||||
|
|
||||||
© Copyright 2015 WTFCoC Consortium Committee.
|
|
@ -160,7 +160,7 @@ See also `man journalctl`.
|
|||||||
|
|
||||||
## Contribution
|
## Contribution
|
||||||
|
|
||||||
Please create [issues](https://github.com/hakavlad/nohang/issues). Use cases, feature requests and any questions are welcome. See also [CoC](https://github.com/hakavlad/nohang/blob/master/CODE_OF_CONDUCT.md).
|
Please create [issues](https://github.com/hakavlad/nohang/issues). Use cases, feature requests and any questions are welcome.
|
||||||
|
|
||||||
## Changelog
|
## Changelog
|
||||||
|
|
||||||
|
@ -94,24 +94,17 @@ def root_notify_env():
|
|||||||
|
|
||||||
list_with_envs = root_notify_env()
|
list_with_envs = root_notify_env()
|
||||||
|
|
||||||
|
print(list_with_envs)
|
||||||
|
|
||||||
# if somebody logged in with GUI
|
# if somebody logged in with GUI
|
||||||
if len(list_with_envs) > 0:
|
if len(list_with_envs) > 0:
|
||||||
# iterating over logged-in users
|
# iterating over logged-in users
|
||||||
for i in list_with_envs:
|
for i in list_with_envs:
|
||||||
username, display_env, dbus_env = i[0], i[1], i[2]
|
username, dbus_env = i[0], i[2]
|
||||||
display_tuple = display_env.partition('=')
|
|
||||||
dbus_tuple = dbus_env.partition('=')
|
dbus_tuple = dbus_env.partition('=')
|
||||||
display_key, display_value = display_tuple[0], display_tuple[2]
|
|
||||||
dbus_key, dbus_value = dbus_tuple[0], dbus_tuple[2]
|
dbus_key, dbus_value = dbus_tuple[0], dbus_tuple[2]
|
||||||
|
|
||||||
with Popen(['sudo', '-u', username,
|
with Popen(['sudo', '-u', username, 'env', 'DBUS_SESSION_BUS_ADDRESS={}'.format(dbus_value), 'notify-send', '--icon=dialog-warning', argv[1], argv[2]]) as proc:
|
||||||
'notify-send', '--icon=dialog-warning',
|
|
||||||
argv[1], argv[2]
|
|
||||||
], env={
|
|
||||||
display_key: display_value,
|
|
||||||
dbus_key: dbus_value
|
|
||||||
}) as proc:
|
|
||||||
try:
|
try:
|
||||||
proc.wait(timeout=wait_time)
|
proc.wait(timeout=wait_time)
|
||||||
except TimeoutExpired:
|
except TimeoutExpired:
|
||||||
@ -119,3 +112,4 @@ if len(list_with_envs) > 0:
|
|||||||
print('TimeoutExpired: notify' + username)
|
print('TimeoutExpired: notify' + username)
|
||||||
else:
|
else:
|
||||||
print('Nobody logged-in with GUI. Nothing to do.')
|
print('Nobody logged-in with GUI. Nothing to do.')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user