From 47d0c6d5f199798fb807e7fc78c25ddc9eb0241f Mon Sep 17 00:00:00 2001 From: "Matthieu Fortin [CPC/CCP]" Date: Tue, 12 Nov 2024 14:10:14 -0500 Subject: [PATCH] added --- hypr/.config/waybar/config.jsonc | 11 +++++++++-- hypr/.config/waybar/style.css | 6 +++++- scripts/.local/bin/mountnas | 20 ++++++++++++++++++++ 3 files changed, 34 insertions(+), 3 deletions(-) create mode 100755 scripts/.local/bin/mountnas diff --git a/hypr/.config/waybar/config.jsonc b/hypr/.config/waybar/config.jsonc index 6b9646e..44ae28b 100644 --- a/hypr/.config/waybar/config.jsonc +++ b/hypr/.config/waybar/config.jsonc @@ -8,6 +8,7 @@ "height": 40, "modules-left": [ "custom/launcher", + "custom/hostname", "hyprland/workspaces" ], "modules-center": ["hyprland/window"], @@ -22,10 +23,16 @@ "idle_inhibitor", "pulseaudio", "pulseaudio#microphone", - "clock", - "custom/power", + "clock" +// "custom/power", ], + "custom/hostname" :{ + "format": "{}", + "return-type":"text", + "exec": "hostnamectl hostname" + }, + "custom/updates": { "format": "{} {icon}", "return-type": "json", diff --git a/hypr/.config/waybar/style.css b/hypr/.config/waybar/style.css index 5553000..9d91f75 100644 --- a/hypr/.config/waybar/style.css +++ b/hypr/.config/waybar/style.css @@ -52,6 +52,7 @@ window#waybar { #tray, #custom-updates, #custom-launcher, +#custom-hostname, #backlight { background: #1e1e2e; padding: 0px 10px; @@ -64,10 +65,13 @@ window#waybar { border-radius: 10px 0px 0px 10px; } -#custom-launcher { +#custom-launcher {} + +#custom-hostname { border-top-right-radius: 10px; border-bottom-right-radius: 10px; } + #tray { border-radius: 10px; margin-right: 10px; diff --git a/scripts/.local/bin/mountnas b/scripts/.local/bin/mountnas new file mode 100755 index 0000000..3f1d831 --- /dev/null +++ b/scripts/.local/bin/mountnas @@ -0,0 +1,20 @@ +#!/bin/bash + +#SMB_SHARE="//172.31.180.13/TCLI_Courses" +SMB_SHARE="//172.31.180.13/TCLI_Courses" +MOUNT_POINT="$HOME/TCLI_Courses" +#USER="mfortin" +#PASSWORD="New42d@y" + +if [ ! -d "$MOUNT_POINT" ]; then + mkdir -p "$MOUNT_POINT" +fi + +#sudo mount -t cifs "$SMB_SHARE" "$MOUNT_POINT" -o username="$USER",password="$PASSWORD",gid=1000,uid=1000 +sudo mount -t cifs "$SMB_SHARE" "$MOUNT_POINT" -o credentials=~/.config/credentials + +if mountpoint -q "$MOUNT_POINT"; then + echo "Successfully mounted $SMB_SHARE at $MOUNT_POINT" +else + echo "Failed to mount $SMB_SHARE" +fi