diff --git a/.local/bin/station-cmd-present b/.local/bin/station-cmd-present new file mode 100755 index 0000000..bcbfc51 --- /dev/null +++ b/.local/bin/station-cmd-present @@ -0,0 +1,9 @@ +#!/bin/bash + +# Returns true if all the commands passed in as arguments exit on the system. + +for cmd in "$@"; do + command -v "$cmd" &>/dev/null || exit 1 +done + +exit 0 diff --git a/.local/bin/station-launch-audio b/.local/bin/station-launch-audio new file mode 100755 index 0000000..b38f7df --- /dev/null +++ b/.local/bin/station-launch-audio @@ -0,0 +1,5 @@ +#!/bin/bash + +# Launch the audio controls TUI (provided by wiremix). + +station-launch-or-focus-tui wiremix diff --git a/.local/bin/station-launch-bluetooth b/.local/bin/station-launch-bluetooth new file mode 100755 index 0000000..2a0be1f --- /dev/null +++ b/.local/bin/station-launch-bluetooth @@ -0,0 +1,7 @@ +#!/bin/bash + +# Launch the bluetooth controls TUI (provided by bluetui). +# Also attempts to unblock bluetooth service if rfkill had blocked it. + +rfkill unblock bluetooth +exec station-launch-or-focus-tui bluetui diff --git a/.local/bin/station-launch-editor b/.local/bin/station-launch-editor new file mode 100755 index 0000000..65f9864 --- /dev/null +++ b/.local/bin/station-launch-editor @@ -0,0 +1,15 @@ +#!/bin/bash + +# Launch the default editor as determined by $EDITOR (set via ~/.config/uwsm/default) (or nvim if missing). +# Starts suitable editors in a terminal window and otherwise as a regular application. + +station-cmd-present "$EDITOR" || EDITOR=nvim + +case "$EDITOR" in + nvim | vim | nano | micro | hx | helix | fresh) + exec station-launch-tui "$EDITOR" "$@" + ;; + *) + exec setsid uwsm-app -- "$EDITOR" "$@" + ;; +esac diff --git a/.local/bin/station-launch-or-focus b/.local/bin/station-launch-or-focus new file mode 100755 index 0000000..6e7615a --- /dev/null +++ b/.local/bin/station-launch-or-focus @@ -0,0 +1,19 @@ +#!/bin/bash + +# Launch or focus on a given command identified by the passed in window-pattern. +# Use by some default bindings, like the one for Spotify, to ensure there is only one instance of the application open. + +if (($# == 0)); then + echo "Usage: station-launch-or-focus [window-pattern] [launch-command]" + exit 1 +fi + +WINDOW_PATTERN="$1" +LAUNCH_COMMAND="${2:-"uwsm-app -- $WINDOW_PATTERN"}" +WINDOW_ADDRESS=$(hyprctl clients -j | jq -r --arg p "$WINDOW_PATTERN" '.[]|select((.class|test("\\b" + $p + "\\b";"i")) or (.title|test("\\b" + $p + "\\b";"i")))|.address' | head -n1) + +if [[ -n $WINDOW_ADDRESS ]]; then + hyprctl dispatch focuswindow "address:$WINDOW_ADDRESS" +else + eval exec setsid $LAUNCH_COMMAND +fi diff --git a/.local/bin/station-launch-or-focus-tui b/.local/bin/station-launch-or-focus-tui new file mode 100755 index 0000000..271b6d2 --- /dev/null +++ b/.local/bin/station-launch-or-focus-tui @@ -0,0 +1,9 @@ +#!/bin/bash + +# Launch or focus on a given TUI identified by the passed in as the command. +# Use by commands like station-launch-wifi to ensure there is only one wifi configuration screen open. + +APP_ID="org.station.$(basename "$1")" +LAUNCH_COMMAND="station-launch-tui $@" + +exec station-launch-or-focus "$APP_ID" "$LAUNCH_COMMAND" diff --git a/.local/bin/station-launch-or-focus-webapp b/.local/bin/station-launch-or-focus-webapp new file mode 100755 index 0000000..a36bbfd --- /dev/null +++ b/.local/bin/station-launch-or-focus-webapp @@ -0,0 +1,15 @@ +#!/bin/bash + +# Launch or focus on a given web app identified by the window-pattern. +# Use by some default bindings, like the one for WhatsApp, to ensure there is only one instance of the application open. + +if (($# == 0)); then + echo "Usage: station-launch-or-focus-webapp [window-pattern] [url-and-flags...]" + exit 1 +fi + +WINDOW_PATTERN="$1" +shift +LAUNCH_COMMAND="station-launch-webapp $@" + +exec station-launch-or-focus "$WINDOW_PATTERN" "$LAUNCH_COMMAND" diff --git a/.local/bin/station-launch-tui b/.local/bin/station-launch-tui new file mode 100755 index 0000000..46cfd56 --- /dev/null +++ b/.local/bin/station-launch-tui @@ -0,0 +1,5 @@ +#!/bin/bash + +# Launch the TUI command passed in as an argument in the default terminal with an org.station.COMMAND app id for styling. + +exec setsid uwsm-app -- xdg-terminal-exec --app-id=org.station.$(basename $1) -e "$1" "${@:2}" diff --git a/.local/bin/station-launch-webapp b/.local/bin/station-launch-webapp new file mode 100755 index 0000000..607ef6c --- /dev/null +++ b/.local/bin/station-launch-webapp @@ -0,0 +1,12 @@ +#!/bin/bash + +# Launch the passed in URL as a web app in the default browser (or chromium if the default doesn't support --app). + +browser=$(xdg-settings get default-web-browser) + +case $browser in +google-chrome* | brave-browser* | microsoft-edge* | opera* | vivaldi* | helium*) ;; +*) browser="chromium.desktop" ;; +esac + +exec setsid uwsm-app -- $(sed -n 's/^Exec=\([^ ]*\).*/\1/p' {~/.local,~/.nix-profile,/usr}/share/applications/$browser 2>/dev/null | head -1) --app="$1" "${@:2}" diff --git a/.local/bin/station-launch-wifi b/.local/bin/station-launch-wifi new file mode 100755 index 0000000..cd0b5b0 --- /dev/null +++ b/.local/bin/station-launch-wifi @@ -0,0 +1,7 @@ +#!/bin/bash + +# Launch the Omarchy wifi controls (provided by the Impala TUI). +# Attempts to unblock the wifi service first in case it should be been blocked. + +rfkill unblock wifi +station-launch-or-focus-tui impala diff --git a/.local/bin/station-webapp-handler-zoom b/.local/bin/station-webapp-handler-zoom new file mode 100755 index 0000000..883b136 --- /dev/null +++ b/.local/bin/station-webapp-handler-zoom @@ -0,0 +1,20 @@ +#!/bin/bash + +url="$1" +web_url="https://app.zoom.us/wc/home" + +if [[ $url =~ ^zoom(mtg|us):// ]]; then + confno=$(echo "$url" | sed -n 's/.*[?&]confno=\([^&]*\).*/\1/p') + + if [[ -n $confno ]]; then + pwd=$(echo "$url" | sed -n 's/.*[?&]pwd=\([^&]*\).*/\1/p') + + if [[ -n $pwd ]]; then + web_url="https://app.zoom.us/wc/join/$confno?pwd=$pwd" + else + web_url="https://app.zoom.us/wc/join/$confno" + fi + fi +fi + +exec station-launch-webapp "$web_url" diff --git a/.local/share/applications/Agenda.desktop b/.local/share/applications/Agenda.desktop new file mode 100644 index 0000000..00a712a --- /dev/null +++ b/.local/share/applications/Agenda.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Version=1.0 +Name=Agenda +Comment=Agenda +Exec=station-launch-webapp https://tower.scarif.space/app/calendar +Terminal=false +Type=Application +Icon=/home/chris/.local/share/applications/icons/Agenda.png +StartupNotify=true diff --git a/.local/share/applications/Discord.desktop b/.local/share/applications/Discord.desktop new file mode 100644 index 0000000..b1c9130 --- /dev/null +++ b/.local/share/applications/Discord.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Version=1.0 +Name=Discord +Comment=Discord +Exec=station-launch-webapp https://discord.com/channels/@me +Terminal=false +Type=Application +Icon=/home/chris/.local/share/applications/icons/Discord.png +StartupNotify=true diff --git a/.local/share/applications/Droid.desktop b/.local/share/applications/Droid.desktop new file mode 100644 index 0000000..73be817 --- /dev/null +++ b/.local/share/applications/Droid.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Version=1.0 +Name=Droid +Comment=Droid +Exec=station-launch-webapp https://droid.scarif.space +Terminal=false +Type=Application +Icon=/home/chris/.local/share/applications/icons/Droid.png +StartupNotify=true diff --git a/.local/share/applications/Gemini.desktop b/.local/share/applications/Gemini.desktop new file mode 100644 index 0000000..db9d558 --- /dev/null +++ b/.local/share/applications/Gemini.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Version=1.0 +Name=Gemini +Comment=Gemini +Exec=station-launch-webapp https://gemini.google.com +Terminal=false +Type=Application +Icon=/home/chris/.local/share/applications/icons/Gemini.png +StartupNotify=true diff --git a/.local/share/applications/GitHub.desktop b/.local/share/applications/GitHub.desktop new file mode 100644 index 0000000..683bcf0 --- /dev/null +++ b/.local/share/applications/GitHub.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Version=1.0 +Name=GitHub +Comment=GitHub +Exec=station-launch-webapp https://github.com +Terminal=false +Type=Application +Icon=/home/chris/.local/share/applications/icons/GitHub.png +StartupNotify=true diff --git a/.local/share/applications/Google Maps.desktop b/.local/share/applications/Google Maps.desktop new file mode 100644 index 0000000..59f83ac --- /dev/null +++ b/.local/share/applications/Google Maps.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Version=1.0 +Name=Google Maps +Comment=Google Maps +Exec=station-launch-webapp https://maps.google.com +Terminal=false +Type=Application +Icon=/home/chris/.local/share/applications/icons/Google Maps.png +StartupNotify=true diff --git a/.local/share/applications/Labs.desktop b/.local/share/applications/Labs.desktop new file mode 100644 index 0000000..7c1f40f --- /dev/null +++ b/.local/share/applications/Labs.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Version=1.0 +Name=Labs +Comment=Labs +Exec=station-launch-webapp https://labs.scarif.space +Terminal=false +Type=Application +Icon=/home/chris/.local/share/applications/icons/Labs.png +StartupNotify=true diff --git a/.local/share/applications/Plans.desktop b/.local/share/applications/Plans.desktop new file mode 100644 index 0000000..8ca9ac5 --- /dev/null +++ b/.local/share/applications/Plans.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Version=1.0 +Name=Plans +Comment=Plans +Exec=station-launch-webapp https://tower.scarif.space/apps/tasks +Terminal=false +Type=Application +Icon=/home/chris/.local/share/applications/icons/Plans.png +StartupNotify=true diff --git a/.local/share/applications/Tower.desktop b/.local/share/applications/Tower.desktop new file mode 100644 index 0000000..9e4b793 --- /dev/null +++ b/.local/share/applications/Tower.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Version=1.0 +Name=Tower +Comment=Tower +Exec=station-launch-webapp https://tower.scarif.space +Terminal=false +Type=Application +Icon=/home/chris/.local/share/applications/icons/Tower.png +StartupNotify=true diff --git a/.local/share/applications/WhatsApp.desktop b/.local/share/applications/WhatsApp.desktop new file mode 100644 index 0000000..fb54b21 --- /dev/null +++ b/.local/share/applications/WhatsApp.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Version=1.0 +Name=WhatsApp +Comment=WhatsApp +Exec=station-launch-webapp https://web.whatsapp.com +Terminal=false +Type=Application +Icon=/home/chris/.local/share/applications/icons/WhatsApp +StartupNotify=true diff --git a/.local/share/applications/Youtube.desktop b/.local/share/applications/Youtube.desktop new file mode 100644 index 0000000..342d303 --- /dev/null +++ b/.local/share/applications/Youtube.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Version=1.0 +Name=Youtube +Comment=Youtube +Exec=station-launch-webapp https://youtube.com +Terminal=false +Type=Application +Icon=/home/chris/.local/share/applications/icons/YouTube.png +StartupNotify=true diff --git a/.local/share/applications/Zoom.desktop b/.local/share/applications/Zoom.desktop new file mode 100644 index 0000000..37aa339 --- /dev/null +++ b/.local/share/applications/Zoom.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Version=1.0 +Name=Youtube +Comment=Youtube +Exec=station-webapp-handler-zoom https://app.zoom.us/wc/home +Terminal=false +Type=Application +Icon=/home/chris/.local/share/applications/icons/Zoom.png +StartupNotify=true +MimeType=x-scheme-handler/zoommtg;x-scheme-handler/zoomus diff --git a/.local/share/applications/icons/Agenda.png b/.local/share/applications/icons/Agenda.png new file mode 100644 index 0000000..d5080c2 Binary files /dev/null and b/.local/share/applications/icons/Agenda.png differ diff --git a/.local/share/applications/icons/Discord.png b/.local/share/applications/icons/Discord.png new file mode 100644 index 0000000..a82dbc6 Binary files /dev/null and b/.local/share/applications/icons/Discord.png differ diff --git a/.local/share/applications/icons/Disk Usage.png b/.local/share/applications/icons/Disk Usage.png new file mode 100644 index 0000000..6cc55ba Binary files /dev/null and b/.local/share/applications/icons/Disk Usage.png differ diff --git a/.local/share/applications/icons/Droid.svg b/.local/share/applications/icons/Droid.svg new file mode 100644 index 0000000..36a536d --- /dev/null +++ b/.local/share/applications/icons/Droid.svg @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.local/share/applications/icons/Gemini.png b/.local/share/applications/icons/Gemini.png new file mode 100644 index 0000000..c3991bb Binary files /dev/null and b/.local/share/applications/icons/Gemini.png differ diff --git a/.local/share/applications/icons/GitHub.png b/.local/share/applications/icons/GitHub.png new file mode 100644 index 0000000..5a4295c Binary files /dev/null and b/.local/share/applications/icons/GitHub.png differ diff --git a/.local/share/applications/icons/Google Maps.png b/.local/share/applications/icons/Google Maps.png new file mode 100644 index 0000000..f4fc834 Binary files /dev/null and b/.local/share/applications/icons/Google Maps.png differ diff --git a/.local/share/applications/icons/Labs.svg b/.local/share/applications/icons/Labs.svg new file mode 100644 index 0000000..4329134 --- /dev/null +++ b/.local/share/applications/icons/Labs.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.local/share/applications/icons/Plans.png b/.local/share/applications/icons/Plans.png new file mode 100644 index 0000000..3a6cbee Binary files /dev/null and b/.local/share/applications/icons/Plans.png differ diff --git a/.local/share/applications/icons/Tower.png b/.local/share/applications/icons/Tower.png new file mode 100644 index 0000000..fcc7f7d Binary files /dev/null and b/.local/share/applications/icons/Tower.png differ diff --git a/.local/share/applications/icons/WhatsApp.png b/.local/share/applications/icons/WhatsApp.png new file mode 100644 index 0000000..10ecdfb Binary files /dev/null and b/.local/share/applications/icons/WhatsApp.png differ diff --git a/.local/share/applications/icons/YouTube.png b/.local/share/applications/icons/YouTube.png new file mode 100644 index 0000000..46ed4ca Binary files /dev/null and b/.local/share/applications/icons/YouTube.png differ diff --git a/.local/share/applications/icons/Zoom.png b/.local/share/applications/icons/Zoom.png new file mode 100644 index 0000000..622db52 Binary files /dev/null and b/.local/share/applications/icons/Zoom.png differ diff --git a/.local/share/applications/icons/imv.png b/.local/share/applications/icons/imv.png new file mode 100644 index 0000000..f9cac35 Binary files /dev/null and b/.local/share/applications/icons/imv.png differ