diff --git a/system-config/dename.sh b/system-config/dename.sh index 4c5dfbe..350dec7 100755 --- a/system-config/dename.sh +++ b/system-config/dename.sh @@ -1,4 +1,36 @@ -#!/bin/bash +#!/usr/bin/env bash + +unamestr=$(uname) +if [ "$unamestr" = 'FreeBSD' ]; then + + DESKTOP="unknown" + + ps -aux | grep -E '[s]tart-hello' + if [ $? -ne 1 ];then + echo "hellosystem" + exit 0 + fi + + ps -aux | grep -E '[o]penbox' + if [ $? -ne 1 ];then + echo "openbox" + exit 0 + fi + + ps -aux | grep -E '[m]ate-panel' + if [ $? -ne 1 ];then + echo "mate" + exit 0 + fi + + ps -aux | grep -E '[x]fce4-session' + if [ $? -ne 1 ];then + echo "xfce" + exit 0 + fi + +fi + function detect_budgie() { diff --git a/system-config/unipkg.sh b/system-config/unipkg.sh index b161804..41ce6c0 100755 --- a/system-config/unipkg.sh +++ b/system-config/unipkg.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash if pkgmgr="$( which apt-get )" 2> /dev/null; then echo "Debian" diff --git a/xkeysnail-config/gnome_logoff.sh b/xkeysnail-config/gnome_logoff.sh index ac772a7..494c732 100755 --- a/xkeysnail-config/gnome_logoff.sh +++ b/xkeysnail-config/gnome_logoff.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash dbus-monitor --session "type='signal',interface='org.gnome.SessionManager.Logout'" | grep '1' | while read x; do # echo "$x" diff --git a/xkeysnail-config/killdups.sh b/xkeysnail-config/killdups.sh index 9bd1605..4439605 100755 --- a/xkeysnail-config/killdups.sh +++ b/xkeysnail-config/killdups.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash xkeycount=$(pgrep 'xkeysnail' | wc -l) diff --git a/xkeysnail-config/prexk.sh b/xkeysnail-config/prexk.sh index 61df280..314dc83 100755 --- a/xkeysnail-config/prexk.sh +++ b/xkeysnail-config/prexk.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash if [ -f {homedir}/.config/systemd/user/keyswap.timer ]; then systemctl --user stop keyswap.timer >/dev/null 2>&1 systemctl --user disable keyswap.timer >/dev/null 2>&1 diff --git a/xkeysnail-config/root_logoff.sh b/xkeysnail-config/root_logoff.sh index d2af6e2..71fe2de 100755 --- a/xkeysnail-config/root_logoff.sh +++ b/xkeysnail-config/root_logoff.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # /usr/local/bin/logoff.sh while true; do w | grep -E "$1.*$2" > /dev/null 2>&1 || (sudo systemctl stop xkeysnail && sudo pkill -f logoff) diff --git a/xkeysnail-config/xkeystart.sh b/xkeysnail-config/xkeystart.sh index bcfffb3..094ba5d 100755 --- a/xkeysnail-config/xkeystart.sh +++ b/xkeysnail-config/xkeystart.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # >/dev/null 2>&1 if [ -f /usr/local/bin/xkeysnail ];then diff --git a/xkeysnail_service.sh b/xkeysnail_service.sh index d1e95cf..7266975 100755 --- a/xkeysnail_service.sh +++ b/xkeysnail_service.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # set about:config?filter=ui.key.menuAccessKeyFocuses # to false for wordwise to work in Firefox @@ -327,8 +327,12 @@ expsh=" " # sudo ./system-config/unipkg.sh inotify-tools # fi if ! [ -x "$(command -v pip3)" ]; then - echo "Will need to install python3-pip..." - sudo ./system-config/unipkg.sh python3-pip + if [ "$distro" == "freebsd" ]; then + sudo python3 -m ensurepip + else + echo "Will need to install python3-pip..." + sudo ./system-config/unipkg.sh python3-pip + fi fi if ! [ -x "$(command -v python3-config)" ]; then if [ "$distro" == "ubuntu" ] || [ "$distro" == "debian" ] || [ "$distro" == 'linuxmint' ]; then