Skip to content

Trying to use handlr to open the web browser in app mode. #48

Closed Answered by Samueru-sama
Samueru-sama asked this question in Q&A
Discussion options

You must be logged in to vote

Solution found, I was watching the last vid of distrotube and he did an example on how to print the last field after the / with awk, that is all I neede to do lol:

#!/bin/sh

filename=$(echo "$@" | awk -F / '{print $NF}')

# Launch Brave with the specified URL
brave --app="https://pi.ggtyler.dev/$filename" --class="BravePiped" --user-data-dir="$XDG_CONFIG_HOME/BraveSoftware/Brave-Piped"

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Anomalocaridid
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant