Applications menu (Web; Games; Power): YouTube, Google; Games; Shutdown, Reboot, Return

Michal
Posts: 15
Joined: Thu Aug 07, 2025 10:58 am
Location: Slovakia

Applications menu (Web; Games; Power): YouTube, Google; Games; Shutdown, Reboot, Return

Post by Michal »

Hello,

I would like to share an idea on how I customized Hudiy to watch Youtube, browse Google, play games or shutdown/reboot/return directly from Hudiy.

In the applciations menu are added new categories: Web, Games, Power
Web: YouTube, Google
Games: LBreakout2, Neverball, Pingus, Supertux2, SupeTuxKart2
Power: Shutdown, Reboot, Return

I used Hudiy's simple way of opening "url" in actions.json for opening websites which then make the action that they are programmed to do - all you need is a python script running in the background and that's it (I guess :) ).

The script is running a flask server on the localhost, so if you don't have flask server installed, you can do "pip3 install flask" and that should work for you.
The games that I use are the ones you can simply install with "sudo apt install supertux2 -y", "sudo apt install supertuxkart -y",...

In the attachements, you can find the Files.rar which contains: application.json, applications_menu.json, hudiy_server.py. and hudiy_server.service.:
- hudiy_server.service - a service responsible for running the hudiy_server.py script. Dont forget to change: ExecStart=/usr/bin/python3 /path/to/your/hudiy_server.py
- hudiy_server.py - python script running flask server with the endopits. Each endpoint does it's action. Here, you can define more endpoints and assign them what to do. For example the shutdown endpoint is "http://127.0.0.1:44408/shutdown". If you put this into search bar in the chromium, the command "sudo shutdown -h now" is executed.
- applications_menu.json - added new categories: Web, Games, Power. Added new items: Youtube, Google; LBreakout2, Neverball, Pingus, SuperTux2, SuperTuxKart; Shutdown, Reboot & Return.
- application.json - added new actions for opening YouTube, Google; games; Shutdown, Reboot & Return.- almost all the actions are opnenig the url for the flask server. The action for Return is the only native Hudiy action (quit_hudiy).

Currently, I cannot remote to the Hudiy to take a screenshot, but when I will be there, I will try to send you how it looks.
At least I hope this helps for now. All the coding stuff was done with the help of AI :) .

Have a nice day!
Attachments
Files.rar
(2.35 KiB) Downloaded 174 times
Michal
Posts: 15
Joined: Thu Aug 07, 2025 10:58 am
Location: Slovakia

Re: Applications menu (Web; Games; Power): YouTube, Google; Games; Shutdown, Reboot, Return

Post by Michal »

Screenshots
Attachments
Web.PNG
Web.PNG (565.08 KiB) Viewed 1720 times
Power.PNG
Power.PNG (599.77 KiB) Viewed 1720 times
Games.PNG
Games.PNG (604.81 KiB) Viewed 1720 times
ElmodiLatta
Posts: 21
Joined: Mon Sep 15, 2025 10:11 am
Location: Italy

Re: Applications menu (Web; Games; Power): YouTube, Google; Games; Shutdown, Reboot, Return

Post by ElmodiLatta »

Congratulations on your work, the buttons on the bottom bar are also nice, where did you get the icons?
Michal
Posts: 15
Joined: Thu Aug 07, 2025 10:58 am
Location: Slovakia

Re: Applications menu (Web; Games; Power): YouTube, Google; Games; Shutdown, Reboot, Return

Post by Michal »

ElmodiLatta wrote: Fri Sep 19, 2025 12:17 pm Congratulations on your work, the buttons on the bottom bar are also nice, where did you get the icons?
You can change them in the $HOME.hudiy/share/config/shortcuts.json, I think it is the "iconName": that you change the icon. Then you need to assign the right action for whatever you need the shorcut to do.
Built-in actions from Hudiy are on the Github - https://github.com/wiboma/hudiy/blob/ma ... md#actions
The actions that I created are defined in the application.json.

You can see my shorcuts.json in the attachements. But the shorcuts wont work for you. 3 of them dont even work for me the way I need, yet.
Attachments
shortcuts.rar
(343 Bytes) Downloaded 119 times
ElmodiLatta
Posts: 21
Joined: Mon Sep 15, 2025 10:11 am
Location: Italy

Re: Applications menu (Web; Games; Power): YouTube, Google; Games; Shutdown, Reboot, Return

Post by ElmodiLatta »

Hi, I tried your program, the menu is all ok, web games power, YouTube and Google open and work but there is some problem with the keyboard I connected, for example the "c" key interrupts the music when pressed and is not typed, I have not installed the games so I can not tell you if they work, while the power menu is what interests me most, the "return" key works, while reboot and shutdown make a large exclamation mark appear in the center of the page they open, any help is greatly appreciated
Michal
Posts: 15
Joined: Thu Aug 07, 2025 10:58 am
Location: Slovakia

Re: Applications menu (Web; Games; Power): YouTube, Google; Games; Shutdown, Reboot, Return

Post by Michal »

Hi,

I am not really so sure of what might be wrong for you, I mostly use chatgpt for all the code-problem related stuff, but I think you could run "hudiy_server.py" in the terminal of your Raspberry and then try to use the shutdown/reboot endpoint (e.g open chromium on your Pi and put intot search bar "http://127.0.0.1:44408/shutdown") and see, what the console prints out. Then you can copy the results to the chatgpt and it will help you faster and better than I would. Or you can try to copy it here and I will chatgpt it for you hehe.

For the keyboard problem - I think this thread would be helpful: viewtopic.php?p=401&hilit=search#p401
ElmodiLatta
Posts: 21
Joined: Mon Sep 15, 2025 10:11 am
Location: Italy

Re: Applications menu (Web; Games; Power): YouTube, Google; Games; Shutdown, Reboot, Return

Post by ElmodiLatta »

Hi, I managed to get it working. The problem was in the hudiy_server.service file. I had to delete the User=pi line. Now I need to create the shortcut action. Thanks.
Michal
Posts: 15
Joined: Thu Aug 07, 2025 10:58 am
Location: Slovakia

Re: Applications menu (Web; Games; Power): YouTube, Google; Games; Shutdown, Reboot, Return

Post by Michal »

Hi, glad to hear that.

If you want to create a shortcut for the exact command (shutdown or reboot ro return), this wont be a problem.
But if you want to create a shortcut for "opening the power menu" I dont think it is possible for now, at least I didnt manage to do it. But what I did was:
set the "Power" menu as a default one. The last shorcut calls the action "applications_menu" which opens the menu that is set to be the default one. But if you open other menu, e.g. Hudiy, then go back to your home UI and try to use the shortcut for calling the "applications_menu", the "Hudiy" menu opens. It basically opens the last menu that was opened. I hope it is understandable.
gbd13830
Posts: 2
Joined: Wed Sep 24, 2025 8:01 pm

Re: Applications menu (Web; Games; Power): YouTube, Google; Games; Shutdown, Reboot, Return

Post by gbd13830 »

Michal wrote: Fri Sep 19, 2025 7:08 am Hello,

I would like to share an idea on how I customized Hudiy to watch Youtube, browse Google, play games or shutdown/reboot/return directly from Hudiy.

In the applciations menu are added new categories: Web, Games, Power
Web: YouTube, Google
Games: LBreakout2, Neverball, Pingus, Supertux2, SupeTuxKart2
Power: Shutdown, Reboot, Return

In the attachements, you can find the Files.rar which contains: application.json, applications_menu.json, hudiy_server.py. and hudiy_server.service.:
- hudiy_server.service - a service responsible for running the hudiy_server.py script. Dont forget to change: ExecStart=/usr/bin/python3 /path/to/your/hudiy_server.py
- hudiy_server.py - python script running flask server with the endopits. Each endpoint does it's action. Here, you can define more endpoints and assign them what to do. For example the shutdown endpoint is "http://127.0.0.1:44408/shutdown". If you put this into search bar in the chromium, the command "sudo shutdown -h now" is executed.
- applications_menu.json - added new categories: Web, Games, Power. Added new items: Youtube, Google; LBreakout2, Neverball, Pingus, SuperTux2, SuperTuxKart; Shutdown, Reboot & Return.
- application.json - added new actions for opening YouTube, Google; games; Shutdown, Reboot & Return.- almost all the actions are opnenig the url for the flask server. The action for Return is the only native Hudiy action (quit_hudiy).

Currently, I cannot remote to the Hudiy to take a screenshot, but when I will be there, I will try to send you how it looks.
At least I hope this helps for now. All the coding stuff was done with the help of AI :) .

Have a nice day!

Thanks for all the info. I found where to put the .json files but i couldnt work out where to put the .py files. Also i couldnt get them to work. When i put the string into chromium nothing happened. I think i have missed something.

Any help would be amazing
Michal
Posts: 15
Joined: Thu Aug 07, 2025 10:58 am
Location: Slovakia

Re: Applications menu (Web; Games; Power): YouTube, Google; Games; Shutdown, Reboot, Return

Post by Michal »

Hi gbd13830,

You can put the ".fy" files wherever you want. For example I have a folder "Scripts" on my Desktop, where I have all the ".py" files that I want to run on the system. so basically you can put it in "/home/pi/Desktop/Scripts/hudiy_server.py".
Also you will have to put this path into the ".service" file. So in "/etc/systemd/system", I have a "hudiy_server.service" which is responsible to run the hudiy_server.py on startup.
To edit the file I use "nano". So the cmd is: "nano /etc/systemd/system/hudiy_server.service" and in this file you would change the "ExecStart=" option. So this example would look like "ExecStart=/usr/bin/python3 /home/pi/Desktop/Scripts/hudiy_server.py".

I believe you already used a command to install a flask server "pip3 install flask". Basically you can also run the hudiy_server.py in the terminal and if it fails you will see the results in the terminal.

Hope this helps now. Also I did a lot of stuff with AI and always put the results with problematics scripts into the chatgpt and it helped me to make it work.
Post Reply