making some config changes to better setup qt environments
This commit is contained in:
parent
1e2cc2c916
commit
982b86059f
12 changed files with 278 additions and 79 deletions
2
scripts/kde-fflof
Executable file
2
scripts/kde-fflof
Executable file
|
@ -0,0 +1,2 @@
|
|||
#!/usr/bin/env bash
|
||||
ww -fa firefox -c firefox
|
4
scripts/kde-list-windows.js
Normal file
4
scripts/kde-list-windows.js
Normal file
|
@ -0,0 +1,4 @@
|
|||
const clients = workspace.clientList();
|
||||
for (var i = 0; i < clients.length; i++) {
|
||||
print(clients[i].caption);
|
||||
};
|
37
scripts/kde-list-windows.py
Executable file
37
scripts/kde-list-windows.py
Executable file
|
@ -0,0 +1,37 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
# Author: Andrew Shark
|
||||
|
||||
# This script lists windows in kwin on wayland. It is useful, because wmctrl does not work on wayland.
|
||||
# I read journalctl because printing in kwin script is currently broken. See https://bugs.kde.org/show_bug.cgi?id=445058
|
||||
# https://unix.stackexchange.com/questions/706477/is-there-a-way-to-get-list-of-windows-on-kde-wayland - described this script here.
|
||||
|
||||
import subprocess
|
||||
from datetime import datetime
|
||||
|
||||
|
||||
def get_list_of_windows():
|
||||
datetime_now = datetime.now()
|
||||
|
||||
script = "/home/chris/.dotfiles/scripts/kde-list-windows.js"
|
||||
|
||||
reg_script_number = subprocess.run("dbus-send --print-reply --dest=org.kde.KWin \
|
||||
/Scripting org.kde.kwin.Scripting.loadScript \
|
||||
string:" + script + " | awk 'END {print $2}'",
|
||||
capture_output=True, shell=True).stdout.decode().split("\n")[0]
|
||||
|
||||
subprocess.run("dbus-send --print-reply --dest=org.kde.KWin /" + reg_script_number + " org.kde.kwin.Script.run",
|
||||
shell=True, stdout=subprocess.DEVNULL)
|
||||
subprocess.run("dbus-send --print-reply --dest=org.kde.KWin /" + reg_script_number + " org.kde.kwin.Script.stop",
|
||||
shell=True, stdout=subprocess.DEVNULL) # unregister number
|
||||
|
||||
since = str(datetime_now)
|
||||
|
||||
msg = subprocess.run("journalctl _COMM=kwin_wayland -o cat --since \"" + since + "\"",
|
||||
capture_output=True, shell=True).stdout.decode().rstrip().split("\n")
|
||||
msg = [el.lstrip("js: ") for el in msg]
|
||||
|
||||
return msg
|
||||
|
||||
|
||||
print('\n'.join(get_list_of_windows()))
|
14
scripts/kdewindows
Executable file
14
scripts/kdewindows
Executable file
|
@ -0,0 +1,14 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
script="/home/chris/.dotfiles/scripts/kde-list-windows.js"
|
||||
|
||||
num=$(dbus-send --print-reply --dest=org.kde.KWin \
|
||||
/Scripting org.kde.kwin.Scripting.loadScript \
|
||||
string:"$script" | awk 'END {print $2}' )
|
||||
|
||||
dbus-send --print-reply --dest=org.kde.KWin /$num \
|
||||
org.kde.kwin.Script.run
|
||||
# I'm not sure if some delay is in order here to let your script complete?
|
||||
sleep 1
|
||||
dbus-send --print-reply --dest=org.kde.KWin /$num \
|
||||
org.kde.kwin.Script.stop
|
9
scripts/miner-unpaid.sh
Executable file
9
scripts/miner-unpaid.sh
Executable file
|
@ -0,0 +1,9 @@
|
|||
#!/usr/bin/env sh
|
||||
eth=$(curl -X GET "https://eth.2miners.com/api/accounts/bc1qarhl2mwgdnatdn3q8fjy794c7jtmhtvjvsztd4" -H "accept: application/json" | jq '.stats.balance' | sed 's/^/0\.00/')
|
||||
echo "current eth: $eth"
|
||||
|
||||
rate=$(curl rate.sx/eth | rg avg | awk '{print $2}' | sed 's/\$//')
|
||||
echo $rate
|
||||
|
||||
dollar=$(echo "$eth * $rate" | bc -l)
|
||||
echo $dollar
|
Loading…
Add table
Add a link
Reference in a new issue