Skip to content

[FEATURE] Keybinding for often used web links #26

@mylinuxforwork

Description

@mylinuxforwork

ORIGINAL FROM https://gitlab.com/sq6gtt

Is your feature request related to a problem? Please describe.
I've added to my config [SUPER]+L to have shortcuts for most used webpages. In my case, it will be shortcuts for my university web pages for each module, notion, etc.

Describe the solution you'd like

#!/bin/bash

# Path to the shortcuts file
SHORTCUTS_FILE="$HOME/.config/hypr/scripts/shortcuts.txt"

# Function to launch a website
launch_website() {
	url=$(grep "^$1:" "$SHORTCUTS_FILE" | cut -d':' -f2- | xargs)
	gio open "$url"
}

# Main
choice=$(cut -d':' -f1 "$SHORTCUTS_FILE" | rofi -dmenu -p "Choose a website:")

[ -z "$choice" ] && exit

launch_website "$choice"

shorcuts.txt contains links in the format:

name1: link1
name2: link2

Additional context
https://gitlab.com/stephan-raabe/dotfiles/-/issues/111

Metadata

Metadata

Labels

enhancementNew feature or request

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions