← Back to list

How I Built a One-Click Timetable Toggle on Linux

A Small Hack That Makes My Day Smoother

szeyusim · 2025-11-14 13:36 · 0 claps · 2.9 min read
#linux #hotkeys
Open on Medium ↗
Wiki topics: 🔓 · Open Source

How I Built a One-Click Timetable Toggle on Linux

A Small Hack That Makes My Day Smoother

If you use Linux daily, you’ll understand this:

Sometimes the smallest automation makes you feel like a genius.

This semester I wanted something simple, a one-click way to pop open my class timetable. Not opening a PDF, not searching a folder, not digging through “Downloads (57)”… but instantly toggling it on/off like magic.

So I built a tiny Bash script using feh. It took me 3 minutes. But the joy? 10/10. This is how you can do it too.

Why Not Just Set It as My Wallpaper?

Because… it sucks.

I’ve tried putting my timetable as my wallpaper before. It ruins the aesthetic, makes the whole desktop look messy, and feels like having a giant sticker slapped onto your screen. It’s there all the time even when I don’t need it, which completely defeats the point.

A toggleable pop-up is a way better solution:

minimal when I want focus, instant when I need info.

So… I built my own.

Step 1 — Install feh

feh is a lightweight image viewer that respects command line users.

sudo apt update
sudo apt install feh

If you’ve never used it, trust me, it’s one of those “once you know, you know” tools.

Step 2 — Create the Toggle Script

Open your favorite terminal and run:

nano ~/toggle_timetable.sh

Paste this inside:

#!/bin/bash
# Check if feh is running
if pgrep -x "feh" > /dev/null; then
    pkill -x feh   # close feh
else
    feh -x --scale-down /home/ssyok/Desktop/y2s2_timetable.jpeg &
fi

What this script does is beautifully simple:

  • If feh is already showing something → close it
  • If not → show your timetable

It’s a toggle, not just an opener. That’s what makes it feel clean to use.

Step 3 — Make It Run Like a Real Command

Give it permission to run:

chmod +x ~/toggle_timetable.sh

Now try it:

./toggle_timetable.sh

Boom. Image on. Run again → image off.

Step 4 — Make It Available Everywhere

Move it into your PATH:

sudo mv ~/toggle_timetable.sh /usr/local/bin/toggle-timetable

Now anywhere, anytime, you can type:

toggle-timetable

I love this feeling like I just added my own Linux superpower.

Step 5 — Bind It to a Shortcut

If you’re using Ubuntu / GNOME:

  1. Open Settings
  2. Go to Keyboard
  3. Add a Custom Shortcut
  4. Name: Toggle Timetable
  5. Command: toggle-timetable
  6. Bind something like: F1

Now your timetable appears and disappears with a single keyboard combo. Feels like a productivity cheat code.

Why This Tiny Hack Matters

Because doing cool things on Linux isn’t always about running Kubernetes clusters or deploying servers.

Sometimes the win is simple:

  • saving 10 seconds every day
  • shaving mental friction
  • building something you will actually use
  • customizing your OS to feel like “yours”

These small automations add up. They make your system feel alive and personal.

As I continue my own coding journey, I’ll be sharing more insights, tutorials, and personal experiences. If you found this guide helpful, I’d truly appreciate your support!

**Buy me a coffee on Ko-fi**

Stay Connected!

🔔 Follow me on Medium for more updates on my coding journey and in-depth technical blogs. 💻 Check out my projects on GitHub: github.com/szeyu 🔗 Connect with me on LinkedIn: linkedin.com/in/szeyusim


메타데이터
post_id
0b5e1ea8fbec
slug
how-i-built-a-one-click-timetable-toggle-on-linux-0b5e1ea8fbec
url
https://medium.com/@szeyusim/how-i-built-a-one-click-timetable-toggle-on-linux-0b5e1ea8fbec
canonical_url
https://medium.com/@szeyusim/how-i-built-a-one-click-timetable-toggle-on-linux-0b5e1ea8fbec
author_url
https://medium.com/@szeyusim
status
ok
fetched_at
2026-07-19 01:01:37