Added scripts from T400

This commit is contained in:
lanxu 2017-02-18 09:39:31 +02:00
parent dc24730329
commit 18d6881d75
4 changed files with 22 additions and 2 deletions

View File

@ -858,7 +858,7 @@ options:
if len(dirs) == 0 and len(nondirs) == 0:
#TODO: why?
exit(1)
sys.exit(1)
dirs.sort(key=methodcaller('lower'))
nondirs.sort(key=methodcaller('lower'))

16
extract Executable file
View File

@ -0,0 +1,16 @@
#!/bin/sh
for archive in "$@"; do
# count files in root dir
rootfiles=$(7z l -slt "${archive}" | grep -c 'Path = [^/]*$')
# add -o switch, if more than one file in root
# checks for >2, because path of the zip file itself is listed too
if [ $rootfiles -gt 2 ]; then
filename=${archive##*/}
rootname=${filename%.*}
opt="-o${rootname}"
fi
#unpack
7z x "${opt}" "${archive}"
done

View File

@ -14,11 +14,13 @@ aticonfig_available = is_exe("/usr/bin/aticonfig")
sensors_available = is_exe("/usr/bin/sensors")
if sensors_available:
command = "sensors radeon-pci-* | grep temp1"
#command = "sensors radeon-pci-* | grep temp1"
command = "sensors thinkpad-isa-* | grep ATI"
if aticonfig_available:
command = "aticonfig --odgt"
# Run command
return_value = check_output(command, shell=True)
# Default return value

2
runDesktop.sh Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
`grep '^Exec' $1 | tail -1 | sed 's/^Exec=//' | sed 's/%.//'` &