diff options
author | Baitinq <manuelpalenzuelamerino@gmail.com> | 2022-06-17 19:09:27 +0200 |
---|---|---|
committer | Baitinq <manuelpalenzuelamerino@gmail.com> | 2022-06-17 19:09:27 +0200 |
commit | ad58b57df7b298bc3e25c578f590d44da3ce36c9 (patch) | |
tree | 28be43da790fa014e13a7284e5a5979537a8721a /patches | |
download | nixos-config-ad58b57df7b298bc3e25c578f590d44da3ce36c9.tar.gz nixos-config-ad58b57df7b298bc3e25c578f590d44da3ce36c9.tar.bz2 nixos-config-ad58b57df7b298bc3e25c578f590d44da3ce36c9.zip |
Initial commit
Diffstat (limited to 'patches')
-rw-r--r-- | patches/dwmbar.patch | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/patches/dwmbar.patch b/patches/dwmbar.patch new file mode 100644 index 0000000..f118c1d --- /dev/null +++ b/patches/dwmbar.patch @@ -0,0 +1,84 @@ +diff --git a/dwmbar b/dwmbar +index ba0de22..f896e0d 100755 +--- a/dwmbar ++++ b/dwmbar +@@ -15,7 +15,7 @@ + + VERSION="1.0" + +-DEFAULT_CONFIG_DIR="/usr/share/dwmbar" ++DEFAULT_CONFIG_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/_dwmbar" + export DEFAULT_CONFIG_DIR + DEFAULT_MODULES_DIR="$DEFAULT_CONFIG_DIR/modules/" + export DEFAULT_MODULES_DIR +@@ -51,7 +51,8 @@ print_help(){ + + copy_usr_to_home(){ + mkdir -p "$CUSTOM_DIR" +- cp -r "$DEFAULT_CONFIG_LOCATION" "$CONFIG_DIR" ++ #cp -r "$DEFAULT_CONFIG_LOCATION" "$CONFIG_DIR" ++ install "$DEFAULT_CONFIG_LOCATION" "$CONFIG_DIR" -m 744 + } + + check_files(){ +@@ -98,6 +99,11 @@ check_internet() { + fi + } + ++if [[ ! -d "$CONFIG_DIR" ]]; then ++ echo "INSTALLING COZ CONFIG DONT EXISTS" ++ copy_usr_to_home ++fi ++ + check_files + + while :; do +diff --git a/install.sh b/install.sh +index c409bd2..26159ba 100755 +--- a/install.sh ++++ b/install.sh +@@ -15,12 +15,8 @@ + # You should have received a copy of the GNU General Public License + # along with this program. If not, see <https://www.gnu.org/licenses/>. + +-DWMBAR="/usr/bin/dwmbar" +- +-if [ "$EUID" -ne 0 ] +- then echo "Please run as root" > /dev/stderr +- exit 1 +-fi ++INSTALL_LOCATION="$1/share" ++BIN_LOCATION="$1/bin" + + if [[ ! -f "dwmbar" ]]; then + echo "dwmbar executable not found." > /dev/stderr +@@ -30,17 +26,17 @@ fi + # Create /usr/share/dwmbar + # Containing example bar.sh and modules + +-mkdir --parents "/usr/share/dwmbar/" ++mkdir --parents "$INSTALL_LOCATION/dwmbar/" + +-echo "./modules --> /usr/share/dwmbar/modules" +-cp -r "./modules" "/usr/share/dwmbar/modules" ++echo "./modules --> $INSTALL_LOCATION/dwmbar/modules" ++cp -r "./modules" "$INSTALL_LOCATION/dwmbar/modules" + +-echo "./bar.sh --> /usr/share/dwmbar/bar.sh" +-cp "./bar.sh" "/usr/share/dwmbar/bar.sh" ++echo "./bar.sh --> $INSTALL_LOCATION/dwmbar/bar.sh" ++cp "./bar.sh" "$INSTALL_LOCATION/dwmbar/bar.sh" + +-echo "./config --> /usr/share/dwmbar/config" +-cp -r "./config" "/usr/share/dwmbar/config" ++echo "./config --> $INSTALL_LOCATION/dwmbar/config" ++cp -r "./config" "$INSTALL_LOCATION/dwmbar/config" + +-echo "./dwmbar --> /usr/bin/dwmbar" +-cp "./dwmbar" "/usr/bin/dwmbar" ++echo "./dwmbar --> $BIN_LOCATION/dwmbar" ++cp "./dwmbar" "$BIN_LOCATION/dwmbar" + [[ $? -eq 0 ]] && echo "Installation completed successfully" +diff --git a/modules/internet b/modules/internet +index 22cbd6a..0b17df1 100755 +Binary files a/modules/internet and b/modules/internet differ |