diff --git a/.memo/hyprland-ricing b/.memo/hyprland-ricing index d3340c5..31823f3 100644 --- a/.memo/hyprland-ricing +++ b/.memo/hyprland-ricing @@ -19,9 +19,8 @@ hyprland-plugin-hyprexpo # scale workspaces and put them in a grid # 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-gnome # not necessary maybe, but just in case -xdg-desktop-portal-gtk # required by nautilus for file picker # terminal emulator(s) kitty # normal terminal @@ -49,17 +48,16 @@ rofi(-wayland) mpv blueman # bluetooth GUI & applet pavucontrol -nautilus # file manager and file picker -sushi # "Quicklook" for nautilus gnome-text-editor # or kwrite, just notepad replacement btop # system monitor activate-linux # :/ polkit-gnome # polkit authentication agent # fonts & themes -maplemono-nf-cn +maplemono-nf-cn / ttf-maplemono-nf-cn-unhinted (archlinuxcn) ttf-font-awesome -meslo font # I installed it manually +ttf-meslo-nerd +ttf-jetbrains-mono-nerd spicetify # spotify tweaks spicetify-maketplace # spotify themes nwg-look # theme of GTK apps diff --git a/.scripts/issu.sh b/.scripts/issu.sh new file mode 100755 index 0000000..303e231 --- /dev/null +++ b/.scripts/issu.sh @@ -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 diff --git a/.scripts/smb-mount.sh b/.scripts/smb-mount.sh index dfd46d7..171a963 100755 --- a/.scripts/smb-mount.sh +++ b/.scripts/smb-mount.sh @@ -1,19 +1,24 @@ #!/bin/sh -[ -z $SMB_CREDENTIALS ] && SMB_CREDENTIALS="$HOME/.smbcredentials" -[ ! -f $SMB_CREDENTIALS ] && exit 1 +path="$(dirname "$(realpath "$0")")" -[ -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) +"$path/issu.sh" || { + echo "Do not run this script in sudo mode." + exit 1 +} + +[ -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" -sudo mount -t cifs //$SMB_HOST/$SMB_DIR "$SMB_MOUNT_POINT" -o credentials=$SMB_CREDENTIALS,uid=$SMB_UID,gid=$SMB_GID - -if [ $? -eq 0 ]; then +if sudo mount -t cifs //"$SMB_HOST"/"$SMB_DIR" "$SMB_MOUNT_POINT" -o credentials="$SMB_CREDENTIALS",uid="$SMB_UID",gid="$SMB_GID"; then echo "Mounted $SMB_HOST/$SMB_DIR at $SMB_MOUNT_POINT" else echo "Failed to mount $SMB_HOST/$SMB_DIR at $SMB_MOUNT_POINT" diff --git a/.scripts/smb-unmount.sh b/.scripts/smb-unmount.sh new file mode 100755 index 0000000..d397dee --- /dev/null +++ b/.scripts/smb-unmount.sh @@ -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 \ No newline at end of file diff --git a/.scripts/wsl-mount.sh b/.scripts/wsl-mount.sh new file mode 100755 index 0000000..ff26c82 --- /dev/null +++ b/.scripts/wsl-mount.sh @@ -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 " && 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" diff --git a/.scripts/wsl-unmount.sh b/.scripts/wsl-unmount.sh new file mode 100755 index 0000000..cd4f666 --- /dev/null +++ b/.scripts/wsl-unmount.sh @@ -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." diff --git a/.scripts/xdph-nuclear.sh b/.scripts/xdph-nuclear.sh new file mode 100755 index 0000000..bea0005 --- /dev/null +++ b/.scripts/xdph-nuclear.sh @@ -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 & diff --git a/hypr/hyprland/keybinds.conf b/hypr/hyprland/keybinds.conf index 0daa9d0..42c25db 100755 --- a/hypr/hyprland/keybinds.conf +++ b/hypr/hyprland/keybinds.conf @@ -4,7 +4,7 @@ #! ##! Apps 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, X, exec, gnome-text-editor --new-window # Launch GNOME Text Editor bind = Super, B, exec, killall btop || ghostty -e btop # Launch btop (system monitor) diff --git a/waybar/style.css b/waybar/style.css index 4927393..ec4e1f7 100644 --- a/waybar/style.css +++ b/waybar/style.css @@ -1,7 +1,7 @@ @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-weight: 900; margin: 0;