some mount and unmount scripts
This commit is contained in:
@@ -19,9 +19,8 @@ hyprland-plugin-hyprexpo # scale workspaces and put them in a grid
|
|||||||
|
|
||||||
# xdg-desktop-portal*
|
# xdg-desktop-portal*
|
||||||
xdg-desktop-portal
|
xdg-desktop-portal
|
||||||
|
xdg-desktop-portal-kde # Dolphin as file picker (change value of widget.use-xdg-desktop-portal.file-picker in about:config if not working correctly in firefox)
|
||||||
xdg-desktop-portal-hyprland # not working with my Intel iGPU, but fine with NVIDIA dGPU
|
xdg-desktop-portal-hyprland # not working with my Intel iGPU, but fine with NVIDIA dGPU
|
||||||
xdg-desktop-portal-gnome # not necessary maybe, but just in case
|
|
||||||
xdg-desktop-portal-gtk # required by nautilus for file picker
|
|
||||||
|
|
||||||
# terminal emulator(s)
|
# terminal emulator(s)
|
||||||
kitty # normal terminal
|
kitty # normal terminal
|
||||||
@@ -49,17 +48,16 @@ rofi(-wayland)
|
|||||||
mpv
|
mpv
|
||||||
blueman # bluetooth GUI & applet
|
blueman # bluetooth GUI & applet
|
||||||
pavucontrol
|
pavucontrol
|
||||||
nautilus # file manager and file picker
|
|
||||||
sushi # "Quicklook" for nautilus
|
|
||||||
gnome-text-editor # or kwrite, just notepad replacement
|
gnome-text-editor # or kwrite, just notepad replacement
|
||||||
btop # system monitor
|
btop # system monitor
|
||||||
activate-linux # :/
|
activate-linux # :/
|
||||||
polkit-gnome # polkit authentication agent
|
polkit-gnome # polkit authentication agent
|
||||||
|
|
||||||
# fonts & themes
|
# fonts & themes
|
||||||
maplemono-nf-cn
|
maplemono-nf-cn / ttf-maplemono-nf-cn-unhinted (archlinuxcn)
|
||||||
ttf-font-awesome
|
ttf-font-awesome
|
||||||
meslo font # I installed it manually
|
ttf-meslo-nerd
|
||||||
|
ttf-jetbrains-mono-nerd
|
||||||
spicetify # spotify tweaks
|
spicetify # spotify tweaks
|
||||||
spicetify-maketplace # spotify themes
|
spicetify-maketplace # spotify themes
|
||||||
nwg-look # theme of GTK apps
|
nwg-look # theme of GTK apps
|
||||||
|
|||||||
17
.scripts/issu.sh
Executable file
17
.scripts/issu.sh
Executable file
@@ -0,0 +1,17 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if [ "$(id -u)" -eq 0 ]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$SUDO_USER" ]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$LOGNAME" != "$USER" ]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$(ps -o comm= -p $(ps -o ppid= -p $$) 2>/dev/null)" = "su" ]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
@@ -1,19 +1,24 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
[ -z $SMB_CREDENTIALS ] && SMB_CREDENTIALS="$HOME/.smbcredentials"
|
path="$(dirname "$(realpath "$0")")"
|
||||||
[ ! -f $SMB_CREDENTIALS ] && exit 1
|
|
||||||
|
|
||||||
[ -z $SMB_HOST ] && SMB_HOST="10.8.0.1"
|
"$path/issu.sh" || {
|
||||||
[ -z $SMB_DIR ] && SMB_DIR="share"
|
echo "Do not run this script in sudo mode."
|
||||||
[ -z $SMB_MOUNT_POINT ] && SMB_MOUNT_POINT="/mnt/smb"
|
exit 1
|
||||||
[ -z $SMB_UID ] && SMB_UID=$(id -u)
|
}
|
||||||
[ -z $SMB_GID ] && SMB_GID=$(id -g)
|
|
||||||
|
[ -z "$SMB_CREDENTIALS" ] && SMB_CREDENTIALS="$HOME/.smbcredentials"
|
||||||
|
[ ! -f "$SMB_CREDENTIALS" ] && exit 1
|
||||||
|
|
||||||
|
[ -z "$SMB_HOST" ] && SMB_HOST="10.8.0.1"
|
||||||
|
[ -z "$SMB_DIR" ] && SMB_DIR="share"
|
||||||
|
[ -z "$SMB_MOUNT_POINT" ] && SMB_MOUNT_POINT="/mnt/smb"
|
||||||
|
[ -z "$SMB_UID" ] && SMB_UID=$(id -u)
|
||||||
|
[ -z "$SMB_GID" ] && SMB_GID=$(id -g)
|
||||||
|
|
||||||
[ ! -d "$SMB_MOUNT_POINT" ] && sudo mkdir -p "$SMB_MOUNT_POINT"
|
[ ! -d "$SMB_MOUNT_POINT" ] && sudo mkdir -p "$SMB_MOUNT_POINT"
|
||||||
|
|
||||||
sudo mount -t cifs //$SMB_HOST/$SMB_DIR "$SMB_MOUNT_POINT" -o credentials=$SMB_CREDENTIALS,uid=$SMB_UID,gid=$SMB_GID
|
if sudo mount -t cifs //"$SMB_HOST"/"$SMB_DIR" "$SMB_MOUNT_POINT" -o credentials="$SMB_CREDENTIALS",uid="$SMB_UID",gid="$SMB_GID"; then
|
||||||
|
|
||||||
if [ $? -eq 0 ]; then
|
|
||||||
echo "Mounted $SMB_HOST/$SMB_DIR at $SMB_MOUNT_POINT"
|
echo "Mounted $SMB_HOST/$SMB_DIR at $SMB_MOUNT_POINT"
|
||||||
else
|
else
|
||||||
echo "Failed to mount $SMB_HOST/$SMB_DIR at $SMB_MOUNT_POINT"
|
echo "Failed to mount $SMB_HOST/$SMB_DIR at $SMB_MOUNT_POINT"
|
||||||
|
|||||||
9
.scripts/smb-unmount.sh
Executable file
9
.scripts/smb-unmount.sh
Executable file
@@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
[ -z "$SMB_MOUNT_POINT" ] && SMB_MOUNT_POINT="/mnt/smb"
|
||||||
|
|
||||||
|
if sudo umount "$SMB_MOUNT_POINT" && sudo rmdir "$SMB_MOUNT_POINT"; then
|
||||||
|
echo "Unmounted and removed mount point $SMB_MOUNT_POINT"
|
||||||
|
else
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
29
.scripts/wsl-mount.sh
Executable file
29
.scripts/wsl-mount.sh
Executable file
@@ -0,0 +1,29 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
path="$(dirname "$(realpath "$0")")"
|
||||||
|
|
||||||
|
"$path/issu.sh" || {
|
||||||
|
echo "Do not run this script in sudo mode."
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
[ -z "$1" ] && echo "Usage: $0 <VHDX_PATH>" && exit 1
|
||||||
|
|
||||||
|
vhdx_path="$1"
|
||||||
|
|
||||||
|
[ -z "$2" ] && mount_point="/mnt/wsl" || mount_point="$2"
|
||||||
|
|
||||||
|
[ -d "$mount_point" ] || sudo mkdir -p "$mount_point"
|
||||||
|
|
||||||
|
username=$(whoami)
|
||||||
|
|
||||||
|
sudo chown "$username:$username" "$mount_point"
|
||||||
|
|
||||||
|
export LIBGUESTFS_BACKEND=direct
|
||||||
|
|
||||||
|
guestmount --add "$vhdx_path" --inspector --ro "$mount_point" || {
|
||||||
|
echo "Failed to mount VHDX file."
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "Successfully mounted $vhdx_path to $mount_point"
|
||||||
15
.scripts/wsl-unmount.sh
Executable file
15
.scripts/wsl-unmount.sh
Executable file
@@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
[ -z "$1" ] && mount_point="/mnt/wsl" || mount_point="$1"
|
||||||
|
|
||||||
|
sudo umount "$mount_point" || {
|
||||||
|
echo "Failed to unmount $mount_point. It may not be mounted or you may not have the necessary permissions."
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
sudo rmdir "$mount_point" || {
|
||||||
|
echo "Failed to remove the mount point directory $mount_point. It may not be empty or you may not have the necessary permissions."
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "Successfully unmounted and removed $mount_point."
|
||||||
8
.scripts/xdph-nuclear.sh
Executable file
8
.scripts/xdph-nuclear.sh
Executable file
@@ -0,0 +1,8 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
sleep 1
|
||||||
|
killall -e xdg-desktop-portal-hyprland
|
||||||
|
killall -e xdg-desktop-portal-wlr
|
||||||
|
killall xdg-desktop-portal
|
||||||
|
/usr/lib/xdg-desktop-portal-hyprland &
|
||||||
|
sleep 2
|
||||||
|
/usr/lib/xdg-desktop-portal &
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
#!
|
#!
|
||||||
##! Apps
|
##! Apps
|
||||||
bind = Super, C, exec, code --password-store=gnome-libsecret # Launch VSCode (editor)
|
bind = Super, C, exec, code --password-store=gnome-libsecret # Launch VSCode (editor)
|
||||||
bind = Super, E, exec, nautilus --new-window # Launch Dolphin (file manager)
|
bind = Super, E, exec, dolphin --new-window # Launch Dolphin (file manager)
|
||||||
bind = Super, W, exec, firefox --new-window # Launch Firefox
|
bind = Super, W, exec, firefox --new-window # Launch Firefox
|
||||||
bind = Super, X, exec, gnome-text-editor --new-window # Launch GNOME Text Editor
|
bind = Super, X, exec, gnome-text-editor --new-window # Launch GNOME Text Editor
|
||||||
bind = Super, B, exec, killall btop || ghostty -e btop # Launch btop (system monitor)
|
bind = Super, B, exec, killall btop || ghostty -e btop # Launch btop (system monitor)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
@import 'mocha.css';
|
@import 'mocha.css';
|
||||||
|
|
||||||
* {
|
* {
|
||||||
font-family: 'Font Awesome 6 Free', 'Maple Mono NF CN ExtraLight', 'Noto Sans', Arial, sans-serif;
|
font-family: 'Font Awesome 6 Free Regular', 'Maple Mono NF CN ExtraLight', 'Noto Sans', Arial, sans-serif;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
font-weight: 900;
|
font-weight: 900;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user