{"id":17223496,"url":"https://github.com/aichingm/porthole","last_synced_at":"2025-03-25T16:23:49.605Z","repository":{"id":84430446,"uuid":"105399443","full_name":"aichingm/porthole","owner":"aichingm","description":"​ A minimalistic frameless text-driven window to the world 🌍 wide web!","archived":false,"fork":false,"pushed_at":"2021-01-24T20:32:04.000Z","size":43,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-30T14:28:51.099Z","etag":null,"topics":["browser","minimalistic","python3","webengine"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aichingm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-09-30T20:39:28.000Z","updated_at":"2021-01-24T20:32:06.000Z","dependencies_parsed_at":"2023-03-12T22:58:00.717Z","dependency_job_id":null,"html_url":"https://github.com/aichingm/porthole","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aichingm%2Fporthole","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aichingm%2Fporthole/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aichingm%2Fporthole/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aichingm%2Fporthole/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aichingm","download_url":"https://codeload.github.com/aichingm/porthole/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245497334,"owners_count":20624982,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["browser","minimalistic","python3","webengine"],"created_at":"2024-10-15T04:08:28.558Z","updated_at":"2025-03-25T16:23:49.571Z","avatar_url":"https://github.com/aichingm.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Porthole \n\n​ A minimalistic frameless text-driven window to the world :earth_africa: wide web!\n\n\n\n![icon](src/res/icon.png)\n\n## Installing \n\n### Archlinux\n\nThe repository contains a `PKGBUILD` (which is currently not published in the aur)   \n\n```shell\nmkdir /tmp/porthole\ncd /tmp/porthole\nwget https://raw.githubusercontent.com/aichingm/porthole/master/PKGBUILD\nmakepkg\npacman -U porthole-git-*\n```\n\n### Linux\n\nOther Linux :penguin: distributions should use the command below: \n\n```shell\ngit clone https://github.com/aichingm/porthole\ncd porthole\nsudo python3 setup.py install\n```\n\n## Running\n\nRunning porthole from the shell:\n\n```shell\nporthole\n```\n\n\n\nTo 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.\n\n### Available Methods \n\n* go loads a web site, if no schema is specified the url will be perpended with `https://`  \n\n  **go(\"netflix.com\")** \n\n* back moves back in time\n\n  **back()**\n\n* forward move forward in history :fast_forward:\n\n  **forward()**\n\n* reload reloads the current page :arrows_clockwise:\n\n  **reload()**\n\n* dim sets the dimensions of the window\n\n  **dim(800, 400)** dim(width, height)\n\n* pos sets the position of the window\n\n  **pos(0, 0)** pos(left, top)\n\n* border() toggles the window border\n\n  **border()**\n\n  * border(True) adds the window border\n\n    **border(True)**\n\n  * border(False) removes the window border\n\n    **border(False)**\n* onbottom() toggles the onbottomness of the window\n\n  **onbottom()**\n\n  * onbottom(True) puts the window below all other windows\n\n    **onbottom(True)**\n\n  * onbottom(False) sets the onbottomness of the window back to normal\n\n    **onbottom(False)**\n\n* ontop() toggles the ontopness of the window\n\n  **ontop()**\n\n  * ontop(True) puts the window on top of all other windows\n\n    **ontop(True)**\n\n  * ontop(False) sets the ontopness of the window back to normal\n\n    **ontop(False)**\n\n* taskbar() toggles the taskbar indicator\n\n  **taskbar()**\n\n  * taskbar(True) adds a taskbar indicator for the window\n\n    **taskbar(True)**\n\n  * taskbar(False) removes the taskbar indicator for the window\n\n    **taskbar(False)**\n\n* fs() toggles the fullscreen mode of the window\n\n  **fs()**\n\n  * fs(True) shows the window in fullscreen mode\n\n    **fs(True)**\n\n  * fs(False) shows the window in normal mode\n\n    **fs(False)**\n\n* exit quits porthole :skull:\n\n  **exit()**\n\n* nop does nothing :sleeping:\n\n  **nop()**\n\n* settaccess sets the access key sequence to open dmenu\n\n  **setaccess(\"Ctrl+Shift+d\")**\n\n### Stacking Methods\n\nYou can execute multiple commands like this:\n\n```python\ngo(\"youtube.com\").dim(880,480).pos(1000,100)\n```\n\n### Run Methods On Startup\n\nExecute methods right after the start of porthole:\n\n```shell\nporthole --init \"go(\\\"youtube.com\\\").dim(880,480).pos(1000,100)\"\n```\n\n--init can be passed multipe times\n\n```shell\nporthole --init \"setaccess(\\\"Ctrl+Shift+d\\\")\" --init \"go(\\\"youtube.com\\\").dim(880,480).pos(1000,100)\"\n```\n\nThis is useful for `bash` aliases (~/.bashrc):\n\n```shell\n....\n# This will set the access key for youtube and netflix too!\nalias porthole='porthole --init \"setacces(\\\"Ctrl+Shift+d\\\")\"'\n\nalias youtube='porthole --init \"go(\\\"youtube.com\\\").dim(880,480).pos(1000,100)\"'\nalias netflix='porthole --init \"go(\\\"netflix.com\\\").dim(440,240).pos(1150,200)\"'\n....\n```\n\n\n### Messing With Porthole\n\nHack all the things :computer: :\n\n```python\nnop() and print(\"fuck this I'm out\") or sys.exit()\n```\n\n## Adding Custom Methods\n\nCopy the file https://raw.githubusercontent.com/aichingm/porthole/master/Porthole/res/phuserproxy.py to ~/.phuserproxy.py which should look something like this:\n\n```python\nfrom PortholeProxy import PortholeInstance\nfrom PortholeProxy import PortholeProxy\n\nclass MyPortholeProxy(PortholeProxy):\n    \n    def __init__(self, porthole):\n      \tsuper().__init__(porthole)\n  \n    #add more methods here for example a shortcut for youtube\n    def yt():\n      \tself.go(\"youtube.com\")\n        return self\n\n#force your proxy onto Porthole (important!)\nPortholeInstance.instance.setProxy(MyPortholeProxy(PortholeInstance.instance))\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faichingm%2Fporthole","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faichingm%2Fporthole","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faichingm%2Fporthole/lists"}