commit 0f61198fc8dcb9c3036bb95235544d70e4a245b4
parent 10c22eb6d54aafa5645788570605ab51ab72b33b
Author: Jake Koroman <jakekoroman@gmail.com>
Date: Tue, 23 Jul 2024 19:46:32 -0400
script changes.
Diffstat:
4 files changed, 17 insertions(+), 15 deletions(-)
diff --git a/.config/shell/aliasrc b/.config/shell/aliasrc
@@ -14,7 +14,6 @@ alias nw='$BROWSER --new-window'
alias e='doas emerge'
alias eu='equery uses'
alias em='equery meta'
-alias eb='equery belongs'
alias p='doas pacman'
alias nas='doas mount /media/nas && cd /media/nas'
@@ -23,3 +22,5 @@ alias poweroff='doas /sbin/poweroff'
alias reboot='doas /sbin/reboot'
alias wget="wget --hsts-file=\"$XDG_CACHE_HOME/wget-hsts\""
+
+alias be="v $MENULAUNCHER_DIR/bookmarks"
diff --git a/scripts/bookmarks b/scripts/bookmarks
@@ -2,6 +2,6 @@
readarray -t bookmarks < $MENULAUNCHER_DIR/bookmarks
-url=$(printf '%s\n' "${bookmarks[@]}" | bemenu -p "Bookmark" -w -i -l 8 | sed 's/^.*: //g')
+url=$(printf '%s\n' "${bookmarks[@]}" | wofi_style --show dmenu -p "Bookmark" -i | sed 's/^.*: //g')
-[[ ! -z "$url" ]] && $BROWSER --new-tab $url
+[[ ! -z "$url" ]] && firefox --new-tab $url
diff --git a/scripts/rdp b/scripts/rdp
@@ -1,5 +1,7 @@
#!/bin/sh
+# to be used with the rdpmenu script
+
set -x
if test -z "$1"; then
@@ -7,9 +9,11 @@ if test -z "$1"; then
exit
fi
-if test "$1" = "it-25.miltonhydro.com"
-then
- pass show koromanj@miltonhydro.com | xfreerdp3 /v:"$1" /u:koromanj /d:MILTONHYDRO /size:1920x1080 /dynamic-resolution /from-stdin /cert:tofu
-else
- pass show koromanjadmin | xfreerdp3 /v:"$1" /u:koromanjadmin /d:MILTONHYDRO /size:1920x1080 /dynamic-resolution /from-stdin /cert:tofu /tls:seclevel:0
-fi
+RDP_FILE="$XDG_DATA_HOME/rdp/$1"
+CONN_SETTINGS="/size:1920x1080 /dynamic-resolution /from-stdin /cert:tofu /tls:seclevel:0"
+CONN_SERVER=$(cat $RDP_FILE | grep "server=" | sed "s/server=//")
+CONN_USER=$(cat $RDP_FILE | grep "user=" | sed "s/user=//")
+CONN_PASS=$(cat $RDP_FILE | grep "pass=" | sed "s/pass=//")
+CONN_DOMAIN=$(cat $RDP_FILE | grep "domain=" | sed "s/domain=//")
+
+pass show "$CONN_PASS" | xfreerdp /v:"$CONN_SERVER" /u:"$CONN_USER" /d:"$CONN_DOMAIN" $CONN_SETTINGS
diff --git a/scripts/rdpmenu b/scripts/rdpmenu
@@ -1,8 +1,5 @@
-#!/bin/bash
+#!/bin/sh
-readarray -t servers < $MENULAUNCHER_DIR/rdpmenu
+server=$(echo "$(ls $XDG_DATA_HOME/rdp)" | wofi_style --show dmenu -p "Server" -i -M fuzzy)
-server=$(printf '%s\n' "${servers[@]}" | bemenu -p "Server" -w -i -l 8)
-# server=$(printf '%s\n' "${servers[@]}" | wofi --show dmenu -p "Server" -i)
-
-[[ ! -z "$server" ]] && rdp "$server.miltonhydro.com"
+[[ ! -z "$server" ]] && rdp "$server"