This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
These three scripts together implement a QubesOS DVM caching mechanism, | |
allow easy screenshotting with the screenshot automatically copied to | |
the qube in focus, | |
launching a terminal or file manager in the qube in focus and | |
restarting qubes in focus, while also restarting their in-focus app and | |
moving it back to the workspace it was on! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
qvm-run sys-net -- "if nmcli radio wifi | head -c1 | grep -E 'e'; then nmcli radio wifi off; else nmcli radio wifi on; fi" | |
# If the file /var/lib/NetworkManager/NetworkManager.state with the following content is created in sys-net's template, then WiFi is off by default on boot: | |
# [main] | |
# NetworkingEnabled=true | |
# WirelessEnabled=false | |
# WWANEnabled=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# call with argument 'devices' or 'domains' | |
sleep 0.1 | |
eval $(xdotool search --onlyvisible --name "qui-$1" getwindowgeometry --shell) | |
xdotool mousemove $X $Y click 1 mousemove restore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
CUR_WIN_ID=$(xdotool getwindowfocus) | |
CUR_VM=$(xprop _QUBES_VMNAME -id $CUR_WIN_ID | cut -d \" -f 2) | |
if [[ "$CUR_VM" != *"not found"* ]];then | |
if ! qvm-prefs "$CUR_VM" netvm | head -c1 | grep -E '.';then | |
TEXT="TOR" | |
while read -r line |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# valid values: 0-255, lower means more performance-leaning | |
PERF=24 | |
BAL=128 # don't modify this value without uncommenting the xenpm command below the first if-clause | |
PS=223 | |
CUR_VAL=$(xenpm get-cpufreq-para | grep -E -m 1 -o energy_perf\ \[[0-9]+\] | tr -dc '0-9') | |
if [ "$CUR_VAL" -lt "$BAL" ]; then |