A simple waybar module to display the status of the ICE you are currently in using the ICE Portals JSON API.

Overview

waybar-iceportal

A simple waybar module to display the status of the ICE you are currently in using the ICE Portals JSON API.

Installation

  1. Ensure python[^pyver] is installed: python3 --version
  2. Clone the git repository to a location of your choosing: git clone https://github.com/e1mo/waybar-iceportal.git
  3. Install the python dependencies: pip install -r requirements.txt
  4. Add the snipped below to your waybar configuration (usually ~/.config/waybar/config)
  5. Reload your waybar (either restart your WM such as sway or just run waybar)
    "modules-right": [
      // Your other modules
      "custom/iceportal-wifi"
    ]
    // Simply append at the bottom
    "custom/iceportal-wifi": {
        "interval": 15,
        "return-type": "json",
        "exec": "path/to/waybar-iceportal/waybar-iceportal",
        "tooltip": true,
    },

For further information on custom waybar modules, refer to the waybar wiki on custom modules.

Developing / testing

The script has a couple of parameters to help with developing / debugging outside of ICEs or on those with broken WiFi. They can be shown using --help. As of writing this, the output looks like this:

$ ./waybar-iceportal --help
usage: waybar-iceportal [-h] [--dummy-data DUMMY_DATA] [--dump [DUMP]]

Waybar module for the ICE Portal (Train Info, Stops, WIFI Status). Nothing will be displayed if the
iceportal is not reachable (e.G. you are not in an ICE or the WIFI is down)

optional arguments:
  -h, --help            show this help message and exit
  --dummy-data DUMMY_DATA
                        Folder to load dummy data from. {status,trip}.json must be present.
  --dump [DUMP]         Dump trip / status json to a subfolder within the specified folder. If no value
                        is specified, will create a folder 'data-dump' besides the script.

Using the --dummy-data option, previously saved data (e.g. from --dump) will be used instead of fetching new data. For convenience, there is a dump included in this repository under data/2021-08-31-12-02-55-ice1601.

To aid with debugging (since I unfortunately don't have a BC100 :/ ) you can dump the data by passing --dump. Either a option can be specified, otherwise the data will be written to a timestamped folder, located in the data-dump located next to the script, so it will look like this: data-dump/2021-08-31-22-24-35.

Outlook

Whats next? Well, I don't know. Overall it's done I think, but some minor improovments could be made.

  • Display the WiFi status directly in the waybar
    • Either by passing a class to change the background color using styles
    • Or using emojis, but there are no reception unicocdes
  • Add different output modes
    • Simple text output for debugging
    • i3blocks style output
  • Maybe even porting this to be a gnome extension? (But I don't think this is going to happen)

[^pyver]: I have only tested this script in Python 3.9, but it should work on older versions.

Owner
Moritz
Moritz
Davide Gallitelli 3 Dec 21, 2021
Ubuntu env build; Nginx build; DB build;

Deploy 介绍 Deploy related scripts bitnami Dependencies Ubuntu openssl envsubst docker v18.06.3 docker-compose init base env upload https://gitlab-runn

Colin(liuji) 10 Dec 01, 2021
Набор утилит для Discord с использованием языка программирования Python.

Discord Tools v0.1 Functions: WebHook spamer Spotify account generator (What?) QR Code Token stealer Token generator Discord nitro gen/check Discor to

Максим Скризов 3 Aug 23, 2022
Linkvertise-bypass - Tools pour bypass les liens Linkvertise

Installation | Important | Discord 🌟 Comme Linkvertise bypass est gratuit, les

GalackQSM 3 Aug 31, 2022
A ShareX alternative for Mac OS built in Python.

Clipboard Uploader A ShareX alternative for Mac OS built in Python. Install and setup Download the latest release and put it in your applications fold

Ben Tettmar 2 Jun 07, 2022
Primeira etapa do processo seletivo para a bolsa de migração de conteúdo de Design de Software.

- Este processo já foi concluído. Obrigado pelo seu interesse! Processo Seletivo para a bolsa de migração de conteúdo de Design de Software Primeirame

Toshi Kurauchi 1 Feb 21, 2022
Braje: a python based credit hacker tool. Hack unlimited RAJE LIKER app Credit

#ReCoded Evan Al Mahmud Irfan ✨ ථ BRAJE 1.0 AUTO LIKER, AUTO COMMENT AND AUTO FOLLOWER APP CREDIT HACKER TOOL About Braje: Braje is a python based cre

Evan Al Mahmud Irfan ථ 2 Dec 23, 2021
A Telegram Bot written in Python for mirroring files on the Internet to your Google Drive

No support is going to be provided of any kind, only maintaining this for vps user on request. This is a Telegram Bot written in Python for mirroring

Sunil Kumar 42 Oct 28, 2022
Discord Crypto Payment Cards Selfbot

A Discord selfbot that serves the purpose of displaying text and QR versions of your BTC, LTC & ETH payment information for easy and simple commercial or personal transactions.

2 Apr 12, 2022
Coronavirus whatsapp chatbot to give real time info on covid

Covy Developed a coronavirus whatsapp chatbot which gives case counts in a particular district, city, state or country. It also predicts future cases

Devinco (Rachit) 0 Oct 03, 2021
An API wrapper for the file.io web service.

🗃️ File.io An API wrapper for the file.io web service. Install $ pip3 install fileio or

nkot56297 1 Dec 18, 2021
A telegram user and chat info extractor with pyrogram python module

Made with Python3 (C) @FayasNoushad Copyright permission under MIT License License - https://github.com/FayasNoushad/Telegram-Info/blob/main/LICENSE

Fayas Noushad 8 Dec 22, 2021
Slack bot to automatically delete yubisneeze / accidental yubikey presses

YubiSnooze Slack bot to automatically delete yubisneeze / accidental yubikey presses. It will search using the regex "[cbdefghijklnrtuv]{44}" and if t

Andrew MacPherson 3 Feb 09, 2022
Messing around with GitHub API to look at omicron build times

gh-workflow-runs This is a very simple tool to dump out basic information about workflow runs for a GitHub repo. The structure is based on gh-subscrip

David Pacheco 1 Nov 30, 2021
An Telegram Bot By @AsmSafone To Stream Videos in Telegram Voice Chat. This is Also The Source Code of The Bot Which is Being Used In @SafoTheBot Group! ❤️

Telegram Video Player Bot (Beta) An Telegram Bot By @AsmSafone To Stream Videos in Telegram Voice Chat. Special Features Supports Live Streaming From

SAF ONE 206 Jan 03, 2023
Python On WhatsApp - Run your python codes on whatsapp along with talking to a chatbot

Python On WhatsApp Run your python codes on whatsapp along with talking to a chatbot This is a small python project to run python on whatsapp. and i c

Prajjwal Pathak 32 Dec 30, 2022
A multifunctional bot for Discord

Um bot multifuncional e divertido para Discord Estive desenvolvendo o BotDaora desde o começo de outubro de 2021 e agora ele é open-source! tomei essa

Ruan 4 Dec 28, 2021
E0 AI Bot is based on the message, it prints the answer with the highest probability using probability from the database.

E0 AI Chat Bot Based on the message, it prints the answer with the highest probability using probability from the database. Install on linux (Arch,Deb

Error 27 Dec 03, 2022
Automatically pulls specified repository whenever a specified file is pushed. Great for working collaboratively when you need to run something locally.

autopull Simple python tool that allows you to automatically pull from a github repository whenever a file with a specified name is uploaded installat

carreb 0 Sep 27, 2022
A simple python discord bot with commands for moderation and utility.

Discord Bot A simple python discord bot with commands for moderation, utility and fun. Moderation $kick user reason - Kick a user from the server

syn 3 Feb 06, 2022