promitheas

joined 3 years ago

Recharging the mayhem batteries ๐Ÿ˜„

Mmmm add some "giaxni" and its perfect :D

Something in the area of computer/electrical engineering. I want to work in embedded systems engineering, but i only have a computer science degree, so theres a lot of knowledge im missing. If im overly specific with your question, "could" teach can be interpreted as "having the knowledge/ability to", so yea. Id do that and gain free knowledge in a field that fascinates me

[โ€“] promitheas@programming.dev 7 points 2 months ago

I never do unless they are a clear scam/troll account. No matter how much i disagree with their opinions, i still want to see it and engage with them, for fear of being the architect of my own echo chamber

[โ€“] promitheas@programming.dev 2 points 2 months ago

You seem quite angry with me. You didn't even stop to proofread.

Drinks were drunk, and editing on mobile with my fat fingers is a pain ๐Ÿ˜…๐Ÿ˜‚. Also, not angry, sorry if it came across that way.

As for the rest of your comment, I disagree about the consent being ok based on the age difference, but agree about the power imbalance part. The acceptable age difference in my opinion is:

If both people are underage, a 2 year difference sounds reasonable as you said (but only if both are underage at the start of the relationship, otherwise grooming). If both are adults, have at it, get with a 70 year old the day after you turn 18 if you wish.

My point is Im personally staunchly against separating and mixing different ages for being legally able to do different stuff. While not how nature works, laws need to be written in such a way that they apply the same to everyone, so even if I mature/develop my brain 5 years after you do for example, we both need to have the threshold age be the same for adulthood. Once thats understood and agreed upon, we now need to determine what said threshold age will be. I brought up the example of the USA in my comment above, where they are legally allowed to drive, die/kill for the government, and drink at different ages. I believe youre either an adult or not, at least in the eyes of the law (or at least thats how it should be)

[โ€“] promitheas@programming.dev 2 points 2 months ago (1 children)

Best cat picture of 2026 ๐Ÿคฃ

[โ€“] promitheas@programming.dev 2 points 2 months ago

Neighbours cattos (who have free reign to come to my apartment through our connected balconies) frequently try to go through my trash, stare at me while im pooping, and have destroyed my couch... I think its fair to get the stinky-catto talk from time to time (with love of course, i love them so much)

[โ€“] promitheas@programming.dev 1 points 2 months ago

Fine, ill smother my neighbours cats with love and stinky-talk when i get home. No need to insist

[โ€“] promitheas@programming.dev 0 points 2 months ago (2 children)

So where do you draw the line? What if a 19 year old dates a mature 14-15 year old? Is that OK in your book, assuming theres jo significant power difference (if you agree its ok, explain your system of measuring 'power difference')?

Just because the specific number 18 is a social construct doesnt mean it should be a free for all. We do live in a society after all, and need to draw the line somewhere. Also, because in most countries (sans the US where you can drive at 16, go to war at 18, but only drink at 21) there is a definite line between adult and non-adult(the specific day you turn 18). This is necessary, even if it is a bit ridiculous that im not allowed to do certan things 24 hours before my 18th birthday.

In my country, and most if im not mistaken, if 2 underage people are dating, no one expects them to "pause" their relationship as soon as the older of the 2 crosses the threshold of adulthood, until the younger also crosses it. But if an adult starts a relationship with someone underage, thats not OK, abd you beed to have a cincrete definition of what 'underage' is, abd when exactly that is.

[โ€“] promitheas@programming.dev 1 points 2 months ago

Im boycotting it. Not that id follow it either way, but at least previous years Id go to a bar with friends to watch the semi-finals and final, and have a couple beers, simply to watch good football. Not this time though.

 

Hello everyone :)

I have this in a script which I call from my .zshrc:

#!/bin/zsh

# ~/.bin/check_last_update.sh

GREEN='\033[92m'
YELLOW='\033[93m'
RED='\033[91m'
RESET='\033[0m'

# Check if there are available updates for packages
num_packages_to_update=$(checkupdates | wc -l)

if (( num_packages_to_update >= 0 && num_packages_to_update <= 20 )); then
	echo -e "${GREEN}Available updates: $num_packages_to_update${RESET}" >> /dev/tty
elif (( num_packages_to_update > 20 && num_packages_to_update <= 50 )); then
	echo -e "${YELLOW}Available updates: $num_packages_to_update${RESET}" >> /dev/tty
else
	echo -e "${RED}Available updates: $num_packages_to_update${RESET}" >> /dev/tty
fi

# Kernel version check
running_kernel=$(uname -r)
installed_kernel=$(pacman -Q linux | awk '{print $2}' | cut -d '-' -f1 | cut -d '.' -f1,2,3)

running_kernel_base=$(echo "$running_kernel" | cut -d '-' -f1)

if [[ "$running_kernel_base" != "$installed_kernel" ]];
then
	echo -e "${RED}Kernel mismatch detected. Reboot recommended.${RESET}" >> /dev/tty
fi

It works, but when I open a new terminal it may take up to 2 seconds for the prompt to show up. Is there a way of speeding this up?

Would it be a good idea to perform the checks in the background every hour or so, maybe with a systemd timer or something, and cache the results (or possibly to make it even more efficient, just store a file somewhere out of the way containing the number of updates and if there is a kernel mismatch - maybe on separate lines so when I open a terminal I can easily query the file and get exactly what I need) so that when I open a new terminal instead of checking with the live repositories it checks the cached data? Also, I guess this would mean that if a package has become available for update after the last time the check script runs, then the number it tells me will be less than the actual number of available updates, right?

Thanks in advance!

 

Hello guys.

I'm trying to learn some more KiCAD and general electronics design from scratch by continuing my thesis project after I've submitted it and its all done, but by taking it to the next step and actually getting a PCB and soldering everything on. This is to get experience through the entire process from design to assembly.

Where I'm stuck is at creating the footprints for my components. I've watched a bunch of videos about the topic, but they all seem to be for boards with no header pins attached to them, or for pins that are vertical (perpendicular to the actual board). The two boards I have are breakout boards for a DS3231 RTC and an HM-10 BLE module, and they both have right-angle male header pins sticking out, which obviously made prototyping on a breadboard really easy, but I'm struggling with converting them to PCB.

Here are some photos to make it clearer:

HM-10:

DS3231:

I know one of my options is to desolder the right-angle header pins and add straight pins to them, but I'd like to avoid that so that I can easily use them in any future projects by simply disconnecting them from the eventual PCB and using them in a breadboard.

As such, I know that I would like there to be female headers on the final PCB, and ideally the female headers will also be at a right-angle so that the final PCB is a little more compact and there aren't just some boards sticking out from it.

So, after getting some measurements with my calipers, how can I translate them into the KiCAD footprint editor knowing the footprint should include the female right-angle header pins (which will of course extend the length of the modules beyond what I have currently measured), and also take their height into account so that they don't have any obstacles between them and the PCB as they are laying parallel to it?

I hope I made myself clear enough, but if not please feel free to ask me for any clarification.

Thanks in advance for any replies :)

 

Hello everyone!

I decided to learn ncurses a few days ago so I can do a project I've been thinking about lately, and in the process I figured since I'll go to the trouble of solving a bunch of the problems with writing relatively complicated TUIs with ncurses, I might as well generalise the solutions into a library or two for future me and anyone else who will find them useful.

Anyway, enough introduction, heres what I want to do with the library:

I want it to dynamically manage size and position of ncurses windows. This means windows should be able to be added, and removed (just those for now, I don't know if I'll implement resizing windows from the perspective of someone using the library to have that functionality), and have the size and position of the windows update automatically.

Initially I thought a binary space partitioning tree situation might be a good way to tackle this, but I want it to be a bit more flexible. For example, the dev using the library should be able to set certain windows to behave differently than leaves in a bsp (think persistent status bar at the bottom of the application, taking up the entire width but only a couple lines in height for example, or toggle-able file explorer on the left/right of the application like neovim's NERDTree).

How would you guys go about designing something like this, while still keeping the code relatively simple and efficient?

Here is a badly drawn diagram of what I mean:

Steps here refer to how someone using the library might go about creating each element (window) of their UI in their own project.

Until step 4 a bsp tree makes sense, but after that when I want to add a window which doesnt conform to the rules of a bsp tree, it gets a bit difficult.

Also, Im thinking there should be some way for windows to have some idea of their neighbours so that when a change occurs, they can adapt to it.

Anyways, essentially I'm looking for your thoughts on how you would go about implementing something like this.

Much appreciated!

 

Hello guys, my question is basically in the title. I would really like to be able to have the parameter names included when I cursor over a function and open the 'hover' window to show basic info about it. Currently it only shows me the expected types, which while still useful I feel is only a piece of the puzzle when working either with a new library, or a codebase you're not familiar with.

As an example I'm learning ncurses these past couple days, and its significantly flow-breaking to have to switch focus away from the editor to either search on the web what a particular function takes as parameters, or open a separate terminal to read the man page for it. I'm still not familiar with the library so I frequently need to look up what a parameter represents in the context of the code, in addition to what type I should give it. Is there any way to do this while still using clangd as my lsp server?

Ive also included a screenshot of one such hover window for the ncurses function mvprintw.

 

Hello guys, Ive built a super simple web app to convert google maps urls to the osm format, mainly for my personal use but also for anyone who has this use case as well.

Most link formats work, but there are a couple that have been giving me particular trouble. Here are the formats that work as expected:

https://www.google.com/maps/place/Eiffel+Tower/@48.8584,2.2945,17z
https://google.com/maps/place/Statue+of+Liberty/@40.6892,-74.0445,17z
https://maps.app.goo.gl/SoDFgcPJKVPeZXqd8
https://www.google.co.uk/maps/place/Buckingham+Palace/@51.5014,-0.1419,17z
https://www.google.de/maps/place/Brandenburger+Tor/@52.5163,13.3777,17z

These 2 formats dont work on the server, but if I run the app locally they work and give a correct osm formatted link:

https://maps.app.goo.gl/jXqDkM2NWN55kZcd9?g_st=com.google.maps.preview.copy
https://maps.google.com/maps?q=Big+Ben%2C+London

You can test it on the actual website (gmaps2osm.de), but essentially if you try to convert links of this format on the actual website you get an Internal Server Error after around 10 seconds of it thinking.

Right now Im focusing on the .preview.copy formatted links. As you will see from the code below, I am using playwright to headlessly handle googles annoying redirects and consent forms:

from typing import final
from flask import Flask, request, render_template, jsonify
from datetime import datetime
import re
import urllib.parse
import requests
from playwright.sync_api import sync_playwright

# Test urls for regex:
# https://www.google.com/maps/place/Eiffel+Tower/@48.8584,2.2945,17z
# https://google.com/maps/place/Statue+of+Liberty/@40.6892,-74.0445,17z
# https://maps.google.com/maps?q=Big+Ben%2C+London # has an issue, doesnt work
# https://maps.app.goo.gl/4jnZLELvmpvBmFvx8
# https://maps.app.goo.gl/jXqDkM2NWN55kZcd9?g_st=com.google.maps.preview.copy
# https://www.google.co.uk/maps/place/Buckingham+Palace/@51.5014,-0.1419,17z
# https://www.google.de/maps/place/Brandenburger+Tor/@52.5163,13.3777,17z

debug_enabled = False
is_headless = not debug_enabled
print(f"is_headless: {is_headless}")
log_file_path = ""
app = Flask(__name__)

GMAPS_URL_RE = re.compile(
	r"""(?x)  # Verbose mode
	^https?://
	(
		(www\.)?
		(google\.[a-z.]+/maps)			  |		# www.google.com/maps, google.co.uk/maps, etc.
		(maps\.google\.[a-z.]+)			  |		# maps.google.com
		(goo\.gl/maps)					  |		# goo.gl/maps
		(maps\.app\.goo\.gl)					# maps.app.goo.gl
		# (maps\.app\.goo\.gl.*\.preview\.copy)	# maps.app.goo.gl(...).preview.copy
	)
	""",
	re.IGNORECASE
)

# ---- Dispatcher
def extract_coordinates(url: str):
	if ".preview.copy" in url:
		return handle_preview_copy_url(url)
	if "maps?q=" in url:
		return handle_browser_resolved_url(url)
	else:
		return handle_standard_url(url)

# ---- Handler: preview.copy links
def handle_preview_copy_url(url: str):
	url = url.split('?')[0]
	input_url = resolve_initial_redirect(url)
	if "consent.google.com" in input_url:
		parsed = urllib.parse.urlparse(input_url)
		query = urllib.parse.parse_qs(parsed.query)
		continue_url = query.get("continue", [""])[0]
		if continue_url:
			input_url = urllib.parse.unquote(continue_url)
		else:
			log_msg("ERROR", "No 'continue' parameter found.")
			return None, input_url
	final_url = extract_with_playwright(input_url)
	coord = extract_coords_from_url(final_url)
	return coord, final_url

# ---- Handler: links with only a query containing place names (https://maps.google.com/maps?q=Big+Ben%2C+London)
def handle_browser_resolved_url(url: str):
	input_url = resolve_initial_redirect(url)
	if "consent.google.com" in input_url:
		parsed = urllib.parse.urlparse(input_url)
		query = urllib.parse.parse_qs(parsed.query)
		continue_url = query.get("continue", [""])[0]
		if continue_url:
			input_url = urllib.parse.unquote(continue_url)
		else:
			log_msg("ERROR", "No 'continue' parameter found.")
			return None, input_url
	final_url = extract_with_playwright(input_url)
	coord = extract_coords_from_url(final_url)
	return coord, final_url

# ---- Handler: standard links
def handle_standard_url(url: str):
	try:
		# Follow redirect to get final destination
		response = requests.head(url, allow_redirects=True, timeout=10)
		final_url = response.url
		log_msg("DEBUG", "Final URL:", final_url)
	except requests.RequestException as e:
		raise RuntimeError(f"Failed to resolve standard URL: {e}")
	coords = extract_coords_from_url(final_url)
	return coords, final_url

# ---- Utility: redirect resolver
def resolve_initial_redirect(url: str):
	try:
		response = requests.get(url, allow_redirects=True, timeout=10)
		return response.url
	except Exception as e:
		log_msg("ERROR", "Redirect failed: ", e)
		return url

# ---- Utility: use playwright to get the final rendered URL
def extract_with_playwright(url:str):
	with sync_playwright() as p:
		browser = p.chromium.launch(headless=is_headless)
		page = browser.new_page()
		page.goto(url)
		# Click reject button if necessary
		try:
			page.locator('button:has-text("Reject all")').first.click(timeout=5000)
		except:
			pass # No reject button
		page.wait_for_function(
				"""() => window.location.href.includes('/@')""",
				timeout=15000
		)
		final_url = page.url
		log_msg("DEBUG", "Final URL: ", final_url)
		browser.close()
		return final_url

# ---- Utility: extract coordinates with regex patterns
def extract_coords_from_url(url: str):
	patterns = [
		r'/@([-.\d]+),([-.\d]+)',				 # Matches /@lat,lon
		r'/place/([-.\d]+),([-.\d]+)',			 # Matches /place/lat,lon
		r'/search/([-.\d]+),\+?([-.\d]+)',
		r'[?&]q=([-.\d]+),([-.\d]+)',			 # Matches ?q=lat,lon
		r'[?&]ll=([-.\d]+),([-.\d]+)',			 # Matches ?ll=lat,lon
		r'[?&]center=([-.\d]+),([-.\d]+)',		 # Matches ?center=lat,lon
		r'!3d([-.\d]+)!4d([-.\d]+)'				 # Matches !3dlat!4dlon
	]
	for pattern in patterns:
		match = re.search(pattern, url)
		if match:
			return match.groups()
	return None

# ---- Utility: logging function to output and write to file
def log_msg(level: str, msg: str, optional_arg = None):
	ts = datetime.now()
	iso_ts = ts.isoformat()
	if level == "DEBUG" and debug_enabled == False:
		return
	if optional_arg:
		log_line = f"[{iso_ts}]:[{level}]: {msg} {optional_arg}"
	else:
		log_line = f"[{iso_ts}]:[{level}]: {msg}"
	print(log_line)
	with open(log_file_path+"gmaps2osm_logs.txt", "a") as log_file:
		log_file.write(log_line+"\n")

@app.route("/", methods=["GET", "POST"])
def index():
	result = {}
	if request.method == "POST":
		url = request.form.get("gmaps_url", "").strip()
		log_msg("DEBUG", "URL:", url)
		if not url:
			result["error"] = "Please enter a Google Maps URL."
			log_msg("DEBUG", "Not a URL")
		else:
			try:
				if not GMAPS_URL_RE.search(url):
					result["error"] = "Please enter a valid Google Maps URL."
				else:
					coords, final_url = extract_coordinates(url)
					log_msg("DEBUG", "coords:", coords)
					if coords:
						lat, lon = coords
						result["latitude"] = lat
						result["longitude"] = lon
						result["osm_link"] = f"https://osmand.net/map?pin=%7Blat%7D%2C%7Blon%7D#16/{lat}/{lon}"
					else:
						raise ValueError("No coordinates found in the URL.")
			except ValueError as e:
				result["error"] = f"Error resolving or parsing URL: {e}"
	return render_template("index.html", **result)

if __name__ == "__main__":
	app.run(debug=True)

You can view all the code at the github: https://github.com/promitheas17j/gmaps2osm

But essentially its running as a docker container (my first project using docker woowoo) and this is the output of the logs on the server when I enter such a link:

$ docker logs -f gmaps2osm
[2025-08-15 17:42:00,132] ERROR in app: Exception on / [POST]
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 1511, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 919, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 917, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 902, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)  # type: ignore[no-any-return]
  File "/app/app.py", line 164, in index
    coords, final_url = extract_coordinates(url)
  File "/app/app.py", line 42, in extract_coordinates
    return handle_preview_copy_url(url)
  File "/app/app.py", line 61, in handle_preview_copy_url
    final_url = extract_with_playwright(input_url)
  File "/app/app.py", line 113, in extract_with_playwright
    page.wait_for_url("**/@**", timeout=15000)
  File "/usr/local/lib/python3.10/dist-packages/playwright/sync_api/_generated.py", line 9162, in wait_for_url
    self._sync(
  File "/usr/local/lib/python3.10/dist-packages/playwright/_impl/_sync_base.py", line 115, in _sync
    return task.result()
  File "/usr/local/lib/python3.10/dist-packages/playwright/_impl/_page.py", line 584, in wait_for_url
    return await self._main_frame.wait_for_url(**locals_to_params(locals()))
  File "/usr/local/lib/python3.10/dist-packages/playwright/_impl/_frame.py", line 263, in wait_for_url
    async with self.expect_navigation(
  File "/usr/local/lib/python3.10/dist-packages/playwright/_impl/_event_context_manager.py", line 33, in __aexit__
    await self._future
  File "/usr/local/lib/python3.10/dist-packages/playwright/_impl/_frame.py", line 239, in continuation
    event = await waiter.result()
playwright._impl._errors.TimeoutError: Timeout 15000ms exceeded.
=========================== logs ===========================
waiting for navigation to "**/@**" until 'load'
============================================================

This was when I gave this URL as input: https://maps.app.goo.gl/jXqDkM2NWN55kZcd9?g_st=com.google.maps.preview.copy

Anyone have any idea why playwright is throwing errors at me?

Thanks in advance, I really appreciate any help you can give me. Ive been banging my head about this issue on and off the past couple of months.

 

Hello everyone!

As the title says, I am trying to set up email alerts on my server whenever there is a successful ssh connection (will also setup the same for failed connections with fail2ban later). I already have the email script created and it works (I use it to monitor the directories containing all of these security scripts for changes so that I also get notified if anything critical is modified or deleted in those directories).

I also created a very basic user called test for - you guessed it - testing purposes. This user doesn't have a home directory or anything like that.

Here are the relevant scripts:

$ cat /usr/local/bin/login-alert.sh
#!/bin/bash

# Sends alerts only for real terminals not cron jobs
if [[ -n "$SSH_CONNECTION" ]]; then
	USERNAME=$(whoami)
	IP=$(echo $SSH_CONNECTION | awk '{print $1}')
	HOST=$(hostname)
	DATETIME=$(date)
	/usr/local/bin/semail \
		-s "[CRITICAL] SSH Login to $HOST" \
	 	-b "Login detected:\n\nUser: $USERNAME\nIP: $IP\nTime: $DATETIME\nTTY: $SSH_TTY"
fi

$ cat /usr/local/bin/semail
#!/bin/bash

# Default values
TO="my_email@here.com"
FROM="notifications@my_server.com"
SUBJECT=""
BODY=""
BODY_FILE=""


# Help function
show_help() {
cat <<EOF
Usage: $0 [OPTIONS]

Send a test email using Postfix.

Options:
  -t, --to EMAIL            Recipient email address (default: $TO)
  -s, --subject TEXT        Subject of the email (required)
  -b, --body TEXT           Body text of the email
  -f, --body-file FILE      File to read body text from (overrides --body)
  -h, --help                Show this help message

If no body or body-file is provided, you will be prompted to enter the body interactively.

Examples:
  $0 -s "Test subject" -b "Hello\nThis is a test"
  $0 --subject "Test" --body-file message.txt
EOF
}

# Parse arguments
while [[ "$#" -gt 0 ]]; do
	case "$1" in
		-t|--to)
			TO="$2"
			shift 2
			;;
		-s|--subject)
			SUBJECT="$2"
			shift 2
			;;
		-b|--body)
			BODY="$2"
			shift 2
			;;
		-f|--body-file)
			BODY_FILE="$2"
			shift 2
			;;
		-h|--help)
			show_help
			exit 0
			;;
		*)
			echo "Unknown option: $1"
			show_help
			exit 1
			;;
	esac
done

# Validate required parameters
if [[ -z "$SUBJECT" ]]; then
	echo "Error: --subject is required."
	show_help
	exit 1
fi

# Handle body input
if [[ -n "$BODY_FILE" ]]; then
	if [[ ! -f "$BODY_FILE" ]]; then
		echo "Error: Body file '$BODY_FILE' does not exist."
		exit 1
	fi
	BODY=$(<"$BODY_FILE")
elif [[ -z "$BODY" ]]; then
	echo "Enter the body of the email (end with Ctrl-D):"
	BODY=$(</dev/stdin)
fi

# Send email
{
	echo "From: $FROM"
	echo "To: $TO"
	echo "Subject: $SUBJECT"
	echo "Content-Type: text/plain; charset=UTF-8"
	echo
	printf "%b\n" "$BODY"
} | /usr/sbin/sendmail -t -f "$FROM"

# /usr/sbin/sendmail -f "$FROM" "$TO" <<EOF
# From: $FROM
# To: $TO
# Subject: $SUBJECT

# $BODY
# EOF

echo "Email sent to $TO"

And here is the output I see when I login as the test user:

ssh test@my_server.com
test@my_server.com's password:
dir=/ failed: exit code 2
dir=/ failed: exit code 2
Linux my_server 6.1.0-37-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.140-1 (2025-05-22) x86_64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Fri Aug 15 07:08:24 2025 from my_ip_address
Could not chdir to home directory /home/test: No such file or directory

I don't get email alerts for any user, neither the test user nor my regular admin user.

Here is my /etc/pam.d/sshd relevant lines:

# Standard Un*x session setup and teardown.
account optional pam_exec.so seteuid dir=/ /usr/local/bin/login_notify.sh
@include common-session

I also tried with session instead of account and without the dir=/ part.

Can anyone help me troubleshoot this please?

Thanks in advance. Of course if you need any more info I'll do my best to provide it :)

 

Hello guys. I have island installed and have my "work profile" installed, which contains among others my browser in the island tab. The situation is that I have several PWAs that I dont want to receive notifications for while I am at work as they are distracting and unnecessarily annoying, but I want to receive them normally while not at work.

I have been trying to figure out how to get it set up so that I can both trigger the actions at scheduled times, or manually through the quick tile I created from macrodroid (my work hours are not really stable/fixed).

However, when testing with a push notification testing site, regardless what I do I still get the notifications.

Here is my setup so far:

Macros:
Enable Work Profile
--------------------------
Triggers:
    Day/Time: 08:00 Mon, Fri
    Quick Tile On/Press

Actions:
    Action 1:
        Target: Broadcast
        Send Intent: island.intent.action.FREEZE_APP
        Extra 1: package_name = com.brave.browser
    Action 2:
        Display Notification (with a message saying work mode enabled)

Constraints: None

Disable Work Profile
--------------------------
Triggers:
    Quick Tile Off

Actions:
    Action 1:
        Target: Broadcast
        Send Intent: island.intent.action.UNFREEZE_APP
        Extra 1: package_name = com.brave.browser
    Action 2:
        Display Notification (with a message saying work mode disabled)

Constraints:
    Day of the Week: Mon
    Time of Day: 19:00 - 19:01
------------------- OR --------------------------
    Day of the Week: Fri
    Time of Day: 22:00 - 22:01

Some things to note:

I am using /e/os version 3.0.1-t-20250606498724-official-FP5 Android is version 13

What am I doing wrong here? Ideally I would like to have as few apps installed as possible to achieve a single task, but as I understand it macrodroid doesnt have the necessary permissions to affect other apps notifications (hence why island is necessary).

If there is another way which is easier to achieve what I am trying to do I'm all ears, however I do not want to use do not disturb for this purpose because obviously I need to be able to use my phone normally while at work except for those 2-3 apps I dont want to receive notifications for, but there are also situations where I want a full DND experience where I will get nothing coming through, not even alarms (e.g. meetings/classes, etc). Also for those unfamiliar with /e/os, it doesn't currently have the Focus Mode feature so that is also out of the picture.

Many thanks in advance!

 

Hello everyone!

After getting advice from my previous post in here (https://programming.dev/post/32038961) I've managed to build a super simple web app which converts google maps links to osmand.net links. As can be seen from the page if you visit it, to have it open those links in your mobile application automatically there are a few simple steps you need to go through to allow OsmAnd to open those links by default. It's a one time setup though.

I made it work both on desktop and mobile (it can be installed as a PWA - "Add to home screen").

Something that is quite important to me: it has some screen reader support for visually impaired people. Not being visually impaired myself, I can't know if its actually useful or if the tools I used to test the screen reader support are actually what the blind community use day-to-day. As such, I would really appreciate any feedback regarding (not only) the accessibility for visually impaired people.

Furthermore, please just let me know your thoughts in general and test the crap out of it. Im no web developer so if you find any security holes do let me know, even though its such a simple app that there shouldnt be much.

Also, general feedback is always appreciated!

Link to page: gmaps2osm.de

Link to github: https://github.com/promitheas17j/gmaps2osm

 

Hello everyone! I just wrote an extremely simply single-page tool using just HTML and Flask to convert google maps links to Osmand.net links, and I would like to host it somewhere.

I don't need any fancy bells and whistles, as long as it supports Flask as a backend.

Im no web developer, so I haven't actually hosted my own page anywhere before. As such, simplicity of use and setup is quite important. For example if it allows me to also buy the domain in the same platform thats good.

While I use Flask, there is no data being stored. All the flask app does is take the link given by the user, convert it to the osmand.net format, and return it. Super simple!

I looked on buy-european.net and found Infomaniak Web Hosting. I quite like the fact that they use 100% renewable energy to power their servers according to the page above, but I'm not sure if it would be the best option given how inexperienced with all this I am.

Would love to hear your suggestions! Thanks

Edit: Ended up going with hetzner. Site is pretty much set up right now.

gmaps2osm.de

It has some screen-reader support (still need to get it tested by visually impaired people), and is also set up so that you can install it as a PWA on your mobile device (add to home screen).

Here is the github repo: https://github.com/promitheas17j/gmaps2osm

I would really appreciate any feedback from experienced and not so experienced web developers alike :D

 

Hello guys, I'm relatively new to OSM but have found it quite useful and feature-rich since I made the switch to a degoogled phone OS. I now have a question about generating OSM compatible links much like google maps has where I can send a friend a sharable link and when they click it it automatically opens their app (or browser if the app cant be found) to the OSM map with the location under a pin so that they can do whatever with it (most usefully is to "Navigate" to it and get directions)

I'm so new to it though that I don't even know if the concept of a "link" which opens the map exists in the context of OSM. If it does though, I would love to know where I can read up on these links' formats so that I can see how I might generate them from lat+long coords through software.

Many thanks in advance!

Edit: In OsmAnd when I want to share a location, I can select Share then Copy. That will put some text along with a link of the following format in my clipboard:

https://osmand.net/map?pin=35.96296%2C-5.50856#10/35.96296/-5.50856

I get the parts up until the #10. What does the #10 mean and why do the coordinates appear 2 times in the link, once before #10 an once after?

view more: โ€น prev next โ€บ