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
Token-gate Notion pages

This is a Next.js project bootstrapped with create-next-app. Getting Started First, run the development server: npm run dev # or yarn dev Open http://

John 8 Oct 13, 2022
You cant check for conflicts until course enrolment actually opens. I wanted to do it earlier.

AcornICS I noticed that Acorn it does not let you check if a timetable is valid based on the enrollment cart, it also does not let you visualize it ea

Isidor Kaplan 2 Sep 16, 2021
Official implementation of DeepSportLab (a fork of OpenPifPaf)

DeepSportLab DeepSportLab: a Unified Framework for BallDetection, Player Instance Segmentationand Pose Estimation in Team Sports Scenes This paper pre

ISPGroupUCL 8 Sep 27, 2022
Python library wrapping and enhancing the Invenio RDM REST API.

Iridium The metal Iridium is used to refine and enhance metal alloys. Similarly, this package provides an enhanced coating around the Invenio RDM APIs

Materials Data Science and Informatics 2 Mar 29, 2022
A Very Simple Telegram Files Rename Bot by @AbirHasan2005

Rename-Bot This is a very simple Telegram Files Rename Bot by @AbirHasan2005. Features Rename Videos, Files or Audios. Permanent Custom Thumbnail Supp

Abir Hasan 124 Dec 25, 2022
This bot will automatically like and follow users that post under a specified hashtag

Instagram-bot This bot will automatically like and follow users that post under a specified hashtag Dependencies Java JDK Selenium Updated version of

Makana Edwards 1 Nov 04, 2021
Work with the AWS IP address ranges in native Python.

Amazon Web Services (AWS) publishes its current IP address ranges in JSON format. Python v3 provides an ipaddress module in the standard library that allows you to create, manipulate, and perform ope

AWS Samples 9 Aug 25, 2022
Reads and prints information from the website MalAPI.io

MalAPIReader Reads and prints information from the website MalAPI.io optional arguments:

Squiblydoo 16 Nov 10, 2022
RP2 is a privacy-focused, free, open-source US cryptocurrency tax calculator

Privacy-focused, free, open-source cryptocurrency US tax calculator, up to date for 2021: it handles multiple coins/exchanges and computes long/short-term capital gains, cost bases, in/out lot relati

eprbell 123 Jan 04, 2023
Automatically updates the twitter banner with the images of 5 latest followers, using tweepy python

Auto twitter banner Automatically updates the twitter banner every few seconds with follower profile pics on it Here's how it looks! Installation git

Dhravya Shah 7 Jul 04, 2022
A bot that is an updated & modified version of calvinnfernando's WebReg-Bot

WaitList-Bot A bot that is an updated & modified version of calvinnfernando's WebReg-Bot to automate getting into waitlisted classes in UCSD WebReg on

Issac In 1 Dec 01, 2022
Video Stream: an Advanced Telegram Bot that's allow you to play Video & Music on Telegram Group Video Chat

Video Stream is an Advanced Telegram Bot that's allow you to play Video & Music

SHU KURENAI TEAM 4 Nov 05, 2022
Keypirinha plugin to install packages via Chocolatey

Keypiriniha Chocolatey This is a package for the fast keystroke launcher keypirinha (http://keypirinha.com/) It allows you to search & install package

Shadab Zafar 4 Nov 26, 2022
Wakatime Response In javascript and python

Project Title Wakatime Response In javascript and python Description just for refrence Getting Started Dependencies For Python: requests json For Java

Gjenius20 1 Dec 31, 2021
A Telegram Bot That Can Find Lyrics Of Song

Lyrics-Search-Bot A Telegram Bot That Can Find Lyrics Of Song A Simple Telegram Bot That Can Extract Lyrics Of Any Songs Deploy Commands start - To St

Muhammed Fazin 11 Oct 21, 2022
Discord bot to monitor collection of mods on the Steam Workshop and notify on update to selected discord server via Nextcordbot API.

Steam-Workshop-Monitor Discord bot to monitor collection of mods on the Steam Workshop and notify on update to selected Discord channel via Nextcordbo

7 Nov 03, 2022
Herramienta para transferir eventos de Sucuri WAF hacia Azure Data Tables.

Transfiere eventos de Sucuri hacia Azure Data Tables Script para transferir eventos del Sucuri Web Application Firewall (WAF) hacia Azure Data Tables,

CSIRT-RD 1 Dec 22, 2021
Wrapper for vk_api lib for faster bot buliding

Welcome to VKBotPod repository! Wrapper for vk_api lib for faster bot buliding Features Simple syntax Rich functionality Special thanks to movpushmov

NullPointerException 3 Jan 14, 2022
Telegram File to Link Fastest Bot , also used for movies streaming

Telegram File Stream Bot ! A Telegram bot to stream files to web. Report a Bug | Request Feature About This Bot This bot will give you stream links fo

Avishkar Patil 194 Jan 07, 2023
search different Streaming Platforms for movie titles.

Install git clone and cd to directory install Selenium download chromedriver.exe to same directory First Run Use --setup True for the first run. Platf

34 Dec 25, 2022