β A minimalistic frameless text-driven window to the world π wide web!
The repository contains a PKGBUILD
(which is currently not published in the aur)
mkdir /tmp/porthole
cd /tmp/porthole
wget https://raw.githubusercontent.com/aichingm/porthole/master/PKGBUILD
makepkg
pacman -U porthole-git-*
Other Linux π§ distributions should use the command below:
git clone https://github.com/aichingm/porthole
cd porthole
sudo python3 setup.py install
Running porthole from the shell:
porthole
To interact with porthole hit ctrl
+ shift
+ enter
which opens a menu in form of a python shell. The text entered has to be valid python which will be executed.
-
go loads a web site, if no schema is specified the url will be perpended with
https://
go("netflix.com")
-
back moves back in time
back()
-
forward move forward in history β©
forward()
-
reload reloads the current page π
reload()
-
dim sets the dimensions of the window
dim(800, 400) dim(width, height)
-
pos sets the position of the window
pos(0, 0) pos(left, top)
-
border() toggles the window border
border()
-
border(True) adds the window border
border(True)
-
border(False) removes the window border
border(False)
-
-
onbottom() toggles the onbottomness of the window
onbottom()
-
onbottom(True) puts the window below all other windows
onbottom(True)
-
onbottom(False) sets the onbottomness of the window back to normal
onbottom(False)
-
-
ontop() toggles the ontopness of the window
ontop()
-
ontop(True) puts the window on top of all other windows
ontop(True)
-
ontop(False) sets the ontopness of the window back to normal
ontop(False)
-
-
taskbar() toggles the taskbar indicator
taskbar()
-
taskbar(True) adds a taskbar indicator for the window
taskbar(True)
-
taskbar(False) removes the taskbar indicator for the window
taskbar(False)
-
-
fs() toggles the fullscreen mode of the window
fs()
-
fs(True) shows the window in fullscreen mode
fs(True)
-
fs(False) shows the window in normal mode
fs(False)
-
-
exit quits porthole π
exit()
-
nop does nothing π΄
nop()
-
settaccess sets the access key sequence to open dmenu
setaccess("Ctrl+Shift+d")
You can execute multiple commands like this:
go("youtube.com").dim(880,480).pos(1000,100)
Execute methods right after the start of porthole:
porthole --init "go(\"youtube.com\").dim(880,480).pos(1000,100)"
--init can be passed multipe times
porthole --init "setaccess(\"Ctrl+Shift+d\")" --init "go(\"youtube.com\").dim(880,480).pos(1000,100)"
This is useful for bash
aliases (~/.bashrc):
....
# This will set the access key for youtube and netflix too!
alias porthole='porthole --init "setacces(\"Ctrl+Shift+d\")"'
alias youtube='porthole --init "go(\"youtube.com\").dim(880,480).pos(1000,100)"'
alias netflix='porthole --init "go(\"netflix.com\").dim(440,240).pos(1150,200)"'
....
Hack all the things π» :
nop() and print("fuck this I'm out") or sys.exit()
Copy the file https://raw.githubusercontent.com/aichingm/porthole/master/Porthole/res/phuserproxy.py to ~/.phuserproxy.py which should look something like this:
from PortholeProxy import PortholeInstance
from PortholeProxy import PortholeProxy
class MyPortholeProxy(PortholeProxy):
def __init__(self, porthole):
super().__init__(porthole)
#add more methods here for example a shortcut for youtube
def yt():
self.go("youtube.com")
return self
#force your proxy onto Porthole (important!)
PortholeInstance.instance.setProxy(MyPortholeProxy(PortholeInstance.instance))