diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..cf61111 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +lib64 +lib +pyvenv.cfg +bin \ No newline at end of file diff --git a/main.py b/main.py new file mode 100755 index 0000000..039246e --- /dev/null +++ b/main.py @@ -0,0 +1,19 @@ +#!/home/deck/.keiran-sds/bin/python3 +import sys +from PyQt5.QtCore import * +from PyQt5.QtGui import * +from PyQt5.QtWidgets import * + +def window(): + app = QApplication(sys.argv) + w = QWidget() + b = QLabel(w) + b.setText("Hello World") + w.setGeometry(100,100,200,50) + b.move(50,20) + w.setWindowTitle('PyQt5') + w.show() + sys.exit(app.exec_()) + +if __name__ == '__main__': + window() diff --git a/ncdu-install.sh b/ncdu-install.sh deleted file mode 100755 index 44f840b..0000000 --- a/ncdu-install.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash -# vim: ts=4:sw=4:et - -if which ncdu &>/dev/null; then - zenity --info --title='Result' --no-wrap --text='ncdu is already installed' - exit 0 -fi - -if ! tty -s; then - # script is running non-interactively, for ex by clicking "Execute" in dolphin - zenity --password --title="Enter password for `whoami`" --timeout=10 | sudo --stdin -- \ - konsole --hold -e "$0" "$@" - exit $? -elif [[ $UID -ne 0 ]]; then - # script run in konsole, but without sudo - echo "switching to root" - sudo /bin/bash "$0" "$@" - exit $? -fi - -# SteamOS's wrapper for: btrfs property set -ts / ro false -steamos-readonly disable - -pacman-key --init -pacman-key --populate archlinux - -pacman -S ncdu - -# SteamOS's wrapper for: btrfs property set -ts / ro true -steamos-readonly enable - -echo 'This window is now safe to close.' -# zenity --info --title='Result' --no-wrap --text='Done' diff --git a/ncdu.sh b/ncdu.sh new file mode 100755 index 0000000..47cb8ca --- /dev/null +++ b/ncdu.sh @@ -0,0 +1,39 @@ +#!/bin/bash +# vim: ts=4:sw=4:et + +if which ncdu &>/dev/null; then + zenity --info --title='Result' --no-wrap --text='ncdu is already installed' + exit 0 +fi + +if ! tty -s; then + # script is running non-interactively, for ex by clicking "Execute" in dolphin + zenity --password --title="Enter password for `whoami`" --timeout=10 | sudo --stdin -- \ + konsole -e "$0" "$@" + exit $? +elif [[ $UID -ne 0 ]]; then + # script run in konsole, but without sudo + echo "switching to root" + sudo /bin/bash "$0" "$@" + exit $? +fi + +( + echo 0 + echo '# setting / to read/write' + steamos-readonly disable + echo 15 + echo '# setting up package manager keys' + pacman-key --init + pacman-key --populate archlinux + echo 50 + echo '# installing ncdu' + pacman --quiet --noprogressbar --noconfirm --sync ncdu networkmanager-openvpn + echo 90 + echo '# setting / back to read only' + steamos-readonly enable + echo 100 +) | zenity --progress --no-cancel --width=400 2>/dev/null + +#~deck/.local/share/steam +#/run/media/mmcblk0p1 diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..37a69c4 --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +PyQt5 \ No newline at end of file diff --git a/setup.sh b/setup.sh new file mode 100644 index 0000000..f8bf37a --- /dev/null +++ b/setup.sh @@ -0,0 +1,7 @@ +#!/bin/bash +cd ~ +git clone https://git.keiran.us/keiran/steamdeck-scripts.git .keiran-sds +python3 -m venv ~/.keiran-sds +cd ~/.keiran-sds +./bin/pip3 install --upgrade pip +./bin/pip3 install -r requirements.txt \ No newline at end of file