mirror of
https://github.com/FAUSheppy/config
synced 2026-01-21 23:57:37 +01:00
various fixes and migration to python
This commit is contained in:
@@ -5,6 +5,9 @@ import subprocess
|
||||
import shlex
|
||||
import re
|
||||
|
||||
def hlpath(addition=""):
|
||||
return os.path.join(os.path.expanduser("~"),".config/herbstluftwm/"+addition)
|
||||
|
||||
def color_remove(s):
|
||||
'''removes colorcodes from inputstring'''
|
||||
return re.compile(r'(\x9B|\x1B\[)[0-?]*[ -\/]*[@-~]').sub('',s)
|
||||
@@ -14,7 +17,11 @@ def shexec(s):
|
||||
|
||||
def is_cip():
|
||||
u = os.uname()
|
||||
return "cip" in u.release or "faui" in u.name or "ircbox" in u.name
|
||||
return "cip" in u.release or "faui" in u.nodename or "ircbox" in u.nodename
|
||||
|
||||
def is_laptop():
|
||||
u = os.uname()
|
||||
return "laptop" in u.nodename or "atlantismedion" in u.nodename
|
||||
|
||||
def error(s):
|
||||
with open("herbstlog",'a') as f:
|
||||
|
||||
Reference in New Issue
Block a user