Quellcode durchsuchen

Multiple updates

master
hmk vor 2 Jahren
Ursprung
Commit
6741126a20
3 geänderte Dateien mit 34 neuen und 13 gelöschten Zeilen
  1. +22
    -7
      gamewrapper.sh
  2. +10
    -6
      remoteoffice.sh
  3. +2
    -0
      unlock_adb_device.sh

+ 22
- 7
gamewrapper.sh Datei anzeigen

@@ -1,14 +1,29 @@
#!/usr/bin/env bash

init () {
kill $(pidof redshift)
fanmode.sh 1
init() {
/usr/bin/asusctl profile -p | cut -d' ' -f4 > /tmp/pre-gamerun.state
/usr/bin/asusctl profile -P Performance
#notify-send "`asusctl profile -p`"
}

deinit () {
exec redshift &
fanmode.sh 0
deinit() {
/usr/bin/asusctl profile -P `echo /tmp/pre-gamerun.state`
rm /tmp/pre-gaemrun.state
#notify-send "`asusctl profile -p`"
}

init && /usr/bin/prime-run $@ && deinit
usage() {
echo "Usage: ${0} [start|stop]"
}

case ${1} in
start)
init
;;
stop)
deinit
;;
*)
usage
;;
esac

+ 10
- 6
remoteoffice.sh Datei anzeigen

@@ -2,15 +2,19 @@

set -x

# Paths
PASS="`which pass`"
RDP="`which xfreerdp`"

# VPN
NMCONN="49088a1e-18c2-48aa-a664-f212eb83a727"
# RDP
DEF_RESOLUTION="1920x1080"
DRIVE="`xdg-user-dir DOCUMENTS`/Work"
DOMAIN="$(pass show Work/AD-LOGIN | awk '/domain:/ {print $2}')"
USER="$(pass show Work/AD-LOGIN | awk '/user:/ {print $2}')"
REMOTE="$(pass show Work/AD-LOGIN | awk '/remote:/ {print $2}')"
PASSWORD="$(pass show Work/AD-LOGIN | head -1)"
DOMAIN="`pass show Work/AD-LOGIN | awk '/domain:/ {print $2}'`"
USER="`pass show Work/AD-LOGIN | awk '/user:/ {print $2}'`"
REMOTE="`pass show Work/AD-LOGIN | awk '/remote:/ {print $2}'`"
PASSWORD="`pass show Work/AD-LOGIN | head -1`"

[[ ! -d "${DRIVE}" ]] && mkdir -p ${DRIVE}

@@ -34,11 +38,11 @@ rdp() {
}


if [ $(nmcli con show ${NMCONN} | awk '/GENERAL.STATE/ {print $2}') == "activated" ]; then
if [ `nmcli con show ${NMCONN} | awk '/GENERAL.STATE/ {print $2}'` = "activated" ]; then
rdp
else
nmcli --ask con up ${NMCONN}
while [ $(nmcli con show ${NMCONN} | awk '/GENERAL.STATE/ {print $2}') != "activated" ]; do
while [ `nmcli con show ${NMCONN} | awk '/GENERAL.STATE/ {print $2}'` != "activated" ]; do
sleep 1
done
sleep 3


+ 2
- 0
unlock_adb_device.sh Datei anzeigen

@@ -1,5 +1,7 @@
#!/bin/sh

set -x

unlock() {
### Activates the screen and unlocks the phone
# Reads the current screen state eturns any combination of ON/OFF and


Laden…
Abbrechen
Speichern