1
0
Fork 0
mirror of https://github.com/Phantop/dotfiles synced 2024-11-17 04:12:44 +00:00

aliases: soft-reboot, fix curlflux; bin: webpage to pdf

This commit is contained in:
Phantop 2024-05-04 19:29:48 -04:00
parent c1fe7828fd
commit f2279aa0ea
2 changed files with 27 additions and 1 deletions

View file

@ -17,7 +17,7 @@ a awall 'xwinwrap -fdt -fs -- mpv -wid WID ~/Pictures/Wall/Anim/$argv* --loop --
a base64d 'echo (echo $argv | base64 -d 2>/dev/null) | tee /dev/stderr 2>| clip;:'
a clip 'xsel -ib'
a cpugov 's cpupower frequency-set -g performance'
a curlflux 'eval curl (cat ~/.config/miniflux)/$argv;:'
a curlflux 'eval curl (cat ~/.config/miniflux)/$argv[1] $argv[2..-1];:'
a dirdl 'wget -r -k -p -np -e robots=off'
a dl 'not test "$argv" && cd ~/Downloads || aria2c -c -{j,s,x}16 --http-accept-gzip'
a dot 'cd ~/.dotfiles'
@ -51,6 +51,7 @@ a re 'systemctl reboot -i'
a rmdirs 'ff -t d -x rmdir -p'
a rmlinks 'ff -t l -x rm'
a s 'doas env "PATH=$PATH"'
a sre 'systemctl soft-reboot'
a ssh 'kitty +kitten ssh'
a sus 'systemctl suspend'
a tar bsdtar

25
bin/pagepdf Executable file
View file

@ -0,0 +1,25 @@
#!/usr/bin/env python3
import sys
from PyQt6.QtCore import QUrl
from PyQt6.QtWidgets import QApplication
from PyQt6.QtWebEngineWidgets import QWebEngineView
from PyQt6.QtGui import QPageLayout
from PyQt6.QtGui import QPageSize
from PyQt6.QtCore import QMarginsF
def save_img():
#size = wv.page().contentsSize().toSize()
#wv.resize(size)
#wv.grab().save('dump.png', b'PNG')
#page_layout = QPageLayout(QPageSize(QPageSize.PageSizeId.A2), QPageLayout.Orientation.Portrait, QMarginsF())
wv.printToPdf("dump.pdf")
if __name__ == '__main__':
app = QApplication(sys.argv)
wv = QWebEngineView()
wv.loadFinished.connect(save_img)
wv.pdfPrintingFinished.connect(sys.exit)
wv.load(QUrl.fromUserInput(sys.argv[1]))
app.exec()