diff --git a/.bashrc b/.bashrc index d4cde4f..770cc3c 100644 --- a/.bashrc +++ b/.bashrc @@ -19,10 +19,10 @@ export EDITOR=nvim # ----------------------------------------------------- # ALIASES # ----------------------------------------------------- - alias c='clear' -alias nf='neofetch' -alias pf='pfetch' +alias nf='fastfetch' +alias pf='fastfetch' +alias ff='fastfetch' alias ls='eza -a --icons' alias ll='eza -al --icons' alias lt='eza -a --tree --level=1 --icons' @@ -37,8 +37,17 @@ alias rw='~/dotfiles/waybar/reload.sh' alias winclass="xprop | grep 'CLASS'" alias dot="cd ~/dotfiles" alias cleanup='~/dotfiles/scripts/cleanup.sh' + +# ----------------------------------------------------- +# ML4W Apps +# ----------------------------------------------------- alias ml4w='~/dotfiles/apps/ML4W_Welcome-x86_64.AppImage' alias ml4w-settings='~/dotfiles/apps/ML4W_Dotfiles_Settings-x86_64.AppImage' +alias ml4w-sidebar='~/dotfiles/eww/ml4w-sidebar/launch.sh' +alias ml4w-hyprland='~/dotfiles/apps/ML4W_Hyprland_Settings-x86_64.AppImage' +alias ml4w-diagnosis='~/dotfiles/hypr/scripts/diagnosis.sh' +alias ml4w-hyprland-diagnosis='~/dotfiles/hypr/scripts/diagnosis.sh' +alias ml4w-qtile-diagnosis='~/dotfiles/qtile/scripts/diagnosis.sh' # ----------------------------------------------------- # Window Managers @@ -50,7 +59,6 @@ alias Qtile='startx' # ----------------------------------------------------- # GIT # ----------------------------------------------------- - alias gs="git status" alias ga="git add" alias gc="git commit -m" @@ -64,7 +72,6 @@ alias gcredential="git config credential.helper store" # ----------------------------------------------------- # SCRIPTS # ----------------------------------------------------- - alias gr='python ~/dotfiles/scripts/growthrate.py' alias ChatGPT='python ~/mychatgpt/mychatgpt.py' alias chat='python ~/mychatgpt/mychatgpt.py' @@ -73,14 +80,12 @@ alias ascii='~/dotfiles/scripts/figlet.sh' # ----------------------------------------------------- # VIRTUAL MACHINE # ----------------------------------------------------- - alias vm='~/private/launchvm.sh' alias lg='~/dotfiles/scripts/looking-glass.sh' # ----------------------------------------------------- # EDIT CONFIG FILES # ----------------------------------------------------- - alias confq='$EDITOR ~/dotfiles/qtile/config.py' alias confp='$EDITOR ~/dotfiles/picom/picom.conf' alias confb='$EDITOR ~/dotfiles/.bashrc' @@ -88,13 +93,11 @@ alias confb='$EDITOR ~/dotfiles/.bashrc' # ----------------------------------------------------- # EDIT NOTES # ----------------------------------------------------- - alias notes='$EDITOR ~/notes.txt' # ----------------------------------------------------- # SYSTEM # ----------------------------------------------------- - alias update-grub='sudo grub-mkconfig -o /boot/grub/grub.cfg' alias setkb='setxkbmap de;echo "Keyboard set back to de."' @@ -124,12 +127,12 @@ eval "$(starship init bash)" cat ~/.cache/wal/sequences # ----------------------------------------------------- -# PFETCH if on wm +# Fastfetch if on wm # ----------------------------------------------------- -echo "" if [[ $(tty) == *"pts"* ]]; then - pfetch + fastfetch --config examples/13 else + echo if [ -f /bin/qtile ]; then echo "Start Qtile X11 with command Qtile" fi diff --git a/.install/apps.sh b/.install/apps.sh index 7c0ede1..9320358 100755 --- a/.install/apps.sh +++ b/.install/apps.sh @@ -21,4 +21,12 @@ sed -i "s|HOME|${HOME}|g" $HOME/dotfiles/apps/ml4w-dotfiles-settings.desktop cp $HOME/dotfiles/apps/ml4w-dotfiles-settings.desktop $HOME/.local/share/applications echo ":: ML4W Dotfiles Settings App installed successfully" -echo \ No newline at end of file +sed -i "s|HOME|${HOME}|g" $HOME/dotfiles/apps/ml4w-hyprland-settings.desktop +cp $HOME/dotfiles/apps/ml4w-hyprland-settings.desktop $HOME/.local/share/applications +echo ":: ML4W Hyprland Settings App installed successfully" +echo +if [ -f ~/.config/ml4w-hyprland-settings/hyprctl.sh ] ;then + echo ":: Starting restore from ML4W Hyprland Settings App" + ~/.config/ml4w-hyprland-settings/hyprctl.sh +fi +echo \ No newline at end of file diff --git a/.install/backup.sh b/.install/backup.sh index 877270d..3f1070a 100755 --- a/.install/backup.sh +++ b/.install/backup.sh @@ -44,6 +44,9 @@ if [ -d ~/dotfiles ] || ! test -L ~/.bashrc || [ -d ~/.config/hypr ] || [ -d ~/. if ! test -L ~/.config/hypr && [ -d ~/.config/hypr ] ;then echo " - $HOME/.config/hypr/" fi + if ! test -L ~/.config/ml4w-hyprland-settings && [ -d ~/.config/ml4w-hyprland-settings ] ;then + echo " - $HOME/.config/ml4w-hyprland-settings/" + fi if ! test -L ~/.config/rofi && [ -d ~/.config/rofi ] ;then echo " - $HOME/.config/rofi/" fi @@ -77,7 +80,7 @@ if [ -d ~/dotfiles ] || ! test -L ~/.bashrc || [ -d ~/.config/hypr ] || [ -d ~/. if ! test -L ~/.config/swappy && [ -d ~/.config/swappy ] ;then echo " - $HOME/.config/swappy/" fi - + echo # Start Backup if gum confirm "Do you want to create a backup?" ;then @@ -107,6 +110,10 @@ if [ -d ~/dotfiles ] || ! test -L ~/.bashrc || [ -d ~/.config/hypr ] || [ -d ~/. cp -r ~/.config/hypr ~/dotfiles-versions/backup/config echo ":: Backup of $HOME/.config/hypr created in ~/dotfiles-versions/backup/config/" fi + if ! test -L ~/.config/ml4w-hyprland-settings && [ -d ~/.config/ml4w-hyprland-settings ] ;then + cp -r ~/.config/ml4w-hyprland-settings ~/dotfiles-versions/backup/config + echo ":: Backup of $HOME/.config/ml4w-hyprland-settings created in ~/dotfiles-versions/backup/config/" + fi if ! test -L ~/.config/qtile && [ -d ~/.config/rofi ] ;then cp -r ~/.config/rofi ~/dotfiles-versions/backup/config echo ":: Backup of $HOME/.config/rofi created in ~/dotfiles-versions/backup/config/" diff --git a/.install/bashrc.sh b/.install/bashrc.sh index 65db75b..f297daa 100755 --- a/.install/bashrc.sh +++ b/.install/bashrc.sh @@ -11,8 +11,9 @@ fi if [ -f ~/dotfiles-versions/backups/$datets/.bashrc-old ]; then echo "Backup is already available here ~/dotfiles-versions/backups/$datets/.bashrc-old" fi +echo if [ ! -L ~/.bashrc ] && [ -f ~/.bashrc ]; then - bash_confirm="Do you want to replace your existing .bashrc file with the dotfiles .bashrc file?" + bash_confirm="Do you want to replace your existing .bashrc file with the ML4W dotfiles .bashrc file?" if gum confirm "$bash_confirm" ;then rm ~/.bashrc _installSymLink .bashrc ~/.bashrc ~/dotfiles/.bashrc ~/.bashrc @@ -22,7 +23,7 @@ if [ ! -L ~/.bashrc ] && [ -f ~/.bashrc ]; then echo "Installation of the .bashrc file skipped." fi else - bash_confirm="Do you want to install the dotfiles .bashrc file now?" + bash_confirm="Do you want to install the ML4W dotfiles .bashrc file now?" if gum confirm "$bash_confirm" ;then if [ -L ~/.bashrc ] || [ -f ~/.bashrc ]; then rm ~/.bashrc diff --git a/.install/cleanup.sh b/.install/cleanup.sh index 2de7c8b..ca1ddc5 100644 --- a/.install/cleanup.sh +++ b/.install/cleanup.sh @@ -36,6 +36,17 @@ if [ -d ~/dotfiles/hypr/settings/ ] ;then echo ":: ~/dotfiles/hypr/settings removed." fi +if [ -f ~/dotfiles/.settings/eww-monitor.sh ] ;then + if grep -q "echo" $HOME/dotfiles/.settings/eww-monitor.sh ; then + rm ~/dotfiles/.settings/eww-monitor.sh + echo ":: ~/dotfiles/.settings/eww-monitor.sh removed." + fi +fi + +# Replace pfetch and neofetch with fastfetch +sed -i "s/pfetch/fastfetch/g" ~/dotfiles/.bashrc +sed -i "s/neofetch/fastfetch/g" ~/dotfiles/.bashrc + # Create default folder structure xdg-user-dirs-update echo diff --git a/.install/confirm-start.sh b/.install/confirm-start.sh index db66c1a..4599bf5 100644 --- a/.install/confirm-start.sh +++ b/.install/confirm-start.sh @@ -2,7 +2,6 @@ # Confirm Start # ------------------------------------------------------ -echo "You can cancel the installation at any time with CTRL + C" SCRIPT=$(realpath "$0") SCRIPTPATH=$(dirname "$SCRIPT") if [ $SCRIPTPATH = "/home/$USER/dotfiles" ]; then @@ -18,7 +17,8 @@ if [ ! -d ~/dotfiles ];then if gum confirm "DO YOU WANT TO START THE INSTALLATION OF THE ML4W DOTFILES NOW?" ;then echo "Installation started." elif [ $? -eq 130 ]; then - exit 130 + echo ":: Installation canceled." + exit 130 else echo ":: Installation canceled." exit; @@ -27,7 +27,8 @@ else if gum confirm "DO YOU WANT TO START THE UPDATE OF YOUR ML4W DOTFILES NOW?" ;then echo ":: Update started." elif [ $? -eq 130 ]; then - exit 130 + echo ":: Update canceled." + exit 130 else echo ":: Update canceled." exit; diff --git a/.install/copy.sh b/.install/copy.sh index 262b81f..0f090ef 100644 --- a/.install/copy.sh +++ b/.install/copy.sh @@ -13,22 +13,23 @@ fi if [ ! -d ~/dotfiles ]; then echo "The script will now remove existing directories and files from ~/.config/" echo "and copy your prepared configuration from ~/dotfiles-versions/$version to ~/dotfiles" -echo "" +echo echo "Symbolic links will then be created from ~/dotfiles into your ~/.config/ directory." -echo "" +echo fi if [[ ! $(tty) == *"pts"* ]] && [ -d ~/dotfiles ]; then echo "You're running the script in tty. You can delete the existing ~/dotfiles folder now for a clean installation." echo "If not, the script will overwrite existing files but will not remove additional files or folders of your custom configuration." - echo "" + echo else if [ -d ~/dotfiles ]; then echo "The script will overwrite existing files but will not remove additional files or folders from your custom configuration." + echo fi fi if [ ! -d ~/dotfiles ]; then echo "PLEASE BACKUP YOUR EXISTING CONFIGURATIONS in .config IF NEEDED!" - echo "" + echo fi if gum confirm "Do you want to install the prepared dotfiles now?" ;then @@ -50,8 +51,10 @@ if gum confirm "Do you want to install the prepared dotfiles now?" ;then echo "Skipped: DEV MODE!" fi elif [ $? -eq 130 ]; then - exit 130 + echo ":: Installation canceled" + exit 130 else + echo ":: Installation canceled" exit fi -echo "" +echo diff --git a/.install/diagnosis.sh b/.install/diagnosis.sh new file mode 100644 index 0000000..7cd6f8e --- /dev/null +++ b/.install/diagnosis.sh @@ -0,0 +1,28 @@ +echo -e "${GREEN}" +figlet "System check" +echo -e "${NONE}" + +echo "The system check will test that essential packages and " +echo "execution commands are available now on your system." +echo +if gum confirm "Do you want to run a short system check?" ;then + + _folderExists "$HOME/dotfiles" "Please repeat the installation." + _commandExists "rofi" "rofi-wayland" + _commandExists "dunst" "dunst" + _commandExists "waybar" "waybar" + _commandExists "hyprpaper" "hyprpaper" + _commandExists "hyprlock" "hyprpaper" + _commandExists "hypridle" "hyprpaper" + _commandExists "wal" "python-pywal" + _commandExists "gum" "gum" + _commandExists "wlogout" "wlogout" + _commandExists "eww" "eww" + _commandExists "magick" "imagemagick" + +elif [ $? -eq 130 ]; then + exit 130 +else + echo ":: System check skipped" +fi +echo "" \ No newline at end of file diff --git a/.install/displaymanager.sh b/.install/displaymanager.sh index 4ea9791..93d54fb 100755 --- a/.install/displaymanager.sh +++ b/.install/displaymanager.sh @@ -2,6 +2,7 @@ # Disable display manager # ------------------------------------------------------ disman=0 +profile="Hyprland" echo -e "${GREEN}" figlet "Display Manager" echo -e "${NONE}" @@ -30,72 +31,94 @@ if [ ! -d ~/dotfiles ];then disman=0 echo "You have already installed a display manager on your system." echo "How do you want to proceed?" - dmsel=$(gum choose "Keep current setup" "Deactivate current display manager" "Install sddm") + echo + dmsel=$(gum choose "Keep current setup" "Deactivate current display manager" "Install sddm and theme") else disman=1 echo "There is no display manager installed on your system." echo "After the installation/update of the dotfiles, you can start Hyprland with command Hyprland and Qtile with commmand Qtile (or startx)." echo "How do you want to proceed?" - dmsel=$(gum choose "Keep current setup" "Install sddm") + echo + dmsel=$(gum choose "Keep current setup" "Install sddm and theme") fi else if [ -f /etc/systemd/system/display-manager.service ]; then disman=0 echo "You have already installed a display manager. If your display manager is working fine, you can keep the current setup." echo "How do you want to proceed?" - dmsel=$(gum choose "Keep current setup" "Deactivate current display manager" "Install sddm") + echo + dmsel=$(gum choose "Keep current setup" "Deactivate current display manager" "Install sddm and theme") else disman=1 echo "There is no display manager installed on your system. You're starting Hyprland/Qtile with commands on tty." echo "How do you want to proceed?" - dmsel=$(gum choose "Keep current setup" "Install sddm") + echo + dmsel=$(gum choose "Keep current setup" "Install sddm and theme") fi fi if [ -z "${dmsel}" ] ;then - echo "Installation canceled." + echo ":: Installation canceled." exit fi -if [ "$dmsel" == "Install sddm" ] ;then +if [ "$dmsel" == "Install sddm and theme" ] ;then disman=0 # Try to force the installation of sddm - echo "Install sddm" - yay -S --noconfirm sddm sddm-sugar-candy-git --ask 4 + echo ":: Install sddm" + yay -S --noconfirm sddm --ask 4 + # Enable sddm if [ -f /etc/systemd/system/display-manager.service ]; then sudo rm /etc/systemd/system/display-manager.service fi sudo systemctl enable sddm.service + # Create sddm.conf.d folder if [ ! -d /etc/sddm.conf.d/ ]; then sudo mkdir /etc/sddm.conf.d - echo "Folder /etc/sddm.conf.d created." + echo ":: Folder /etc/sddm.conf.d created." fi + # Copy sddm.conf sudo cp sddm/sddm.conf /etc/sddm.conf.d/ - echo "File /etc/sddm.conf.d/sddm.conf updated." + echo ":: File /etc/sddm.conf.d/sddm.conf updated." + # Download and install sugar candy theme if not exists + if [ ! -d /usr/share/sddm/themes/sugar-candy ]; then + if [ -f ~/Downloads/sddm-sugar-candy-master.zip ] ;then + rm ~/Downloads/sddm-sugar-candy-master.zip + fi + wget -P ~/Downloads/ https://framagit.org/MarianArlt/sddm-sugar-candy/-/archive/master/sddm-sugar-candy-master.zip + if [ -f ~/Downloads/sddm-sugar-candy-master.zip ] ;then + unzip -o -q ~/Downloads/sddm-sugar-candy-master.zip -d ~/Downloads/ + if [ ! -d /usr/share/sddm/themes/sugar-candy ] ;then + sudo mkdir -p /usr/share/sddm/themes/sugar-candy + fi + sudo cp -r ~/Downloads/sddm-sugar-candy-master/* /usr/share/sddm/themes/sugar-candy + echo ":: SDDM Sugar Candy Theme installed" + else + echo "ERROR: Sugar Candy Download not found" + fi + fi + + # Install background wallpaper for sddm if [ -f /usr/share/sddm/themes/sugar-candy/theme.conf ]; then - - # Cache file for holding the current wallpaper sudo cp wallpapers/default.jpg /usr/share/sddm/themes/sugar-candy/Backgrounds/current_wallpaper.jpg - echo "Default wallpaper copied into /usr/share/sddm/themes/sugar-candy/Backgrounds/" - + echo ":: Default wallpaper copied into /usr/share/sddm/themes/sugar-candy/Backgrounds/" sudo cp sddm/theme.conf /usr/share/sddm/themes/sugar-candy/ sudo sed -i 's/CURRENTWALLPAPER/'"current_wallpaper.jpg"'/' /usr/share/sddm/themes/sugar-candy/theme.conf - echo "File theme.conf updated in /usr/share/sddm/themes/sugar-candy/" - + echo ":: File theme.conf updated in /usr/share/sddm/themes/sugar-candy/" fi elif [ "$dmsel" == "Deactivate current display manager" ] ;then sudo rm /etc/systemd/system/display-manager.service - echo "Current display manager deactivated." + echo ":: Current display manager deactivated." disman=1 elif [ "$dmsel" == "Keep current setup" ] ;then - echo "Keep current setup." + echo ":: sddm setup skipped." else - echo "Keep current setup." + echo ":: sddm setup skipped." fi diff --git a/.install/hook.sh b/.install/hook.sh index 99b2597..b792377 100755 --- a/.install/hook.sh +++ b/.install/hook.sh @@ -6,9 +6,13 @@ echo -e "${GREEN}" figlet "Hook" echo -e "${NONE}" echo ":: The script has detected a hook.sh script." + echo if gum confirm "Do you want to run the script now?"; then source ~/dotfiles-versions/hook.sh echo ":: hook.sh executed!" + elif [ $? -eq 130 ]; then + echo ":: Installation canceled." + exit 130 else echo ":: Execution of hook.sh skipped." fi diff --git a/.install/hyprland-dotfiles.sh b/.install/hyprland-dotfiles.sh index c916962..022afc4 100644 --- a/.install/hyprland-dotfiles.sh +++ b/.install/hyprland-dotfiles.sh @@ -37,5 +37,11 @@ fi if [ -d ~/dotfiles-versions/$version/swappy ]; then _installSymLink swappy ~/.config/swappy ~/dotfiles/swappy/ ~/.config fi +if [ -d ~/dotfiles-versions/$version/swappy ]; then + _installSymLink eww ~/.config/eww ~/dotfiles/eww/ ~/.config +fi +if [ -d ~/dotfiles-versions/$version/fastfetch ]; then + _installSymLink fastfetch ~/.config/fastfetch ~/dotfiles/fastfetch/ ~/.config +fi echo ":: Symbolic links created." -echo \ No newline at end of file +echo diff --git a/.install/includes/excludes.txt b/.install/includes/excludes.txt index 3d894e2..363c9f5 100644 --- a/.install/includes/excludes.txt +++ b/.install/includes/excludes.txt @@ -6,4 +6,5 @@ gtk README.md CHANGELOG LICENSE -install.sh \ No newline at end of file +install.sh +setup.sh \ No newline at end of file diff --git a/.install/includes/library.sh b/.install/includes/library.sh index 2d0e938..660807a 100755 --- a/.install/includes/library.sh +++ b/.install/includes/library.sh @@ -272,4 +272,26 @@ _replaceLineInFile() { echo "ERROR: Target file not found." sleep 2 fi +} + +# ------------------------------------------------------ +# System check +# ------------------------------------------------------ + +_commandExists() { + package="$1"; + if ! type $package > /dev/null 2>&1; then + echo ":: ERROR: $package doesn't exists. Please install it with yay -S $2" + else + echo ":: OK: $package command found." + fi +} + +_folderExists() { + folder="$1"; + if [ ! -d $folder ]; then + echo ":: ERROR: $folder doesn't exists. $2" + else + echo ":: OK: $folder found." + fi } \ No newline at end of file diff --git a/.install/installer.sh b/.install/installer.sh index 24e19e4..9caa70f 100644 --- a/.install/installer.sh +++ b/.install/installer.sh @@ -7,10 +7,11 @@ echo -e "${NONE}" if [ -d ~/dotfiles ] ;then echo "Do you want to check for new packages only (faster installation)" echo "or do you want to reinstall all packages again? (more robust and can help to fix issues)" + echo if gum confirm "How do you want to proceed?" --affirmative "New packages only" --negative "Force reinstallation" ;then force_install=0 elif [ $? -eq 130 ]; then - echo "Installation canceled." + echo ":: Installation canceled." exit 130 else force_install=1 @@ -18,10 +19,11 @@ if [ -d ~/dotfiles ] ;then else echo "Do you want to reinstall all already installed packages and install the required new packages? (recommended and more robust)" echo "or do you want to install the new required packages only? (could be faster installation)" + echo if gum confirm "How do you want to proceed?" --affirmative "Reinstall all packages" --negative "Install new packages only" ;then force_install=1 elif [ $? -eq 130 ]; then - echo "Installation canceled." + echo ":: Installation canceled." exit 130 else force_install=0 diff --git a/.install/keyboard.sh b/.install/keyboard.sh index 0db08db..7069c50 100755 --- a/.install/keyboard.sh +++ b/.install/keyboard.sh @@ -6,48 +6,85 @@ echo -e "${GREEN}" figlet "Keyboard" echo -e "${NONE}" -# Default layout and variants -keyboard_layout="us" - -_setupKeyboardLayout() { - echo "" - echo "Start typing = Search, RETURN = Confirm, CTRL-C = Cancel" - keyboard_layout=$(localectl list-x11-keymap-layouts | gum filter --height 15 --placeholder "Find your keyboard layout...") - echo "" - echo ":: Keyboard layout changed to $keyboard_layout" - echo "" - _confirmKeyboard -} - -_confirmKeyboard() { - echo "Current selected keyboard setup:" - echo "Keyboard layout: $keyboard_layout" - if gum confirm "Do you want proceed with this keyboard setup?" --affirmative "Proceed" --negative "Change" ;then - return 0 - elif [ $? -eq 130 ]; then - exit 130 - else - _setupKeyboardLayout - fi -} - +setkeyboard=0 if [ "$restored" == "1" ]; then echo ":: You have already restored your settings into the new installation." -else + echo "You can repeat the keyboard setup again to choose between a desktop and laptop optimized configuration." + echo + if gum confirm "Do you want to setup your keyboard again?" ;then + setkeyboard=0 + elif [ $? -eq 130 ]; then + echo ":: Installation canceled." + exit 130 + else + echo ":: Keyboard setup skipped." + setkeyboard=1 + fi +fi + +if [ "$setkeyboard" == "0" ] ;then + + # Default layout and variants + keyboard_layout="us" + keyboard_variant="" + + _setupKeyboardLayout() { + keyboard_layout=$(localectl list-x11-keymap-layouts | gum filter --height 15 --placeholder "Find your keyboard layout...") + echo ":: Keyboard layout changed to $keyboard_layout" + _setupKeyboardVariant + } + + _setupKeyboardVariant() { + if gum confirm "Do you want to set a variant of the keyboard?" ; then + keyboard_variant=$(localectl list-x11-keymap-variants | gum filter --height 15 --placeholder "Find your keyboard layout...") + echo ":: Keyboard variant changed to $keyboard_variant" + fi + _confirmKeyboard + } + + _confirmKeyboard() { + echo + echo "Current selected keyboard setup:" + echo "Keyboard layout: $keyboard_layout" + echo "Keyboard variant: $keyboard_variant" + echo + if gum confirm "Do you want proceed with this keyboard setup?" --affirmative "Proceed" --negative "Change" ;then + return 0 + elif [ $? -eq 130 ]; then + exit 130 + else + _setupKeyboardLayout + fi + } + _confirmKeyboard - - cp .install/templates/keyboard.conf ~/dotfiles-versions/$version/hypr/conf/keyboard.conf + + if gum confirm "Are you using a laptop and would you like to enable the laptop presets?"; then + cp .install/templates/keyboard-laptop.conf ~/dotfiles-versions/$version/hypr/conf/keyboard.conf + echo "source = ~/dotfiles/hypr/conf/layouts/laptop.conf" > ~/dotfiles-versions/$version/hypr/conf/layout.conf + elif [ $? -eq 130 ]; then + echo ":: Installation canceled." + exit 130 + else + cp .install/templates/keyboard-default.conf ~/dotfiles-versions/$version/hypr/conf/keyboard.conf + fi cp .install/templates/autostart.sh ~/dotfiles-versions/$version/qtile/autostart.sh SEARCH="KEYBOARD_LAYOUT" REPLACE="$keyboard_layout" sed -i "s/$SEARCH/$REPLACE/g" ~/dotfiles-versions/$version/hypr/conf/keyboard.conf + SEARCH="KEYBOARD_VARIANT" + REPLACE="$keyboard_variant" + sed -i "s/$SEARCH/$REPLACE/g" ~/dotfiles-versions/$version/hypr/conf/keyboard.conf + SEARCH="KEYBOARD_LAYOUT" REPLACE="$keyboard_layout" sed -i "s/$SEARCH/$REPLACE/g" ~/dotfiles-versions/$version/qtile/autostart.sh - echo "" - echo ":: Keyboard setup updated successfully." + echo + echo ":: Keyboard setup complete." + echo echo "PLEASE NOTE: You can update your keyboard layout later in ~/dotfiles/hypr/conf/keyboard.conf" -fi + +fi diff --git a/.install/neovim.sh b/.install/neovim.sh old mode 100644 new mode 100755 index 9e78bd8..662368b --- a/.install/neovim.sh +++ b/.install/neovim.sh @@ -6,9 +6,14 @@ if [ -d ~/dotfiles/nvim ]; then echo -e "${GREEN}" figlet "Neovim" echo -e "${NONE}" - if gum confirm "Do you want to install the ML4W Neovim configuration and overwrite your existing configuration?"; then + echo ":: The script has detected a nvim folder." + echo + if gum confirm "Do you want to install the ML4W Neovim configuration?"; then echo ":: ML4W Neovim configuration will be installed" neovim=1 + elif [ $? -eq 130 ]; then + echo ":: Installation canceled." + exit 130 else rm -rf ~/dotfiles-versions/$version/nvim/ echo ":: Installation of ML4W Neovim configuration skipped." diff --git a/.install/packages/general-packages.sh b/.install/packages/general-packages.sh index 027b799..a58d718 100644 --- a/.install/packages/general-packages.sh +++ b/.install/packages/general-packages.sh @@ -11,8 +11,8 @@ packagesPacman=( "dunst" "starship" "mpv" - "freerdp" - "thunar" + "thunar" + "nautilus" "mousepad" "noto-fonts" "otf-font-awesome" @@ -26,9 +26,10 @@ packagesPacman=( "python-psutil" "python-rich" "python-click" + "python-pywal" + "python-gobject" "pavucontrol" "tumbler" - "blueman" "papirus-icon-theme" "breeze-icons" "polkit-gnome" @@ -38,6 +39,7 @@ packagesPacman=( "nm-connection-editor" "gvfs" "xdg-user-dirs" + "xdg-desktop-portal-gtk" "networkmanager" "network-manager-applet" "xarchiver" @@ -46,17 +48,18 @@ packagesPacman=( "fuse2" "gtk4" "libadwaita" - "python-pywal" "xdg-desktop-portal" "qalculate-gtk" "imagemagick" "guvcview" + "jq" + "rofi-wayland" + "fastfetch" + "blueman" ); packagesYay=( - "pfetch" "bibata-cursor-theme" "trizen" "pacseek" - "rofi-lbonn-wayland" ); diff --git a/.install/packages/hyprland-packages.sh b/.install/packages/hyprland-packages.sh index acf57d0..f0274f5 100644 --- a/.install/packages/hyprland-packages.sh +++ b/.install/packages/hyprland-packages.sh @@ -1,19 +1,19 @@ packagesPacman=( "hyprland" "hyprpaper" + "hyprlock" + "hypridle" "xdg-desktop-portal-hyprland" "waybar" "grim" "slurp" "swappy" "cliphist" - "hyprlock" - "hypridle" ); packagesYay=( - "swww" "wlogout" "nwg-look" - "emote" + "eww" + "hyprshade" ); diff --git a/.install/paralleldownloads.sh b/.install/paralleldownloads.sh new file mode 100755 index 0000000..cb2be44 --- /dev/null +++ b/.install/paralleldownloads.sh @@ -0,0 +1,55 @@ +#!/bin/bash +# ------------------------------------------------------ +# Activate parallel downloads +# ------------------------------------------------------ + +# Search for the line containing "ParallelDownloads = 5" +line=$(grep "ParallelDownloads = 5" /etc/pacman.conf) + +# Check if the line starts with a '#' character +if [[ $line == \#* ]]; then + echo -e "${GREEN}" + figlet "Downloads" + echo -e "${NONE}" + echo ":: You can activate parallel downloads in pacman.conf to speedup the download of packages?" + if gum confirm "Do you want to activate parallel downloads?"; then + + # Remove the '#' character from the beginning of the line + echo ":: Modifying pacman.conf to enable parallel downloads." + new_line=$(echo $line | sed 's/^#//') + + # Replace the original line with the new line in the configuration file + sudo sed -i "s/$line/$new_line/g" /etc/pacman.conf + + # Display a message indicating that the line was modified + echo ":: Modified line: $new_line" + elif [ $? -eq 130 ]; then + exit + else + echo ":: Activation of parallel downloads skipped." + fi +else + # Check if the line is already uncommented + if [[ $line == ParallelDownloads\ =\ 5 ]]; then + # Display a message indicating that the line does not need to be modified + echo ":: pacman.conf already optimized for parallel downloads." + else + # Display a message indicating that the line is missing or commented out + echo ":: Parallel downloads could not be activated. Required configuration in /etc/pacman.conf could not found." + fi +fi + +# Activate Color in pacman.conf +if grep -Fxq "#Color" /etc/pacman.conf +then + sudo sed -i 's/^#Color/Color/' /etc/pacman.conf + echo ":: Color activated in pacman.conf" +else + echo ":: Color is already activated in pacman.conf" +fi +if grep -Fxq "# Color" /etc/pacman.conf +then + sudo sed -i 's/^# Color/Color/' /etc/pacman.conf + echo ":: Color activated in pacman.conf" +fi +echo \ No newline at end of file diff --git a/.install/profile.sh b/.install/profile.sh index 8acaadd..0c5ec58 100755 --- a/.install/profile.sh +++ b/.install/profile.sh @@ -4,13 +4,13 @@ echo -e "${GREEN}" figlet "Profile" echo -e "${NONE}" - -echo "SPACE = select/unselect a profile. RETURN = confirm. No selection = CANCEL" +echo "Please select your installation profile." +echo profile=$(gum choose --no-limit --cursor-prefix "( ) " --selected-prefix "(x) " --unselected-prefix "( ) " "Hyprland" "Qtile") if [ -z "${profile}" ] ;then - echo "No profile selected. Installation canceled." + echo ":: No profile selected. Installation canceled." exit else - echo "Profile/s selected:" $profile + echo ":: Profile/s selected:" $profile fi diff --git a/.install/reboot.sh b/.install/reboot.sh index 7f59583..709f2c6 100644 --- a/.install/reboot.sh +++ b/.install/reboot.sh @@ -6,9 +6,9 @@ echo -e "${GREEN}" figlet "Reboot" echo -e "${NONE}" echo "A reboot of your system is recommended." +echo if gum confirm "Do you want to reboot your system now?" ;then - echo ":: Rebooting now ..." - sleep 3 + gum spin --spinner dot --title "Rebooting now..." -- sleep 3 systemctl reboot elif [ $? -eq 130 ]; then exit 130 diff --git a/.install/remove.sh b/.install/remove.sh index 925dbf7..e71a3e9 100755 --- a/.install/remove.sh +++ b/.install/remove.sh @@ -28,6 +28,13 @@ if [[ $(_isInstalledYay "swaylock-effects-git") == 0 ]]; then echo fi +# Remove rofi-lbonn-wayland +if [[ $(_isInstalledYay "rofi-lbonn-wayland") == 0 ]]; then + yay --noconfirm -Rns rofi-lbonn-wayland + echo ":: rofi-lbonn-wayland removed" + echo +fi + # Remove hypridle-bin if [[ $(_isInstalledYay "hypridle-git") == 0 ]]; then yay --noconfirm -Rns hypridle-git @@ -40,7 +47,7 @@ if [[ $(_isInstalledYay "hypridle-git") == 0 ]]; then echo fi -# Remove hypridle-bin +# Remove hyprlock-bin if [[ $(_isInstalledYay "hyprlock-git") == 0 ]]; then yay --noconfirm -Rns hyprlock-git if [ -f /usr/lib/debug/usr/bin/hyprlock.debug ] ;then diff --git a/.install/restore.sh b/.install/restore.sh index 5149141..c51db35 100755 --- a/.install/restore.sh +++ b/.install/restore.sh @@ -8,8 +8,7 @@ monitorrestored=0 _showRestoreOptions() { echo "The following configurations can be transferred into the new installation." - echo "(SPACE = select/unselect a profile. RETURN = confirm. ESC/No selection = Skip Restore)" - echo "" + echo restorelist="" if [ -f ~/dotfiles/.bashrc ]; then restorelist+="~/dotfiles/.bashrc " @@ -43,6 +42,10 @@ _showRestoreOptions() { restorelist+="~/dotfiles/hypr/conf/environment.conf " selectedlist+="~/dotfiles/hypr/conf/environment.conf," fi + if [ -f ~/dotfiles/hypr/conf/layout.conf ] && [ -d ~/dotfiles/hypr/conf/layouts/ ]; then + restorelist+="~/dotfiles/hypr/conf/layout.conf " + selectedlist+="~/dotfiles/hypr/conf/layout.conf," + fi if [ -f ~/dotfiles/hypr/conf/windowrule.conf ] && [ -d ~/dotfiles/hypr/conf/windowrules/ ]; then restorelist+="~/dotfiles/hypr/conf/windowrule.conf " selectedlist+="~/dotfiles/hypr/conf/windowrule.conf," @@ -88,7 +91,7 @@ _showRestoreOptions() { echo "No files selected to restore." confirmrestore=$(gum choose "Change restore" "Skip restore") if [ -z "${confirmrestore}" ] ;then - echo "Installation canceled." + echo ":: Installation canceled." exit fi if [ "$confirmrestore" == "Change restore" ]; then @@ -151,6 +154,12 @@ _startRestore() { echo ":: Hyprland environment.conf restored!" fi fi + if [[ $restoreselect == *"~/dotfiles/hypr/conf/layout.conf"* ]] || [[ $restoreselect == *"All"* ]] ; then + if [ -f ~/dotfiles/hypr/conf/layout.conf ]; then + cp ~/dotfiles/hypr/conf/layout.conf ~/dotfiles-versions/$version/hypr/conf/ + echo ":: Hyprland layout.conf restored!" + fi + fi if [[ $restoreselect == *"~/dotfiles/hypr/conf/windowrule.conf"* ]] || [[ $restoreselect == *"All"* ]] ; then if [ -f ~/dotfiles/hypr/conf/windowrule.conf ]; then cp ~/dotfiles/hypr/conf/windowrule.conf ~/dotfiles-versions/$version/hypr/conf/ diff --git a/.install/settings.sh b/.install/settings.sh index 3daf5ea..491a0cb 100644 --- a/.install/settings.sh +++ b/.install/settings.sh @@ -1,8 +1,10 @@ if [ "$restored" == "1" ]; then - echo -e "${GREEN}" - figlet "Restore Settings" - echo -e "${NONE}" - python .install/restore.py + if [ -f ~/dotfiles/.settings/settings.json ] ;then + echo -e "${GREEN}" + figlet "Restore Settings" + echo -e "${NONE}" + python .install/restore.py + fi else if [ -f ~/dotfiles/.settings/settings.json ] ;then rm ~/dotfiles/.settings/settings.json diff --git a/.install/templates/keyboard.conf b/.install/templates/keyboard-default.conf similarity index 73% rename from .install/templates/keyboard.conf rename to .install/templates/keyboard-default.conf index 6bed3fa..0a346ab 100644 --- a/.install/templates/keyboard.conf +++ b/.install/templates/keyboard-default.conf @@ -4,7 +4,7 @@ # ----------------------------------------------------- input { kb_layout = KEYBOARD_LAYOUT - kb_variant = + kb_variant = KEYBOARD_VARIANT kb_model = kb_options = numlock_by_default = true @@ -18,7 +18,13 @@ input { follow_mouse = 1 touchpad { + # for desktop natural_scroll = false + + # for laptop + # natural_scroll = yes + # middle_button_emulation = true + # clickfinger_behavior = 1 } sensitivity = 0 # -1.0 - 1.0, 0 means no modification. } diff --git a/.install/templates/keyboard-laptop.conf b/.install/templates/keyboard-laptop.conf new file mode 100644 index 0000000..e7cab35 --- /dev/null +++ b/.install/templates/keyboard-laptop.conf @@ -0,0 +1,30 @@ +# ----------------------------------------------------- +# Keyboard Layout +# https://wiki.hyprland.org/Configuring/Variables/#input +# ----------------------------------------------------- +input { + kb_layout = KEYBOARD_LAYOUT + kb_variant = KEYBOARD_VARIANT + kb_model = + kb_options = + numlock_by_default = true + mouse_refocus=false + + # For United States + # kb_layout = us + # kb_variant = intl + # kb_model = pc105 + # kb_options = + + follow_mouse = 1 + touchpad { + # for desktop + # natural_scroll = false + + # for laptop + natural_scroll = yes + middle_button_emulation = true + clickfinger_behavior = 1 + } + sensitivity = 0 # -1.0 - 1.0, 0 means no modification. +} diff --git a/.install/updatesystem.sh b/.install/updatesystem.sh index e3891a7..05973c8 100644 --- a/.install/updatesystem.sh +++ b/.install/updatesystem.sh @@ -6,12 +6,14 @@ echo -e "${GREEN}" figlet "System Update" echo -e "${NONE}" echo "It's important that your system is up-to-date before you proceed." +echo if gum confirm "Do you want to update your system with yay now?" ;then echo ":: Update started" yay elif [ $? -eq 130 ]; then + echo ":: Installation canceled." exit 130 -else +else echo ":: System update skipped" fi echo diff --git a/.install/vm.sh b/.install/vm.sh index 8fae350..0b4dd91 100755 --- a/.install/vm.sh +++ b/.install/vm.sh @@ -4,6 +4,7 @@ echo -e "${GREEN}" figlet "KVM VM" echo -e "${NONE}" echo "The script has detected that you run the installation in a KVM virtual machine." + echo if grep -Fxq "kvm.conf" ~/dotfiles-versions/$version/hypr/conf/environment.conf then echo ":: KVM Environment already set." diff --git a/.install/yay.sh b/.install/yay.sh index 9ca0f0b..6a84464 100644 --- a/.install/yay.sh +++ b/.install/yay.sh @@ -1,12 +1,12 @@ # ------------------------------------------------------ # Check if yay is installed # ------------------------------------------------------ -echo -e "${GREEN}" -figlet "yay" -echo -e "${NONE}" if sudo pacman -Qs yay > /dev/null ; then echo ":: yay is already installed!" else + echo -e "${GREEN}" + figlet "yay" + echo -e "${NONE}" echo ":: yay is not installed. Starting the installation!" _installPackagesPacman "base-devel" SCRIPT=$(realpath "$0") @@ -18,4 +18,4 @@ else cd $temp_path echo ":: yay has been installed successfully." fi -echo "" \ No newline at end of file +echo \ No newline at end of file diff --git a/.settings/eww-monitor.sh b/.settings/eww-monitor.sh new file mode 100755 index 0000000..4d18c3e --- /dev/null +++ b/.settings/eww-monitor.sh @@ -0,0 +1 @@ +auto \ No newline at end of file diff --git a/.settings/filemanager.sh b/.settings/filemanager.sh index af8fd0e..9f0175d 100755 --- a/.settings/filemanager.sh +++ b/.settings/filemanager.sh @@ -1 +1 @@ -thunar \ No newline at end of file +nautilus \ No newline at end of file diff --git a/.settings/hyprshade.sh b/.settings/hyprshade.sh new file mode 100644 index 0000000..c0cdbd8 --- /dev/null +++ b/.settings/hyprshade.sh @@ -0,0 +1 @@ +hyprshade_filter="blue-light-filter" \ No newline at end of file diff --git a/.settings/wallpaper-effect.sh b/.settings/wallpaper-effect.sh new file mode 100644 index 0000000..cfb931e --- /dev/null +++ b/.settings/wallpaper-effect.sh @@ -0,0 +1 @@ +off diff --git a/.settings/wallpaper-engine.sh b/.settings/wallpaper-engine.sh index 16f3d37..b6923b6 100644 --- a/.settings/wallpaper-engine.sh +++ b/.settings/wallpaper-engine.sh @@ -1 +1 @@ -swww \ No newline at end of file +hyprpaper \ No newline at end of file diff --git a/.settings/wallpaper-folder.sh b/.settings/wallpaper-folder.sh new file mode 100644 index 0000000..8d138d1 --- /dev/null +++ b/.settings/wallpaper-folder.sh @@ -0,0 +1,2 @@ +# Enter the path to the folder that includes your wallpapers +wallpaper_folder=$HOME/wallpaper \ No newline at end of file diff --git a/.version/name b/.version/name index 0409c16..a46b5cb 100644 --- a/.version/name +++ b/.version/name @@ -1 +1 @@ -2.8.4 \ No newline at end of file +2.9.1.1 \ No newline at end of file diff --git a/.version/version b/.version/version index 7f9ce49..f8cc4c9 100644 --- a/.version/version +++ b/.version/version @@ -1 +1 @@ -2840 \ No newline at end of file +2911 \ No newline at end of file diff --git a/CHANGELOG b/CHANGELOG.md similarity index 78% rename from CHANGELOG rename to CHANGELOG.md index 3c15f35..2cb6682 100644 --- a/CHANGELOG +++ b/CHANGELOG.md @@ -1,3 +1,45 @@ +Version 2.9.1.1 +https://gitlab.com/stephan-raabe/dotfiles/-/releases/2.9.1.1 +-------------------------------------------------------- +- New installation method for sddm sugar candy theme. Instead of using yay, the installer will download the ZIP from the repository, extract it to the Downloads folder and copy the files to the destination folder. +- A gamemode can be toggled with SUPER+ALT+G. The gaming mode will disable the animations and blur. +- Added a black ML4W Icon for black waybar themes + +Version 2.9.1 +https://gitlab.com/stephan-raabe/dotfiles/-/releases/2.9.1 +-------------------------------------------------------- +- Hyprpaper is the default wallpaper engine. swww will not be installed by the installer anymore. You can still switch to swww in the Dotfiles Settings App (System tab) but you need to install swww manually with yay -S swww +- pfetch has been replaced with fastfetch (requires an update of the .bashrc) https://gitlab.com/stephan-raabe/dotfiles/-/issues/315 +- Directory for wallpapers can be customized with new .settings/wallpaper-folder.sh https://gitlab.com/stephan-raabe/dotfiles/-/issues/325 +- Screen shading possible with hyprshade. SUPER+SHIFT+S to toggle hyprshade. The shader can be defined with the shader module in waybar or in ~/dotfiles/.settings/hyprshade.sh +For auto-activation at a dedicated time please set the filter to off and follow the instructions here https://github.com/loqusion/hyprshade. https://gitlab.com/stephan-raabe/dotfiles/-/issues/329 +- Nautilus defined as the new default file manager. Thunar is still available. +- Waybar can be toggles with SUPER+CTRL+B https://gitlab.com/stephan-raabe/dotfiles/-/issues/299 +- Installation script optimized for new gum +- During the installation of the keyboard, it can be selected between a desktop and laptop optimized configuration https://gitlab.com/stephan-raabe/dotfiles/-/issues/319. +- RDP launch script updated https://gitlab.com/stephan-raabe/dotfiles/-/issues/336 +- Nvidia environment configuration updated https://gitlab.com/stephan-raabe/dotfiles/-/issues/327 +- Pacman can be configured for parallel downloads, colors and more during the installation and with the ML4W Settings app https://gitlab.com/stephan-raabe/dotfiles/-/issues/316 +- Image conversions with imagemagick can be enabled for wallpapers. Right click on wallpaper module in waybar. You can add more effects in ~/dotfiles/hypr/effects/wallpaper +- ChatGPT Window opens on the left screen side in floating mode +- New default wallpaper +- Added hypridle inhibitor waybar module to toggle screen locking with hyprlock +- Tooltips added to all waybar modules + +Version 2.9 +https://gitlab.com/stephan-raabe/dotfiles/-/releases/2.9 +-------------------------------------------------------- +- New Hyprland Settings App. Can be launched from the App Launcher, the ML4W Welcome App or the new ML4W logo context menu (right click) +- Added sidebar menu. Start with click on ML4W Logo in Waybar. Right click starts the welcome app +- Updated hyprlock screen showing the wallpaper in a circle. hyprlock 3 required +- Waybar Taskbar Module hidden by default. Can be enabled again in the ML4W Settings App +- Hyprpaper is now the default wallpaper engine. swww can be activiated +- Animations can be disabled in the Dotfiles Settings app +- Animations can be toggled (enabled/disabled) temporarily with SUPER + SHIFT + A +- Keyboard layout is part of the system information module of waybar +- nm-applet can be started from the ML4W Welcome App menu Settings/System +- New diagnosis features checks that essential command are available. Enter ml4w-diagnosis in a terminal or from the ML4W Welcome App + Version 2.8.4 https://gitlab.com/stephan-raabe/dotfiles/-/releases/2.8.4 -------------------------------------------------------- diff --git a/README.md b/README.md index 024e181..f9265d1 100644 --- a/README.md +++ b/README.md @@ -1,473 +1,53 @@ -# ML4W Dotfiles 2.8.4 +# ML4W Dotfiles 2.9.1.1 -An advanced configuration of Hyprland and Qtile for Arch Linux based distributions. This package includes an installation script to install and setup the required components. +An advanced configuration of Hyprland for Arch Linux based distributions. This package includes an installation script to install and setup the required components. -[![Screenshot](screenshots/v284/screenshot-284-1.png "Title Text")](screenshots/v283/screenshot-284-1.png) +[![Screenshot](screenshots/screenshot2.png "Screenshot")](screenshots/screenshot2.png) The ML4W Dotfiles are available as - main release (Official release): [https://gitlab.com/stephan-raabe/dotfiles](https://gitlab.com/stephan-raabe/dotfiles) - rolling release (Development release): [https://gitlab.com/stephan-raabe/dotfiles/-/tree/dev](https://gitlab.com/stephan-raabe/dotfiles/-/tree/dev) -[TOC] - -# Installation - -The package includes an installation script that will guide you through all steps of the installation or update process. - -> PLEASE NOTE: Every Linux distribution and setup can be different. Therefore, I cannot guarantee that the installation will work everywhere. Installation on your own risk. - -## Supported platforms - -The dotfiles are tested with the following Arch based distributions: - -- Arch Linux (recommended) -- EndeavourOS -- Arco Linux -- Manjaro Linux - -The installation should work on all Arch Linux based distributions as well. - -> **For Manjaro users:** Hyprland and required components are under ongoing development. That's why it's possible that some packages are not immediatly available on Manjaro e.g., hyprlock or hypridle. But usually, the packages will be published later. - -> **For Arco Linux users:** Please reinstall/force the installation of all packages during the installation/update process of the install script. The script will also offer to remove ttf-ms-fonts if installed to avoid issues with icons on waybar. - -## Before you start - -**PLEASE BACKUP YOUR EXISTING .config FOLDER WITH YOUR DOTFILES BEFORE STARTING THE SCRIPTS FOR INITIAL INSTALLTION.** - -The installation script will create a backups from configurations of your .config folder that will be overwritten from the installation procedure and previous ML4W Dotfiles installation. - -If possible, please create a snapshot of your current system if snapper or Timeshift is installed and available. +YouTube Video [https://youtu.be/HMxHUvN6VGo](https://youtu.be/HMxHUvN6VGo) ## Installation -The easiest way to install the ML4W Dotfiles is to use the ML4W Dotfiles Installer App. +The installation should work on all Arch Linux based distributions. [You can find more information here](https://gitlab.com/stephan-raabe/dotfiles/-/wikis/home). -[You can download the app here.](https://gitlab.com/stephan-raabe/dotfiles/-/raw/main/apps/ML4W_Dotfiles_Installer.AppImage) (Right click + Save link as... into your Downloads Folder) +The easiest way is to use the setup.sh script. The script will download all files from GitLab and start the installation automatically. -Or with wget if your starting point is a minimal Arch Linux installation without DE: +Just copy/enter the following command into your terminal. ``` -mkdir ~/Downloads # If Downloads folder doesn't exists -wget -P ~/Downloads/ https://gitlab.com/stephan-raabe/dotfiles/-/raw/main/apps/ML4W_Dotfiles_Installer.AppImage - +bash <(curl -s https://gitlab.com/stephan-raabe/dotfiles/-/raw/main/setup.sh) ``` -``` -# Change to the Downloads folder -cd ~/Downloads +> PLEASE NOTE: Every Linux distribution, setup and personal configuration can be different. Therefore, I cannot guarantee that the ML4W Dotfiles will work everywhere. Installation at your own risk. -# Make the file executable -chmod +x ML4W_Dotfiles_Installer.AppImage +## Wiki -# Start the App from your terminal with -./ML4W_Dotfiles_Installer.AppImage -``` +You can find the complete documentation of the ML4W Dotfiles in the Wiki. [Open the Wiki here](https://gitlab.com/stephan-raabe/dotfiles/-/wikis/home) -Alternatively you can install with GIT. +## Contributing -## Update +Thanks for using the ML4W Dotfiles on your system. If you find a problem or a bug, please [report your issue on this page](https://gitlab.com/stephan-raabe/dotfiles/-/issues/?sort=created_date&state=opened). -You can use the integrated update feature to update your dotfiles to the main or rolling release whenever you want. +You can also visit the [ML4W Discord Server](https://discord.gg/c4fJK7Za3g) to start a discussion with other users. -![Update](screenshots/welcome-update-dotfiles.png "Updates") +## Screenshots -Start the ML4W Welcome App. You will see a notification when an update is available. You can start the update or re-installation of the ML4W Dotfiles at any time. +[![Screenshot](screenshots/screenshot1.png "Screenshot")](screenshots/screenshot1.png) -You can force a clean re-installation of the dotfiles by removing the folder ~/dotfiles before starting the installation. +[![Screenshot](screenshots/screenshot3.png "Screenshot")](screenshots/screenshot3.png) -> Please note that you can create a backup of your existing configuration with the backup feature of the install script. It's recommended to remove the folder ~/dotfiles only after creating a backup. +[![Screenshot](screenshots/screenshot4.png "Screenshot")](screenshots/screenshot5.png) -## Uninstall - -You can use the integrated uninstallation function (ML4W Dotfiles Uninstaller App) to remove the ML4W Dotfiles from your system. - -Please select "Uninstall Dotfiles" from the ML4W Welcome App or execute ~/dotfiles/uninstall.sh - -The ML4W Dotfiles Uninstaller App will remove the dotfiles folder, related symbolic links and the desktop files of the ML4W Apps. - -The script will also try to restore old configurations back into .config if available and restored during the installation of the ML4W Dotfiles. - -## Installation in a KVM virtual machine - -Qtile X11 works fine in a KVM virtual machine. The Hyprland performance is low but it's enough for testing new features. - -In virt-manager please make sure that 3D acceleration is enabled in Video Virtio and the Listen type is set to None in Display Spice. - -To fix the mouse issue on Hyprland, open the Hyprland settings with SUPER + CTRL + S and select in Environments the variation kvm.conf - -## Hyprland & NVIDIA - -There is no official Hyprland support for Nvidia hardware. However, you might make it work properly following this page. -https://wiki.hyprland.org/Nvidia/ - -Users have reported that Hyprland with dotfiles could be installed successfully on setups with NVDIA GPUs using the nouveau open source drivers. - -Please select the following variation in the settings script (system/environment): - -https://gitlab.com/stephan-raabe/dotfiles/-/blob/main/hypr/conf/environments/nvidia.conf - -Or set the included environment variables in hyprland.conf - -## Installation Hook - -The installation script will prepare the configuration files in a folder ~/dotfiles-versions/[version] before copy the files into the final destination in ~/dotfiles - -If you want to modify the installation files just before everytime the copy procedure starts, you can create a file hook.sh in the folder ~/dotfiles-versions - -You can for example delete folders and files or update existing configurations. - -``` -#!/bin/bash -rm -rf ~/dotfiles-versions/$version/vim/ -rm -rf ~/dotfiles-versions/$version/nvim/ -``` - -This script will for example remove the vim and nvim folder before the installation. The symbolic link will not be created because the source folder doesn't exits. - -You can find a template in .install/templates/hook.sh - -## Launch Hyprland from tty - -The suggested method to start Hyprland is from tty with the command Hyprland because login managers (display managers) are not officially supported (https://wiki.hyprland.org/Getting-Started/Master-Tutorial/#launching-hyprland) - -``` -# Start Hyprland -Hyprland -``` - -You can install a custom tty login issue (layout) with the dotfiles installer. - -## Launch Hyprland with a Display Manager - -I made good experiences with the Display Manager SDDM (https://github.com/sddm/sddm). Also gdm could work. - -``` -yay -S sddm -``` - -The dotfiles installation script will offer to deactivate the installed display manager and to activate SDDM. - -The dotfiles package also includes a configuration for the SDDM theme sdd-sugar-candy (https://github.com/Kangie/sddm-sugar-candy) and a configuration to run SDDM in X11 mode to get the best compatibility. - -With the Hyprland settings script you can copy the current wallpaper into SDDM and use it as a background. - -Please check the troubleshooting section in case of issues. - -## Screenlock, suspend and DPMS - -Hypridle will start Hyprlock after 10 minutes of inactivity and will try to suspend one minutes later. - -In the ML4W Dotfiles Settings App you can define the timeouts for Hyprlock, suspend and DPSM. - -The selected hypridle configuration can be restored from the ML4W installer during a dotfiles update. - -The ML4W Dotfiles are using the recommended configuration from https://wiki.hyprland.org/Hypr-Ecosystem/hypridle/ - -# Some important key bindings - -- SUPER + RETURN: Alacritty -- SUPER + CTRL + RETURN: rofi application launcher -- SUPER + SHIFT + W: Change wallpaper -- SUPER + PRINT: Screenshot -- SUPER + CTRL + Q: Logout screen -- SUPER + CTRL + S: Settings script on Hyprland -- SUPER + SHIFT + B: Reload waybar on Hyprland - -All keybindings for Hyprland with right mouse click on Apps in waybar or here: - -- [Hyprland keybindings overview](hypr/conf/keybindings/default.conf) -- [Qtile keybindings overview](qtile/config.py) - -# Hyprland - - - - - - - -You can find more screenshots here. - -Watch on YouTube - -## ML4W Welcome App - -After starting the ML4W dotfiles for the first time, the ML4W Welcome App opens. This app is the starting point to discover the Hyprland setup. - - - -The welcome screen includes the most important keybindings to open a terminal or a browser. - -You can start the ML4W Welcome App by clicking on the L icon on the right side in waybar, using the rofi application launcher or by typing ml4w in your terminal (if you're using the .bashrc from the dotfiles). - -In the Settings Menu you can access the following functions: - -- Update Wallpaper: Opens the wallpaper selector -- Change Waybar Theme: Opens the waybar theme switcher and gives access to the available themes for the waybar status bar -- Change GTK Theme: Opens nwg-look to select the theme for GTK 3 applications incl. widgets, icons and cursors -- Refresh GTK Settings: Reloads the Hyprland GTK configuration (required when changing the mouse cursor) -- Hyprland Settings: Opens the Hyprland Settings script to customize the look and feel, environment variables, monitor resolution, etc. -- Network Settings: Select your network configuration incl. WiFi -- Update your System: Starts the terminal application to update your Arch packages (pacman & yay) -- Cleanup your System: Removes old orphans and cached files generated during previous installations -- Reload Waybar: Reloads the waybar -- Toggle Waybar: You can hide or show waybar when you want to try our other status bars. - -You can find the sourcecode of the ML4W Welcome App in this repository: -https://gitlab.com/stephan-raabe/ml4w-welcome - -## ML4W Dotfiles Settings App - -You can open the ML4W dotfiles settings app with SUPER + CTRL + S to change selected dotfiles configurations and choose from variations for your hyprland.conf to customize your desktop even more. - - - -You can create custom variations by copying a file from the ~/dotfiles/hypr/conf subfolders like monitor/default.conf, give the file a custom name (e.g., mymonitor.conf) and select the variation in the dotfiles settings app in the corresponding section. - -> The ML4W Dotfiles Settings App replaces strings from several configuration files directly or based on replacement comments e.g., // START WORKSPACES That's why you shouldn't remove any of theses comments or markers to ensure full functionality of the app. - -You can also edit the file custom.conf which is included at the bottom of the hyprland.conf and can hold you personal configurations. - -You can find the sourcecode of the ML4W Dotfiles Settings App in this repository: -https://gitlab.com/stephan-raabe/ml4w-dotfiles-settings - -## Hyprland Configuration Variations - -With configuration variations, you can customize settings and configurations for your Hyprland installation. You can manage, create and edit Hyprland Configuration Variations in the ML4W Dotfiles Settings App. - - - -[You can find more information here.](hypr/conf/README.md) - -> Please don't edit the shipped configuration variations. These will be overwritten with every update of the ML4W dotfiles. Create your own custom variation instead. - -## Wallpaper with swww or hyprpaper and Pywal - -Included is a pywal configuration that changes the color scheme based on a randomly selected wallpaper. With the key binding SUPER + SHIFT + W you can change the wallpaper coming from the folder ~/wallpaper/. - -SUPER + CTRL + W opens rofi with a list of installed wallpapers in ~/wallpaper/ for your individual selection. - -In case of issues with swww, you can switch between the Wallpaper application swww and hyprpaper. Open the ML4W Dotfiles Settings app and select the tab system. At the top you can find the Wallpaper Engine Selector. - -> PLEASE NOTE: A logout and login is required to activate the new wallpaper application. - -The hyprpaper engine uses a template stored in dotfiles/.settings/hyprpaper.tpl You can add additional configurations there. The WALLPAPER placeholder will be replaced with the current wallpaper. - -## Waybar themes and themeswitcher - -In addition, you can switch the Waybar Template with SUPER + CTRL + T or by pressing the "..." icon in Waybar with the themeswitcher. - -The templates are available in ~/dotfiles/waybar/themes. You can add your own personal themes into this folder. - -[You can find more information here.](waybar/README.md) - -## Screensharing and recording - -More information you can find here: -https://gist.github.com/PowerBall253/2dea6ddf6974ba4e5d26c3139ffb7580 - -> Please note that every Arch Linux system is different and I cannot guarantee that everything works fine on your system. - -## Main packages - -- Terminal: alacritty -- Editor: nvim -- Prompt: starship -- Wallpaper: swww or hyprpaper -- Icons: Font Awesome -- Launch Menus: Rofi (Wayland fork) -- Colorscheme: pywal -- Browsers: chromium (brave optional) -- Filemanager: Thunar -- Cursor: Bibata Modern Ice -- Icons: Papirus-Icon-Theme -- Status Bar: waybar -- Screenshots: grim & slurp -- Clipboard Manager: cliphist -- Logout: wlogout -- Idle Manager: hypridle -- Screenlock: hyprlock - -# Qtile X11 - -Click to watch on YouTube - -Click to watch on YouTube - -## Wallpaper and Pywal - -Included is a pywal configuration that changes the color scheme based on a randomly selected wallpaper. With the key binding SUPER + SHIFT + W you can change the wallpaper coming from the folder ~/wallpaper/. - -SUPER + CTRL + W opens rofi with a list of installed wallpapers in ~/wallpaper/ for your individual selection. - -## Main Packages - -- Terminal: alacritty -- Editor: nvim -- Prompt: starship -- Icons: Font Awesome -- Launch Menus: Rofi (Wayland fork) -- Colorscheme: pywal -- Browsers: chromium (brave optional) -- Filemanager: Thunar -- Cursor: Bibata Modern Ice -- Icons: Papirus-Icon-Theme -- Status Bar: Qtile status bar -- Compositor: picom -- Screenshots: scrot - -# Installation/Update with GIT - -## Installation with GIT - -You can also install the dotfiles by cloning the latest main release: - -``` -# 1.) Change into your Downloads folder (create the folder if not available) -cd ~/Downloads - -# 2.) Clone the dotfiles repository into the Downloads folder -git clone --depth=1 https://gitlab.com/stephan-raabe/dotfiles.git - -# 3.) Change into the dotfiles folder -cd dotfiles - -# 4.) Start the installation -./install.sh - -``` - -## Installation with GIT (Rolling release) - -You can install the dotfiles by cloning the latest development version from the rolling release: - -``` -# 1.) Change into your Downloads folder (create the folder if not available) -cd ~/Downloads - -# 2.) Clone the dotfiles repository into the Downloads folder -git clone https://gitlab.com/stephan-raabe/dotfiles.git - -# 3.) Change into the new dotfiles folder -cd dotfiles - -# 4.) Checkout the dev branch -git checkout dev - -# 4.) Start the installation -./install.sh - -``` - -## Update with GIT - -Please follow the steps to update from earlier dotfiles versions to 2.8.3 - -``` -# 1.) Remove existing downloaded dotfiles -rm -rf ~/Downloads/dotfiles - -# 2.) Change into your Downloads folder -cd ~/Downloads - -# 3.) Clone the dotfiles repository into the Downloads folder -git clone --depth=1 https://gitlab.com/stephan-raabe/dotfiles.git - -# 4.) Change into the dotfiles folder -cd dotfiles - -# 5.) Start the installation -./install.sh - -``` - -# Base Hyprland installation with Hyperland Starter Package - -If you want to install only the core packages of Hyprland as a starting point for your Hyprland experiments please also try my Hyprland Starter script: https://gitlab.com/stephan-raabe/hyprland-starter - -# Troubleshooting - -## Wallpaper issues (grey or distroyed image) with latest swww 0.9.1 - -Please install the latest version of the ML4W Dotfiles > 2.8.4 - -Or replace the swww launch command in /dotfiles/hypr/conf/autostart.conf with - -``` -exec-once = swww init || swww-daemon --format xrgb -``` - -> swww is currently extremly under development. Upcoming updates could require different launch commands. I will monitor the development as well and update the dotfiles accordingly. - -You can use the ML4W Dotfiles Settings app to replace swww with hyprpaper. - -## hypridle and hyprlock is not starting after an update of the dotfiles - -Please make sure that hypridle and hyprlock has been installed successfully with - -``` -yay -S hypridle hyprlock -``` - -If there is an file conflict the remove the files manually with: - -``` -sudo rm /usr/lib/debug/usr/bin/hypridle.debug -sudo rm /usr/lib/debug/usr/bin/hyprlock.debug -``` - -and start the installation again with - -``` -yay -S hypridle hyprlock -``` - -## Missing icons in waybar - -In case of missing icons on waybar, it's due to a conflict between several installed fonts (can happen especially on Arco Linux). Please make sure that ttf-ms-fonts is uninstalled and ttf-font-awesome and otf-font-awesome are installed with - -``` -yay -R ttf-ms-fonts -yay -S ttf-font-awesome otf-font-awesome -``` - -## SDDM not showing (only black screen with cursor) - -Switch to another tty with CTRL + ALT + F3 Now you can login with your user. - -Start Hyprland with Hyprland. - -You can try to reinstall all sddm related packages. - -``` -yay -S sddm-git sddm-sugar-candy-git -``` - -Or you can install another display manager. - -To stop, disable and remove sddm service. - -``` -sudo systemctl stop sddm.service -sudo systemctl disable sddm.service -sudo rm /etc/systemd/system/display-manager.service -``` - -## Waybar is not loading - -There could be a conflict with xdg-desktop-portal-gtk or xdg-desktop-portal-gnome. Please try to remove the package if installed with: - -``` -sudo pacman -R xdg-desktop-portal-gtk -``` - -# Wallpaper repository +## Wallpaper repository You can find my wallpaper collection in the repository https://gitlab.com/stephan-raabe/wallpaper -# Special Thanks +## Special Thanks THANK YOU very much for all your support, contributions and ideas: @@ -475,17 +55,18 @@ THANK YOU very much for all your support, contributions and ideas: - Don Williams: https://github.com/dwilliam62 - Teodor Orzechowski: https://gitlab.com/sq6gtt - Jamie Deppeler: https://gitlab.com/bknight2k +- https://gitlab.com/muee and many more... Thanks to all YouTube subscribers for all your great feedback. -# Inspirations +## Inspirations The following projects have inspired me: -- https://github.com/dianaw353/hyprland-configuration-rootfs - https://github.com/prasanthrangan/hyprdots - https://github.com/sudo-harun/dotfiles +- https://github.com/dianaw353/hyprland-configuration-rootfs and many more... diff --git a/apps/ML4W_Dotfiles_Settings-x86_64.AppImage b/apps/ML4W_Dotfiles_Settings-x86_64.AppImage index 95d869f..eb87906 100755 Binary files a/apps/ML4W_Dotfiles_Settings-x86_64.AppImage and b/apps/ML4W_Dotfiles_Settings-x86_64.AppImage differ diff --git a/apps/ML4W_Dotfiles_Uninstaller.AppImage b/apps/ML4W_Dotfiles_Uninstaller.AppImage index 79432b7..299c164 100755 Binary files a/apps/ML4W_Dotfiles_Uninstaller.AppImage and b/apps/ML4W_Dotfiles_Uninstaller.AppImage differ diff --git a/apps/ML4W_Dotfiles_Installer.AppImage b/apps/ML4W_Hyprland_Settings-x86_64.AppImage similarity index 73% rename from apps/ML4W_Dotfiles_Installer.AppImage rename to apps/ML4W_Hyprland_Settings-x86_64.AppImage index 1f705a2..f8e23e3 100755 Binary files a/apps/ML4W_Dotfiles_Installer.AppImage and b/apps/ML4W_Hyprland_Settings-x86_64.AppImage differ diff --git a/apps/ML4W_Welcome-x86_64.AppImage b/apps/ML4W_Welcome-x86_64.AppImage index cd45671..5bd9c4f 100755 Binary files a/apps/ML4W_Welcome-x86_64.AppImage and b/apps/ML4W_Welcome-x86_64.AppImage differ diff --git a/apps/ml4w-dotfiles-settings.desktop b/apps/ml4w-dotfiles-settings.desktop index 8aba4de..f031bea 100755 --- a/apps/ml4w-dotfiles-settings.desktop +++ b/apps/ml4w-dotfiles-settings.desktop @@ -2,6 +2,6 @@ Type=Application Name=ML4W Dotfiles Settings App Exec=HOME/dotfiles/apps/ML4W_Dotfiles_Settings-x86_64.AppImage -Icon=HOME/dotfiles/apps/ml4w-icon.png +Icon=HOME/dotfiles/apps/ml4w-dotfiles-settings.png Terminal=false Categories=Utility \ No newline at end of file diff --git a/apps/ml4w-dotfiles-settings.png b/apps/ml4w-dotfiles-settings.png new file mode 100644 index 0000000..938b6f7 Binary files /dev/null and b/apps/ml4w-dotfiles-settings.png differ diff --git a/apps/ml4w-hyprland-settings.desktop b/apps/ml4w-hyprland-settings.desktop new file mode 100755 index 0000000..483c0d3 --- /dev/null +++ b/apps/ml4w-hyprland-settings.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +Type=Application +Name=ML4W Hyprland Settings App +Exec=HOME/dotfiles/apps/ML4W_Hyprland_Settings-x86_64.AppImage +Icon=HOME/dotfiles/apps/ml4w-hyprland-settings.png +Terminal=false +Categories=Utility \ No newline at end of file diff --git a/apps/ml4w-hyprland-settings.png b/apps/ml4w-hyprland-settings.png new file mode 100644 index 0000000..c7e8e29 Binary files /dev/null and b/apps/ml4w-hyprland-settings.png differ diff --git a/apps/ml4w-welcome.png b/apps/ml4w-welcome.png new file mode 100644 index 0000000..7d4efe7 Binary files /dev/null and b/apps/ml4w-welcome.png differ diff --git a/eww/assets/application-exit-symbolic-rtl.svg b/eww/assets/application-exit-symbolic-rtl.svg new file mode 100644 index 0000000..89f0825 --- /dev/null +++ b/eww/assets/application-exit-symbolic-rtl.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/eww/assets/media-playback-pause-symbolic.svg b/eww/assets/media-playback-pause-symbolic.svg new file mode 100644 index 0000000..39383da --- /dev/null +++ b/eww/assets/media-playback-pause-symbolic.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/eww/assets/system-lock-screen-symbolic.svg b/eww/assets/system-lock-screen-symbolic.svg new file mode 100644 index 0000000..78a410a --- /dev/null +++ b/eww/assets/system-lock-screen-symbolic.svg @@ -0,0 +1,4 @@ + + + + diff --git a/eww/assets/system-reboot-symbolic.svg b/eww/assets/system-reboot-symbolic.svg new file mode 100644 index 0000000..15171f5 --- /dev/null +++ b/eww/assets/system-reboot-symbolic.svg @@ -0,0 +1,4 @@ + + + + diff --git a/eww/assets/system-shutdown-symbolic.svg b/eww/assets/system-shutdown-symbolic.svg new file mode 100644 index 0000000..cfd4996 --- /dev/null +++ b/eww/assets/system-shutdown-symbolic.svg @@ -0,0 +1,4 @@ + + + + diff --git a/eww/assets/window-close-symbolic.svg b/eww/assets/window-close-symbolic.svg new file mode 100644 index 0000000..4cd28cd --- /dev/null +++ b/eww/assets/window-close-symbolic.svg @@ -0,0 +1,4 @@ + + + + diff --git a/eww/eww.yuck b/eww/eww.yuck new file mode 100644 index 0000000..e69de29 diff --git a/eww/ml4w-sidebar/eww.scss b/eww/ml4w-sidebar/eww.scss new file mode 100644 index 0000000..45c6c82 --- /dev/null +++ b/eww/ml4w-sidebar/eww.scss @@ -0,0 +1,78 @@ +*{ + all: unset; + font-family: "Fira Sans"; + color: #FFFFFF; +} + +.winbox { + background-color: #242424; + opacity: 0.85; + border: 1px solid #444444; + border-radius: 12px; + box-shadow: 0 0 4px 2px #000000; + margin: 10px; +} + +.res_box { + background-color: #242424; + border-radius: 12px; + padding: 14px 18px 14px 18px; +} + +.res_circle { + background-color: #FFFFFF; + border: 0px solid #161616; + color:#FFFFFF; + border-radius: 100%; + padding: 0px; +} + +.ml4w_icon { + background-repeat: no-repeat; + background-size: 48px; + min-height: 48px; + min-width: 48px; +} + +.res_circle_small { + background-color: #242424; + border: 0px solid #161616; + border-radius: 100%; + padding: 40px; + color:#FFFFFF; +} + +.res_text { + border-radius: 16px; + color: #FFFFFF; + font-size : 16px; + padding: 0px 8px 0px 8px; + margin: 0px 0px 0px 0px; + font-weight : bold; +} + +.res_cpu { + color: #19cddb; +} + +.res_mem { + color: #a5deb7; +} + +.res_disk { + color: #cfb3ff; +} + +.powericons { + background-repeat: no-repeat; + background-size: 30px; + min-height: 30px; + min-width: 30px; +} + +.closeicon { + background-repeat: no-repeat; + background-size: 16px; + min-height: 16px; + min-width: 16px; +} diff --git a/eww/ml4w-sidebar/eww.yuck b/eww/ml4w-sidebar/eww.yuck new file mode 100644 index 0000000..afa0a3f --- /dev/null +++ b/eww/ml4w-sidebar/eww.yuck @@ -0,0 +1,184 @@ +;; Icons: https://github.com/GNOME/adwaita-icon-theme/tree/master/Adwaita + +;; Variables + +;; System vars +(defpoll HOST :interval "5s" `hostname`) +(defpoll CPU_USAGE :interval "1s" `../scripts/sys_info.sh --cpu`) +(defpoll MEM_USAGE :interval "1s" `../scripts/sys_info.sh --mem`) +(defpoll DISK_USAGE :interval "1s" `../scripts/sys_info.sh --disk`) + +;; Widgets + +;; resources +(defwidget ml4wlauncher [] + (box :class "winbox" + (centerbox :orientation "h" + (box :class "ml4w-welcome" :orientation "v" :valign "center" :halign "center" :spacing 15 :space-evenly "false" + (button :style "background-image: url('../../apps/ml4w-welcome.png');" :class "ml4w_icon" :orientation "v" :valign "center" :halign "center" :onclick "../scripts/launch_app.sh --welcome") + (label :class "res_text" :valign "end" :halign "center" :text "Welcome App") + ) + (box :class "ml4w-dotfiles" :orientation "v" :valign "center" :halign "center" :spacing 15 :space-evenly "false" + (button :style "background-image: url('../../apps/ml4w-dotfiles-settings.png');" :class "ml4w_icon" :orientation "v" :valign "center" :halign "center" :onclick "../scripts/launch_app.sh --dotfiles") + (label :class "res_text" :valign "end" :halign "center" :text "Dotfiles App") + ) + (box :class "ml4w-hyprland" :orientation "v" :valign "center" :halign "center" :spacing 15 :space-evenly "false" + (button :style "background-image: url('../../apps/ml4w-hyprland-settings.png');" :class "ml4w_icon" :orientation "v" :valign "center" :halign "center" :onclick "../scripts/launch_app.sh --hyprland") + (label :class "res_text" :valign "end" :halign "center" :text "Hyprland App") + ) + ) + ) +) + +(defwidget resources [] + (box :class "winbox" + (centerbox :orientation "h" + (box :class "res_box" :orientation "v" :valign "center" :halign "center" :spacing 15 :space-evenly "false" + (box :class "res_circle" :orientation "v" :valign "center" :halign "center" + (circular-progress :class "res_cpu" :value CPU_USAGE :thickness 15 + (label :class "res_circle_small" :text "CPU" :show-truncated false) + ) + ) + (label :class "res_text" :valign "end" :halign "center" :text "${CPU_USAGE}%") + ) + (box :class "res_box" :orientation "v" :valign "center" :halign "center" :spacing 15 :space-evenly "false" + (box :class "res_circle" :orientation "v" :valign "center" :halign "center" + (circular-progress :class "res_mem" :value MEM_USAGE :thickness 15 + (label :class "res_circle_small" :text "MEMORY" :show-truncated false) + ) + ) + (label :class "res_text" :valign "end" :halign "center" :text "${MEM_USAGE}%") + ) + (box :class "res_box" :orientation "v" :valign "center" :halign "center" :spacing 15 :space-evenly "false" + (box :class "res_circle" :orientation "v" :valign "center" :halign "center" + (circular-progress :class "res_disk" :value DISK_USAGE :thickness 15 + (label :class "res_circle_small" :text "DISK" :show-truncated false) + ) + ) + (label :class "res_text" :valign "end" :halign "center" :text "${DISK_USAGE}%") + ) + ) + ) +) + +(defwidget close [] + (box :class "winbox" + (button :tooltip "Close" :style "background-image: url('../assets/window-close-symbolic.svg');" :class "closeicon" :valign "center" :halign "center" :onclick "../scripts/eww.sh &") + ) +) + +;; powermenus +(defwidget logout [] + (box :class "winbox" + (button :tooltip "Logout" :style "background-image: url('../assets/application-exit-symbolic-rtl.svg');" :class "powericons" :valign "center" :halign "center" :onclick "../../hypr/scripts/power.sh exit &") + ) +) + +(defwidget suspend [] + (box :class "winbox" + (button :tooltip "Suspend" :style "background-image: url('../assets/media-playback-pause-symbolic.svg');" :class "powericons" :valign "center" :halign "center" :onclick "../../hypr/scripts/power.sh suspend &") + ) +) + +(defwidget lock [] + (box :class "winbox" + (button :tooltip "Lock" :style "background-image: url('../assets/system-lock-screen-symbolic.svg');" :class "powericons" :valign "center" :halign "center" :onclick "../../hypr/scripts/power.sh lock &") + ) +) + +(defwidget reboot [] + (box :class "winbox" + (button :tooltip "Reboot" :style "background-image: url('../assets/system-reboot-symbolic.svg');" :class "powericons" :valign "center" :halign "center" :onclick "../../hypr/scripts/power.sh reboot &") + ) +) + +(defwidget shutdown [] + (box :class "winbox" + (button :tooltip "Shutdown" :style "background-image: url('../assets/system-shutdown-symbolic.svg');" :class "powericons" :valign "center" :halign "center" :onclick "../../hypr/scripts/power.sh shutdown &") + ) +) + +;; ** Windows ************************************************************************* + +(defwindow close + :geometry (geometry :x "455px" + :y "-7px" + :width "44px" + :height "44px" + :anchor "top right") + :stacking "fg" + :wm-ignore false +(close)) + +(defwindow ml4wlauncher + :geometry (geometry :x "5px" + :y "5px" + :width "480px" + :height "140px" + :anchor "top right") + :stacking "fg" + :wm-ignore false +(ml4wlauncher)) + +;; resources +(defwindow resources + :geometry (geometry :x "5px" + :y "140px" + :width "480px" + :height "180px" + :anchor "top right") + :stacking "fg" + :wm-ignore false +(resources)) + +;; powermenu +(defwindow logout + :geometry (geometry :x "5px" + :y "318px" + :width "80px" + :height "80px" + :anchor "top right") + :stacking "fg" + :wm-ignore false +(logout)) + +(defwindow suspend + :geometry (geometry :x "102px" + :y "318px" + :width "80px" + :height "80px" + :anchor "top right") + :stacking "fg" + :wm-ignore false +(suspend)) + +(defwindow lock + :geometry (geometry :x "204px" + :y "318px" + :width "80px" + :height "80px" + :anchor "top right") + :stacking "fg" + :wm-ignore false +(lock)) + +(defwindow reboot + :geometry (geometry :x "305px" + :y "318px" + :width "80px" + :height "80px" + :anchor "top right") + :stacking "fg" + :wm-ignore false +(reboot)) + +(defwindow shutdown + :geometry (geometry :x "405px" + :y "318px" + :width "80px" + :height "80px" + :anchor "top right") + :stacking "fg" + :wm-ignore false +(shutdown)) + diff --git a/eww/ml4w-sidebar/launch.sh b/eww/ml4w-sidebar/launch.sh new file mode 100755 index 0000000..d144e52 --- /dev/null +++ b/eww/ml4w-sidebar/launch.sh @@ -0,0 +1,33 @@ +#!/bin/bash +FILE="$HOME/.cache/ml4w_sidebar" +CFG="$HOME/dotfiles/eww/ml4w-sidebar" +EWW=`which eww` + +if [[ ! `pidof eww` ]]; then + ${EWW} daemon + sleep 0.5 +fi + +if [ -f $HOME/dotfiles/.settings/eww-monitor.sh ] && [ $(cat $HOME/dotfiles/.settings/eww-monitor.sh) != "auto" ] ;then + echo ":: Using monitor id from $HOME/dotfiles/.settings/eww-monitor.sh" + sc=$(cat $HOME/dotfiles/.settings/eww-monitor.sh) +else + echo ":: Autodetect current focused monitor." + sc=$(python $HOME/dotfiles/hypr/scripts/active-monitor.py) +fi +if [[ ! -f "$FILE" ]]; then + touch "$FILE" + echo ":: Opening on Monitor $sc" + ${EWW} --config "$CFG" open ml4wlauncher --screen $sc + ${EWW} --config "$CFG" open resources --screen $sc + ${EWW} --config "$CFG" open logout --screen $sc + ${EWW} --config "$CFG" open suspend --screen $sc + ${EWW} --config "$CFG" open lock --screen $sc + ${EWW} --config "$CFG" open reboot --screen $sc + ${EWW} --config "$CFG" open shutdown --screen $sc + ${EWW} --config "$CFG" open close --screen $sc +else + ${EWW} --config "$CFG" close resources ml4wlauncher logout suspend lock reboot shutdown close + echo ":: Closing widgets" + rm "$FILE" +fi \ No newline at end of file diff --git a/eww/scripts/eww.sh b/eww/scripts/eww.sh new file mode 100755 index 0000000..a13b895 --- /dev/null +++ b/eww/scripts/eww.sh @@ -0,0 +1,3 @@ +#!/bin/bash +sleep 0.3 +$HOME/dotfiles/eww/ml4w-sidebar/launch.sh \ No newline at end of file diff --git a/eww/scripts/launch_app.sh b/eww/scripts/launch_app.sh new file mode 100755 index 0000000..5929e1a --- /dev/null +++ b/eww/scripts/launch_app.sh @@ -0,0 +1,12 @@ +#!/bin/bash +if [[ "$1" == "--welcome" ]]; then + $HOME/dotfiles/apps/ML4W_Welcome-x86_64.AppImage & +elif [[ "$1" == "--dotfiles" ]]; then + $HOME/dotfiles/apps/ML4W_Dotfiles_Settings-x86_64.AppImage & +elif [[ "$1" == "--hyprland" ]]; then + $HOME/dotfiles/apps/ML4W_Hyprland_Settings-x86_64.AppImage & +else + echo "ERROR: $1 not found" +fi + +$HOME/dotfiles/eww/ml4w-sidebar/launch.sh & \ No newline at end of file diff --git a/eww/scripts/sys_info.sh b/eww/scripts/sys_info.sh new file mode 100755 index 0000000..27a589a --- /dev/null +++ b/eww/scripts/sys_info.sh @@ -0,0 +1,85 @@ +#!/bin/bash + +## Files and Data +PREV_TOTAL=0 +PREV_IDLE=0 +cpuFile="/tmp/.cpu_usage" + +## Get CPU usage +get_cpu() { + if [[ -f "${cpuFile}" ]]; then + fileCont=$(cat "${cpuFile}") + PREV_TOTAL=$(echo "${fileCont}" | head -n 1) + PREV_IDLE=$(echo "${fileCont}" | tail -n 1) + fi + + CPU=(`cat /proc/stat | grep '^cpu '`) # Get the total CPU statistics. + unset CPU[0] # Discard the "cpu" prefix. + IDLE=${CPU[4]} # Get the idle CPU time. + + # Calculate the total CPU time. + TOTAL=0 + + for VALUE in "${CPU[@]:0:4}"; do + let "TOTAL=$TOTAL+$VALUE" + done + + if [[ "${PREV_TOTAL}" != "" ]] && [[ "${PREV_IDLE}" != "" ]]; then + # Calculate the CPU usage since we last checked. + let "DIFF_IDLE=$IDLE-$PREV_IDLE" + let "DIFF_TOTAL=$TOTAL-$PREV_TOTAL" + let "DIFF_USAGE=(1000*($DIFF_TOTAL-$DIFF_IDLE)/$DIFF_TOTAL+5)/10" + echo "${DIFF_USAGE}" + else + echo "?" + fi + + # Remember the total and idle CPU times for the next check. + echo "${TOTAL}" > "${cpuFile}" + echo "${IDLE}" >> "${cpuFile}" +} + +## Get Used memory +get_mem() { + printf "%.0f\n" $(free -m | grep Mem | awk '{print ($3/$2)*100}') +} + +## Get Brightness +get_blight() { + CARD=`ls /sys/class/backlight | head -n 1` + + if [[ "$CARD" == *"intel_"* ]]; then + BNESS=`xbacklight -get` + LIGHT=${BNESS%.*} + else + BNESS=`blight -d $CARD get brightness` + PERC="$(($BNESS*100/255))" + LIGHT=${PERC%.*} + fi + + echo "$LIGHT" +} + +## Get Battery +get_battery() { + BAT=`ls /sys/class/power_supply | grep BAT | head -n 1` + cat /sys/class/power_supply/${BAT}/capacity +} + +## Get Disk Usage +get_disk() { + df -h / | awk '{print $5}' | tail -n1 | sed 's/%//g' +} + +## Execute accordingly +if [[ "$1" == "--cpu" ]]; then + get_cpu +elif [[ "$1" == "--mem" ]]; then + get_mem +elif [[ "$1" == "--blight" ]]; then + get_blight +elif [[ "$1" == "--bat" ]]; then + get_battery +elif [[ "$1" == "--disk" ]]; then + get_disk +fi diff --git a/eww/scripts/system.sh b/eww/scripts/system.sh new file mode 100755 index 0000000..d10441d --- /dev/null +++ b/eww/scripts/system.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +sleep 0.3 +$HOME/dotfiles/eww/ml4w-sidebar/launch.sh + +if [[ "$1" == "reboot" ]]; then + $HOME/dotfiles/hypr/scripts/reboot.sh +elif [[ "$1" == "shutdown" ]]; then + $HOME/dotfiles/hypr/scripts/shutdown.sh +elif [[ "$1" == "lock" ]]; then + $HOME/dotfiles/hypr/scripts/lock.sh +elif [[ "$1" == "suspend" ]]; then + $HOME/dotfiles/hypr/scripts/suspend.sh +elif [[ "$1" == "logout" ]]; then + $HOME/dotfiles/hypr/scripts/exit.sh +fi diff --git a/fastfetch/config.jsonc b/fastfetch/config.jsonc new file mode 100644 index 0000000..41c986a --- /dev/null +++ b/fastfetch/config.jsonc @@ -0,0 +1,110 @@ +// Thanks to Bina +{ + "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json", + "logo": { + "padding": { + "top": 2 + } + }, + "display": { + "separator": " ➜ " + }, + "modules": [ + "break", + "break", + "break", + { + "type": "os", + "key": "OS ", + "keyColor": "31", // = color1 + }, + { + "type": "kernel", + "key": " ├  ", + "keyColor": "31", + }, + { + "type": "packages", + "format": "{} (pacman)", + "key": " ├ 󰏖 ", + "keyColor": "31", + }, + { + "type": "shell", + "key": " └  ", + "keyColor": "31", + }, + "break", + { + "type": "wm", + "key": "WM ", + "keyColor": "32", + }, + { + "type": "wmtheme", + "key": " ├ 󰉼 ", + "keyColor": "32", + }, + { + "type": "icons", + "key": " ├ 󰀻 ", + "keyColor": "32", + }, + { + "type": "cursor", + "key": " ├  ", + "keyColor": "32", + }, + { + "type": "terminal", + "key": " ├  ", + "keyColor": "32", + }, + { + "type": "terminalfont", + "key": " └  ", + "keyColor": "32", + }, + "break", + { + "type": "host", + "format": "{5} {1} Type {2}", + "key": "PC ", + "keyColor": "33", + }, + { + "type": "cpu", + "format": "{1} ({3}) @ {7} GHz", + "key": " ├  ", + "keyColor": "33", + }, + { + "type": "gpu", + "format": "{1} {2} @ {12} GHz", + "key": " ├ 󰢮 ", + "keyColor": "33", + }, + { + "type": "memory", + "key": " ├  ", + "keyColor": "33", + }, + { + "type": "swap", + "key": " ├ 󰓡 ", + "keyColor": "33", + }, + { + "type": "disk", + "key": " ├ 󰋊 ", + "keyColor": "33", + }, + { + "type": "monitor", + "key": " └  ", + "keyColor": "33", + }, + "break", + "break", + ] +} \ No newline at end of file diff --git a/hypr/conf/README.md b/hypr/conf/README.md deleted file mode 100644 index 17ca702..0000000 --- a/hypr/conf/README.md +++ /dev/null @@ -1,45 +0,0 @@ -# Configuration Variations - -With configuration variations, you can prepare different settings and configurations for your Hyprland installation. - - - -## How to use configuration variations - -Open the ML4W dotfiles settings app via the ML4W Welcome App, the application launcher or the wheel icon in Waybar. - -You can find several variation within the three settings pages. - -- Monitor (Screen Resolutions) -- Animations -- Keybindings -- Windows -- Window Rules -- Decorations -- Environments - -Select the variation that you want to use from the corresponding drop down menu. - -Please don't edit the shipped configuration variations. These will be overwritten with every update of the ML4W dotfiles. Create your own custom variation instead. - -## Create your own variation - -Open the ML4W dotfiles settings app via the ML4W Welcome App, the application launcher or the wheel icon in Waybar. - -Select "Open Variation Folder" from the variation context menu. - - - -Copy an existing variation as a starting point and rename the new file accordingly. - - - -Edit the configuration of your new variation and save. - -Go back to the ML4W dotfiles settings app and select "Reload Variations" from the variation context menu and select your new variation. - - - -You can also modify the variation from the settings app directly. - - \ No newline at end of file diff --git a/hypr/conf/animations/disabled.conf b/hypr/conf/animations/disabled.conf new file mode 100644 index 0000000..c9e31c4 --- /dev/null +++ b/hypr/conf/animations/disabled.conf @@ -0,0 +1,7 @@ +# ----------------------------------------------------- +# Animations +# name "Default" +# ----------------------------------------------------- +animations { + enabled = false +} diff --git a/hypr/conf/autostart.conf b/hypr/conf/autostart.conf index 5a28c57..1f5ddc7 100644 --- a/hypr/conf/autostart.conf +++ b/hypr/conf/autostart.conf @@ -16,12 +16,6 @@ exec-once = ~/dotfiles/hypr/scripts/gtk.sh # Using hypridle to start hyprlock exec-once = hypridle -# exec-once = swayidle -w timeout 600 'swaylock -f' timeout 660 'hyprctl dispatch dpms off' resume 'hyprctl dispatch dpms on' before-sleep 'swaylock -f' - -# Load network manager applet -# START NM APPLET -# exec-once = nm-applet --indicator -# END NM APPLET # Load cliphist history exec-once = wl-paste --watch cliphist store @@ -29,5 +23,14 @@ exec-once = wl-paste --watch cliphist store # Initialize Wallpaper Engine exec-once = ~/dotfiles/hypr/scripts/init-wallpaper-engine.sh -# Start ML4W Welcome App +# Autostart ML4W App exec-once = ~/dotfiles/hypr/scripts/ml4w-welcome-autostart.sh + +# Start ewww daemon +exec-once = ~/dotfiles/hypr/scripts/eww.sh + +# Start autostart cleanup +exec-once = ~/dotfiles/hypr/scripts/cleanup.sh + +# Load configuration from ML4W Hyprland Settings App +exec = ~/.config/ml4w-hyprland-settings/hyprctl.sh diff --git a/hypr/conf/environments/default.conf b/hypr/conf/environments/default.conf index 6e76947..60b23a9 100644 --- a/hypr/conf/environments/default.conf +++ b/hypr/conf/environments/default.conf @@ -3,6 +3,10 @@ # name: "Default" # ----------------------------------------------------- -env = XCURSOR_SIZE,24 +env = XDG_SESSION_TYPE,wayland +env = XDG_SESSION_DESKTOP,Hyprland env = QT_QPA_PLATFORM,wayland - +env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1 +env = QT_AUTO_SCREEN_SCALE_FACTOR,1 +env = MOZ_ENABLE_WAYLAND,1 +env = GDK_SCALE,1 diff --git a/hypr/conf/environments/kvm.conf b/hypr/conf/environments/kvm.conf index e4cc617..11c5870 100644 --- a/hypr/conf/environments/kvm.conf +++ b/hypr/conf/environments/kvm.conf @@ -3,7 +3,12 @@ # name: "KVM" # ----------------------------------------------------- -env = XCURSOR_SIZE,24 +env = XDG_SESSION_TYPE,wayland +env = XDG_SESSION_DESKTOP,Hyprland env = QT_QPA_PLATFORM,wayland -env = WLR_NO_HARDWARE_CURSORS, 1 +env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1 +env = QT_AUTO_SCREEN_SCALE_FACTOR,1 +env = MOZ_ENABLE_WAYLAND,1 +env = GDK_SCALE,1 env = WLR_RENDERER_ALLOW_SOFTWARE, 1 +env = WLR_NO_HARDWARE_CURSORS, 1 \ No newline at end of file diff --git a/hypr/conf/environments/nvidia.conf b/hypr/conf/environments/nvidia.conf index fca9e41..34b823d 100644 --- a/hypr/conf/environments/nvidia.conf +++ b/hypr/conf/environments/nvidia.conf @@ -2,14 +2,12 @@ # Environment Variables # name: "Nvidia" # ----------------------------------------------------- - # https://wiki.hyprland.org/Nvidia/ -env = XCURSOR_SIZE,24 -env = QT_QPA_PLATFORM,wayland -env = WLR_NO_HARDWARE_CURSORS,1 + env = LIBVA_DRIVER_NAME,nvidia env = XDG_SESSION_TYPE,wayland env = GBM_BACKEND,nvidia-drm env = __GLX_VENDOR_LIBRARY_NAME,nvidia + # env = __GL_VRR_ALLOWED,1 # env = WLR_DRM_NO_ATOMIC,1 \ No newline at end of file diff --git a/hypr/conf/keybindings/default.conf b/hypr/conf/keybindings/default.conf index c54b8f8..d9dc297 100644 --- a/hypr/conf/keybindings/default.conf +++ b/hypr/conf/keybindings/default.conf @@ -9,7 +9,6 @@ $mainMod = SUPER # Applications bind = $mainMod, RETURN, exec, ~/dotfiles/.settings/terminal.sh bind = $mainMod, B, exec, ~/dotfiles/.settings/browser.sh -bind = $mainMod, period, exec, emote # Windows bind = $mainMod, Q, killactive @@ -31,6 +30,7 @@ bind = $mainMod SHIFT, down, resizeactive, 0 100 bind = $mainMod, G, togglegroup # Actions +bind = $mainMod SHIFT, A, exec, ~/dotfiles/hypr/scripts/toggle-animations.sh bind = $mainMod, PRINT, exec, ~/dotfiles/hypr/scripts/screenshot.sh bind = $mainMod CTRL, Q, exec, wlogout bind = $mainMod SHIFT, W, exec, ~/dotfiles/hypr/scripts/wallpaper.sh @@ -38,12 +38,16 @@ bind = $mainMod CTRL, W, exec, ~/dotfiles/hypr/scripts/wallpaper.sh select bind = $mainMod CTRL, RETURN, exec, rofi -show drun -replace -i bind = $mainMod CTRL, H, exec, ~/dotfiles/hypr/scripts/keybindings.sh bind = $mainMod SHIFT, B, exec, ~/dotfiles/waybar/launch.sh +bind = $mainMod CTRL, B, exec, ~/dotfiles/waybar/toggle.sh bind = $mainMod SHIFT, R, exec, ~/dotfiles/hypr/scripts/loadconfig.sh bind = $mainMod CTRL, F, exec, ~/dotfiles/scripts/filemanager.sh bind = $mainMod CTRL, C, exec, ~/dotfiles/scripts/cliphist.sh bind = $mainMod, V, exec, ~/dotfiles/scripts/cliphist.sh bind = $mainMod CTRL, T, exec, ~/dotfiles/waybar/themeswitcher.sh bind = $mainMod CTRL, S, exec, ~/dotfiles/apps/ML4W_Dotfiles_Settings-x86_64.AppImage +bind = $mainMod CTRL, P, exec, hyprpicker -a +bind = $mainMod SHIFT, S, exec, ~/dotfiles/hypr/scripts/hyprshade.sh +bind = $mainMod ALT, G, exec, ~/dotfiles/hypr/scripts/gamemode.sh # Workspaces bind = $mainMod, 1, workspace, 1 diff --git a/hypr/conf/layout.conf b/hypr/conf/layout.conf index dc78a62..c2b5cf1 100644 --- a/hypr/conf/layout.conf +++ b/hypr/conf/layout.conf @@ -1,16 +1 @@ -# ----------------------------------------------------- -# Layouts -# ----------------------------------------------------- - -dwindle { - pseudotile = true - preserve_split = true -} - -master { - new_is_master = true -} - -gestures { - workspace_swipe = false -} +source = ~/dotfiles/hypr/conf/layouts/default.conf \ No newline at end of file diff --git a/hypr/conf/layouts/default.conf b/hypr/conf/layouts/default.conf new file mode 100644 index 0000000..b766d1d --- /dev/null +++ b/hypr/conf/layouts/default.conf @@ -0,0 +1,16 @@ +# ----------------------------------------------------- +# Layouts +# ----------------------------------------------------- + +dwindle { + pseudotile = true + preserve_split = true +} + +master { + new_is_master = true +} + +gestures { + workspace_swipe = false +} \ No newline at end of file diff --git a/hypr/conf/layouts/laptop.conf b/hypr/conf/layouts/laptop.conf new file mode 100644 index 0000000..d531762 --- /dev/null +++ b/hypr/conf/layouts/laptop.conf @@ -0,0 +1,16 @@ +# ----------------------------------------------------- +# Layouts +# ----------------------------------------------------- + +dwindle { + pseudotile = true + preserve_split = true +} + +master { + new_is_master = true +} + +gestures { + workspace_swipe = true +} \ No newline at end of file diff --git a/hypr/conf/ml4w.conf b/hypr/conf/ml4w.conf index 9219d27..902ea31 100644 --- a/hypr/conf/ml4w.conf +++ b/hypr/conf/ml4w.conf @@ -2,6 +2,10 @@ # ML4W configurations # ----------------------------------------------------- +windowrulev2 = float,class:(.*chat.openai.com.*) +windowrulev2 = size 500 50%,class:(.*chat.openai.com.*) +windowrulev2 = move 20 70,class:(.*chat.openai.com.*) + windowrulev2 = float,class:(com.ml4w.welcome) windowrulev2 = size 700 600,class:(com.ml4w.welcome) windowrulev2 = center,class:(com.ml4w.welcome) @@ -18,8 +22,19 @@ windowrulev2 = float,class:(ml4w-dotfiles-settings.py) windowrulev2 = size 400 500,class:(ml4w-dotfiles-settings.py) windowrulev2 = move 10% 20%,class:(ml4w-dotfiles-settings.py) +windowrulev2 = float,class:(com.ml4w.hyprlandsettings) +windowrulev2 = size 700 600,class:(com.ml4w.hyprlandsettings) +windowrulev2 = center,class:(com.ml4w.hyprlandsettings) + +windowrulev2 = float,class:(ml4w-hyprland-settings.py) +windowrulev2 = size 700 600,class:(ml4w-hyprland-settings.py) +windowrulev2 = center,class:(ml4w-hyprland-settings.py) + windowrulev2 = float,class:(dotfiles-floating) windowrulev2 = size 1000 800,class:(dotfiles-floating) windowrulev2 = center,class:(dotfiles-floating) -env = APPIMAGELAUNCHER_DISABLE,1 \ No newline at end of file +env = APPIMAGELAUNCHER_DISABLE,1 +env = XCURSOR_SIZE,24 +env = XDG_CURRENT_DESKTOP,Hyprland + diff --git a/hypr/effects/wallpaper/blackwhite b/hypr/effects/wallpaper/blackwhite new file mode 100644 index 0000000..0f985b3 --- /dev/null +++ b/hypr/effects/wallpaper/blackwhite @@ -0,0 +1 @@ +magick $wallpaper -set colorspace Gray -separate -average $used_wallpaper \ No newline at end of file diff --git a/hypr/effects/wallpaper/blackwhite-blur b/hypr/effects/wallpaper/blackwhite-blur new file mode 100644 index 0000000..85a5a51 --- /dev/null +++ b/hypr/effects/wallpaper/blackwhite-blur @@ -0,0 +1,2 @@ +magick $wallpaper -set colorspace Gray -separate -average $used_wallpaper +magick $used_wallpaper -blur "50x30" $used_wallpaper \ No newline at end of file diff --git a/hypr/effects/wallpaper/blackwhite-brightness80 b/hypr/effects/wallpaper/blackwhite-brightness80 new file mode 100644 index 0000000..67bb0ce --- /dev/null +++ b/hypr/effects/wallpaper/blackwhite-brightness80 @@ -0,0 +1,2 @@ +magick $wallpaper -set colorspace Gray -separate -average $used_wallpaper +magick $used_wallpaper -brightness-contrast -20% $used_wallpaper \ No newline at end of file diff --git a/hypr/effects/wallpaper/blur1 b/hypr/effects/wallpaper/blur1 new file mode 100644 index 0000000..f401e1a --- /dev/null +++ b/hypr/effects/wallpaper/blur1 @@ -0,0 +1 @@ +magick $wallpaper -blur "50x30" $used_wallpaper \ No newline at end of file diff --git a/hypr/effects/wallpaper/blur1-brightness80 b/hypr/effects/wallpaper/blur1-brightness80 new file mode 100644 index 0000000..c1984aa --- /dev/null +++ b/hypr/effects/wallpaper/blur1-brightness80 @@ -0,0 +1,2 @@ +magick $wallpaper -blur "50x30" $used_wallpaper +magick $used_wallpaper -brightness-contrast -20% $used_wallpaper \ No newline at end of file diff --git a/hypr/effects/wallpaper/blur2 b/hypr/effects/wallpaper/blur2 new file mode 100644 index 0000000..cb13630 --- /dev/null +++ b/hypr/effects/wallpaper/blur2 @@ -0,0 +1 @@ +magick $wallpaper -blur "10x30" $used_wallpaper \ No newline at end of file diff --git a/hypr/effects/wallpaper/negate b/hypr/effects/wallpaper/negate new file mode 100644 index 0000000..971c7aa --- /dev/null +++ b/hypr/effects/wallpaper/negate @@ -0,0 +1 @@ +magick $wallpaper -negate $used_wallpaper \ No newline at end of file diff --git a/hypr/effects/wallpaper/negate-brightness80 b/hypr/effects/wallpaper/negate-brightness80 new file mode 100644 index 0000000..2d342c1 --- /dev/null +++ b/hypr/effects/wallpaper/negate-brightness80 @@ -0,0 +1,2 @@ +magick $wallpaper -negate $used_wallpaper +magick $used_wallpaper -brightness-contrast -20% $used_wallpaper diff --git a/hypr/hyprland.conf b/hypr/hyprland.conf index 0b2cdbb..45ae6ff 100644 --- a/hypr/hyprland.conf +++ b/hypr/hyprland.conf @@ -6,6 +6,9 @@ # |___/|_| # # ----------------------------------------------------- +# IMPORTANT: Don't overwrite ML4W configuration. +# Create your own custom configuration variation instead. +# https://gitlab.com/stephan-raabe/dotfiles#hyprland-configuration-variations # ----------------------------------------------------- # Monitor @@ -58,7 +61,7 @@ source = ~/dotfiles/hypr/conf/animation.conf source = ~/dotfiles/hypr/conf/custom.conf # ----------------------------------------------------- -# Custom +# ML4W Configuration # ----------------------------------------------------- source = ~/dotfiles/hypr/conf/ml4w.conf diff --git a/hypr/hyprlock.conf b/hypr/hyprlock.conf index 36004f4..65a8b97 100644 --- a/hypr/hyprlock.conf +++ b/hypr/hyprlock.conf @@ -20,7 +20,7 @@ input-field { dots_center = true dots_rounding = -1 # -1 default circle, -2 follow input-field rounding outer_color = rgb(151515) - inner_color = rgb(200, 200, 200) + inner_color = rgb(FFFFFF) font_color = rgb(10, 10, 10) fade_on_empty = true fade_timeout = 1000 # Milliseconds before fade_on_empty is triggered. @@ -47,7 +47,7 @@ label { color = rgba(200, 200, 200, 1.0) font_size = 55 font_family = Fira Semibold - position = -100, -200 + position = -100, -40 halign = right valign = bottom shadow_passes = 5 @@ -65,4 +65,19 @@ label { valign = bottom shadow_passes = 5 shadow_size = 10 +} + +image { + monitor = + path = $HOME/.cache/square_wallpaper.png + size = 280 # lesser side if not 1:1 ratio + rounding = -1 # negative values mean circle + border_size = 4 + border_color = rgb(221, 221, 221) + rotate = 0 # degrees, counter-clockwise + reload_time = -1 # seconds between reloading, 0 to reload with SIGUSR2 +# reload_cmd = # command to get new path. if empty, old path will be used. don't run "follow" commands like tail -F + position = 0, 200 + halign = center + valign = center } \ No newline at end of file diff --git a/hypr/scripts/active-monitor.py b/hypr/scripts/active-monitor.py new file mode 100644 index 0000000..9aad2ae --- /dev/null +++ b/hypr/scripts/active-monitor.py @@ -0,0 +1,18 @@ +import sys +import subprocess +import os +import json +import pathlib +import shutil + +# Get script path +pathname = os.path.dirname(sys.argv[0]) +homeFolder = os.path.expanduser('~') # Path to home folder +dotfiles = homeFolder + "/dotfiles/" + +result = subprocess.run(["bash", dotfiles + "hypr/scripts/monitors.sh"], capture_output=True, text=True) +monitors_json = result.stdout.strip() +monitors_arr = json.loads(monitors_json) +for row in monitors_arr: + if row["focused"]: + print(row["id"]) diff --git a/hypr/scripts/cleanup.sh b/hypr/scripts/cleanup.sh new file mode 100755 index 0000000..51589da --- /dev/null +++ b/hypr/scripts/cleanup.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +# Remove gamemode flag +if [ -f ~/.cache/gamemode ] ;then + rm ~/.cache/gamemode + echo ":: ~/.cache/gamemode removed" +fi \ No newline at end of file diff --git a/hypr/scripts/diagnosis.sh b/hypr/scripts/diagnosis.sh new file mode 100755 index 0000000..a91a668 --- /dev/null +++ b/hypr/scripts/diagnosis.sh @@ -0,0 +1,52 @@ +#!/bin/bash +# ____ _ _ +# | _ \(_) __ _ __ _ _ __ ___ ___(_)___ +# | | | | |/ _` |/ _` | '_ \ / _ \/ __| / __| +# | |_| | | (_| | (_| | | | | (_) \__ \ \__ \ +# |____/|_|\__,_|\__, |_| |_|\___/|___/_|___/ +# |___/ +# + +clear +sleep 0.5 +figlet "Diagnosis" +echo +echo "This script will check that essential packages and " +echo "execution commands are available on your system." +echo + +_commandExists() { + package="$1"; + if ! type $package > /dev/null 2>&1; then + echo ":: ERROR: $package doesn't exists. Please install it with yay -S $2" + else + echo ":: OK: $package found." + fi +} + +_folderExists() { + folder="$1"; + if [ ! -d $folder ]; then + echo ":: ERROR: $folder doesn't exists." + else + echo ":: OK: $folder found." + fi +} + +_commandExists "rofi" "rofi-wayland" +_commandExists "dunst" "dunst" +_commandExists "waybar" "waybar" +_commandExists "hyprpaper" "hyprpaper" +_commandExists "hyprlock" "hyprpaper" +_commandExists "hypridle" "hyprpaper" +_commandExists "wal" "python-pywal" +_commandExists "gum" "gum" +_commandExists "wlogout" "wlogout" +_commandExists "swww" "swww" +_commandExists "eww" "eww" +_commandExists "magick" "imagemagick" +_commandExists "figlet" "figlet" + +echo +echo "Press return to exit" +read \ No newline at end of file diff --git a/hypr/scripts/disabledm.sh b/hypr/scripts/disabledm.sh index fff026f..02b6718 100755 --- a/hypr/scripts/disabledm.sh +++ b/hypr/scripts/disabledm.sh @@ -1,6 +1,5 @@ #!/bin/bash clear - cat <<"EOF" ____ _ _ _ ____ __ __ | _ \(_)___ __ _| |__ | | ___| _ \| \/ | diff --git a/hypr/scripts/eww.sh b/hypr/scripts/eww.sh new file mode 100755 index 0000000..7df4512 --- /dev/null +++ b/hypr/scripts/eww.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# _____ ____ __ +# / _ \ \ /\ / /\ \ /\ / / +# | __/\ V V / \ V V / +# \___| \_/\_/ \_/\_/ +# +EWW=`which eww` +if [[ ! `pidof eww` ]]; then + ${EWW} daemon + sleep 0.5 +fi diff --git a/hypr/scripts/exit.sh b/hypr/scripts/exit.sh deleted file mode 100755 index 0b61635..0000000 --- a/hypr/scripts/exit.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -sleep 1 -killall -9 Hyprland sleep 2 \ No newline at end of file diff --git a/hypr/scripts/gamemode.sh b/hypr/scripts/gamemode.sh new file mode 100755 index 0000000..3ed36ce --- /dev/null +++ b/hypr/scripts/gamemode.sh @@ -0,0 +1,19 @@ +#!/bin/bash +# ____ _ +# / ___| __ _ _ __ ___ ___ _ __ ___ ___ __| | ___ +# | | _ / _` | '_ ` _ \ / _ \ '_ ` _ \ / _ \ / _` |/ _ \ +# | |_| | (_| | | | | | | __/ | | | | | (_) | (_| | __/ +# \____|\__,_|_| |_| |_|\___|_| |_| |_|\___/ \__,_|\___| +# + +if [ -f ~/.cache/gamemode ] ;then + hyprctl keyword animations:enabled true + hyprctl keyword decoration:blur:enabled true + rm ~/.cache/gamemode + notify-send "Gamemode deactivated" "Animations and blur enabled" +else + hyprctl keyword animations:enabled false + hyprctl keyword decoration:blur:enabled false + touch ~/.cache/gamemode + notify-send "Gamemode activated" "Animations and blur disabled" +fi diff --git a/hypr/scripts/gtk.sh b/hypr/scripts/gtk.sh index 5b19731..e412fab 100755 --- a/hypr/scripts/gtk.sh +++ b/hypr/scripts/gtk.sh @@ -1,4 +1,10 @@ #!/bin/bash +# ____ _____ _ __ +# / ___|_ _| |/ / +# | | _ | | | ' / +# | |_| | | | | . \ +# \____| |_| |_|\_\ +# # Source: https://github.com/swaywm/sway/wiki/GTK-3-settings-on-Wayland config="$HOME/.config/gtk-3.0/settings.ini" diff --git a/hypr/scripts/hypridle.sh b/hypr/scripts/hypridle.sh new file mode 100755 index 0000000..e710b41 --- /dev/null +++ b/hypr/scripts/hypridle.sh @@ -0,0 +1,25 @@ +#!/bin/bash +# _ _ _ _ _ +# | | | |_ _ _ __ _ __(_) __| | | ___ +# | |_| | | | | '_ \| '__| |/ _` | |/ _ \ +# | _ | |_| | |_) | | | | (_| | | __/ +# |_| |_|\__, | .__/|_| |_|\__,_|_|\___| +# |___/|_| +# + +SERVICE="hypridle" +if [[ "$1" == "status" ]]; then + sleep 1 + if pgrep -x "$SERVICE" >/dev/null ;then + echo '{"text": "RUNNING", "class": "active", "tooltip": "Screen locking active"}' + else + echo '{"text": "NOT RUNNING", "class": "notactive", "tooltip": "Screen locking deactivated"}' + fi +fi +if [[ "$1" == "toggle" ]]; then + if pgrep -x "$SERVICE" >/dev/null ;then + killall hypridle + else + hypridle + fi +fi diff --git a/hypr/scripts/hyprshade.sh b/hypr/scripts/hyprshade.sh new file mode 100755 index 0000000..ccb9b7f --- /dev/null +++ b/hypr/scripts/hyprshade.sh @@ -0,0 +1,52 @@ +#!/bin/bash +# _ _ _ _ +# | | | |_ _ _ __ _ __ ___| |__ __ _ __| | ___ +# | |_| | | | | '_ \| '__/ __| '_ \ / _` |/ _` |/ _ \ +# | _ | |_| | |_) | | \__ \ | | | (_| | (_| | __/ +# |_| |_|\__, | .__/|_| |___/_| |_|\__,_|\__,_|\___| +# |___/|_| +# + +if [[ "$1" == "rofi" ]]; then + + # Open rofi to select the Hyprshade filter for toggle + options="$(hyprshade ls)\noff" + + # Open rofi + choice=$(echo -e "$options" | rofi -dmenu -replace -config ~/dotfiles/rofi/config-hyprshade.rasi -i -no-show-icons -l 4 -width 30 -p "Hyprshade") + if [ ! -z $choice ] ;then + echo "hyprshade_filter=\"$choice\"" > ~/dotfiles/.settings/hyprshade.sh + dunstify "Changing Hyprshade to $choice" "Toggle shader with SUPER+SHIFT+S" + fi + +else + + # Toggle Hyprshade based on the selected filter + hyprshade_filter="blue-light-filter" + + # Check if hyprshade.sh settings file exists and load + if [ -f ~/dotfiles/.settings/hyprshade.sh ] ;then + source ~/dotfiles/.settings/hyprshade.sh + fi + + # Toggle Hyprshade + if [ "$hyprshade_filter" != "off" ] ;then + if [ -z $(hyprshade current) ] ;then + echo ":: hyprshade is not running" + hyprshade on $hyprshade_filter + notify-send "Hyprshade activated" "with $(hyprshade current)" + echo ":: hyprshade started with $(hyprshade current)" + else + notify-send "Hyprshade deactivated" + echo ":: Current hyprshade $(hyprshade current)" + echo ":: Switching hyprshade off" + hyprshade off + fi + else + if [ -z $(hyprshade current) ] ;then + hyprshade off + fi + echo ":: hyprshade turned off" + fi + +fi diff --git a/hypr/scripts/init-wallpaper-engine.sh b/hypr/scripts/init-wallpaper-engine.sh index bfe31c1..afedd12 100755 --- a/hypr/scripts/init-wallpaper-engine.sh +++ b/hypr/scripts/init-wallpaper-engine.sh @@ -1,4 +1,12 @@ #!/bin/bash +# __ ______ _____ _ +# \ \ / / _ \ | ____|_ __ __ _(_)_ __ ___ +# \ \ /\ / /| |_) | | _| | '_ \ / _` | | '_ \ / _ \ +# \ V V / | __/ | |___| | | | (_| | | | | | __/ +# \_/\_/ |_| |_____|_| |_|\__, |_|_| |_|\___| +# |___/ +# + wallpaper_engine=$(cat $HOME/dotfiles/.settings/wallpaper-engine.sh) if [ "$wallpaper_engine" == "swww" ] ;then # swww diff --git a/hypr/scripts/keybindings.sh b/hypr/scripts/keybindings.sh index c66afb6..bcf5dff 100755 --- a/hypr/scripts/keybindings.sh +++ b/hypr/scripts/keybindings.sh @@ -25,8 +25,7 @@ echo "Reading from: $config_file" # Parse keybindings # ----------------------------------------------------- keybinds=$(grep -oP '(?<=bind = ).*' $config_file) -keybinds=$(echo "$keybinds" | sed 's/$mainMod/SUPER/g'| sed 's/,\([^,]*\)$/ = \1/' | sed 's/, exec//g' | sed 's/^,//g') - +keybinds=$(echo "$keybinds" | sed 's/$mainMod/SUPER/g'| sed 's/,\([^,]*\)$/ = \1/' | sed 's/, exec//g' | sed 's/^,//g') # ----------------------------------------------------- # Show keybindings in rofi # ----------------------------------------------------- diff --git a/hypr/scripts/ml4w-welcome-autostart.sh b/hypr/scripts/ml4w-welcome-autostart.sh index c607c70..4856cee 100755 --- a/hypr/scripts/ml4w-welcome-autostart.sh +++ b/hypr/scripts/ml4w-welcome-autostart.sh @@ -1,14 +1,14 @@ #!/bin/bash if [ ! -f $HOME/.cache/ml4w-welcome-autostart ] ;then - echo "Autostart of ML4W Welcome App enabled." + echo ":: Autostart of ML4W Welcome App enabled." if [ -f $HOME/dotfiles/apps/ML4W_Welcome-x86_64.AppImage ] ;then - echo "Starting ML4W Welcome App ..." + echo ":: Starting ML4W Welcome App ..." sleep 2 $HOME/dotfiles/apps/ML4W_Welcome-x86_64.AppImage else - echo "ML4W Welcome App not found." + echo ":: ML4W Welcome App not found." fi else - echo "Autostart of ML4W Welcome App disabled." + echo ":: Autostart of ML4W Welcome App disabled." fi \ No newline at end of file diff --git a/hypr/scripts/monitors.sh b/hypr/scripts/monitors.sh new file mode 100755 index 0000000..14ea2ea --- /dev/null +++ b/hypr/scripts/monitors.sh @@ -0,0 +1,2 @@ +#!/bin/bash +hyprctl -j monitors \ No newline at end of file diff --git a/hypr/scripts/power.sh b/hypr/scripts/power.sh new file mode 100755 index 0000000..7b9e6e4 --- /dev/null +++ b/hypr/scripts/power.sh @@ -0,0 +1,43 @@ +#!/bin/bash +# ____ +# | _ \ _____ _____ _ __ +# | |_) / _ \ \ /\ / / _ \ '__| +# | __/ (_) \ V V / __/ | +# |_| \___/ \_/\_/ \___|_| +# + +if [[ "$1" == "exit" ]]; then + echo ":: Exit" + sleep 0.5 + killall -9 Hyprland sleep 2 +fi + +if [[ "$1" == "lock" ]]; then + echo ":: Lock" + sleep 0.5 + hyprlock +fi + +if [[ "$1" == "reboot" ]]; then + echo ":: Reboot" + sleep 0.5 + systemctl reboot +fi + +if [[ "$1" == "shutdown" ]]; then + echo ":: Shutdown" + sleep 0.5 + systemctl poweroff +fi + +if [[ "$1" == "suspend" ]]; then + echo ":: Suspend" + sleep 0.5 + systemctl suspend +fi + +if [[ "$1" == "hibernate" ]]; then + echo ":: Hibernate" + sleep 1; + systemctl hibernate +fi \ No newline at end of file diff --git a/hypr/scripts/toggle-animations.sh b/hypr/scripts/toggle-animations.sh new file mode 100755 index 0000000..867ecf4 --- /dev/null +++ b/hypr/scripts/toggle-animations.sh @@ -0,0 +1,13 @@ +#!/bin/bash +cache_file="$HOME/.cache/toggle_animation" +if [[ $(cat $HOME/dotfiles/hypr/conf/animation.conf) == *"disabled"* ]]; then + echo ":: Toggle blocked by disabled.conf variation." +else + if [ -f $cache_file ] ;then + hyprctl keyword animations:enabled true + rm $cache_file + else + hyprctl keyword animations:enabled false + touch $cache_file + fi +fi \ No newline at end of file diff --git a/hypr/scripts/wallpaper-effects.sh b/hypr/scripts/wallpaper-effects.sh new file mode 100755 index 0000000..fb1d020 --- /dev/null +++ b/hypr/scripts/wallpaper-effects.sh @@ -0,0 +1,12 @@ + #!/bin/bash + + # Open rofi to select the Hyprshade filter for toggle + options="$(ls ~/dotfiles/hypr/effects/wallpaper/)\noff" + + # Open rofi + choice=$(echo -e "$options" | rofi -dmenu -replace -config ~/dotfiles/rofi/config-themes.rasi -i -no-show-icons -l 5 -width 30 -p "Hyprshade") + if [ ! -z $choice ] ;then + echo "$choice" > ~/dotfiles/.settings/wallpaper-effect.sh + dunstify "Changing Wallpaper Effect to " "$choice" + ~/dotfiles/hypr/scripts/wallpaper.sh init + fi \ No newline at end of file diff --git a/hypr/scripts/wallpaper.sh b/hypr/scripts/wallpaper.sh index f749345..9226e9e 100755 --- a/hypr/scripts/wallpaper.sh +++ b/hypr/scripts/wallpaper.sh @@ -6,12 +6,18 @@ # \_/\_/ \__,_|_|_| .__/ \__,_| .__/ \___|_| # |_| |_| # -# by Stephan Raabe (2023) +# by Stephan Raabe (2024) # ----------------------------------------------------- # Cache file for holding the current wallpaper +wallpaper_folder="$HOME/wallpaper" +if [ -f ~/dotfiles/.settings/wallpaper-folder.sh ] ;then + source ~/dotfiles/.settings/wallpaper-folder.sh +fi +used_wallpaper="$HOME/.cache/used_wallpaper" cache_file="$HOME/.cache/current_wallpaper" blurred="$HOME/.cache/blurred_wallpaper.png" +square="$HOME/.cache/square_wallpaper.png" rasi_file="$HOME/.cache/current_wallpaper.rasi" blur_file="$HOME/dotfiles/.settings/blur.sh" @@ -21,13 +27,13 @@ blur=$(cat $blur_file) # Create cache file if not exists if [ ! -f $cache_file ] ;then touch $cache_file - echo "$HOME/wallpaper/default.jpg" > "$cache_file" + echo "$wallpaper_folder/default.jpg" > "$cache_file" fi # Create rasi file if not exists if [ ! -f $rasi_file ] ;then touch $rasi_file - echo "* { current-image: url(\"$HOME/wallpaper/default.jpg\", height); }" > "$rasi_file" + echo "* { current-image: url(\"$wallpaper_folder/default.jpg\", height); }" > "$rasi_file" fi current_wallpaper=$(cat "$cache_file") @@ -40,27 +46,27 @@ case $1 in if [ -f $cache_file ]; then wal -q -i $current_wallpaper else - wal -q -i ~/wallpaper/ + wal -q -i $wallpaper_folder/ fi ;; # Select wallpaper with rofi "select") sleep 0.2 - selected=$( find "$HOME/wallpaper" -type f \( -iname "*.jpg" -o -iname "*.jpeg" -o -iname "*.png" \) -exec basename {} \; | sort -R | while read rfile + selected=$( find "$wallpaper_folder" -type f \( -iname "*.jpg" -o -iname "*.jpeg" -o -iname "*.png" \) -exec basename {} \; | sort -R | while read rfile do - echo -en "$rfile\x00icon\x1f$HOME/wallpaper/${rfile}\n" + echo -en "$rfile\x00icon\x1f$wallpaper_folder/${rfile}\n" done | rofi -dmenu -i -replace -config ~/dotfiles/rofi/config-wallpaper.rasi) if [ ! "$selected" ]; then echo "No wallpaper selected" exit fi - wal -q -i ~/wallpaper/$selected + wal -q -i $wallpaper_folder/$selected ;; # Randomly select wallpaper *) - wal -q -i ~/wallpaper/ + wal -q -i $wallpaper_folder/ ;; esac @@ -69,12 +75,11 @@ esac # Load current pywal color scheme # ----------------------------------------------------- source "$HOME/.cache/wal/colors.sh" -echo ":: Wallpaper: $wallpaper" # ----------------------------------------------------- # get wallpaper image name # ----------------------------------------------------- -newwall=$(echo $wallpaper | sed "s|$HOME/wallpaper/||g") +newwall=$(echo $wallpaper | sed "s|$wallpaper_folder/||g") # ----------------------------------------------------- # Reload waybar with new colors @@ -88,11 +93,27 @@ transition_type="wipe" # transition_type="outer" # transition_type="random" +cp $wallpaper $HOME/.cache/ +mv $HOME/.cache/$newwall $used_wallpaper + +# Load Wallpaper Effect +if [ -f $HOME/dotfiles/.settings/wallpaper-effect.sh ] ;then + effect=$(cat $HOME/dotfiles/.settings/wallpaper-effect.sh) + if [ ! "$effect" == "off" ] ;then + if [ "$1" == "init" ] ;then + echo ":: Init" + else + dunstify "Using wallpaper effect $effect..." "with image $newwall" -h int:value:10 -h string:x-dunst-stack-tag:wallpaper + fi + source $HOME/dotfiles/hypr/effects/wallpaper/$effect + fi +fi + wallpaper_engine=$(cat $HOME/dotfiles/.settings/wallpaper-engine.sh) if [ "$wallpaper_engine" == "swww" ] ;then # swww echo ":: Using swww" - swww img $wallpaper \ + swww img $used_wallpaper \ --transition-bezier .43,1.19,1,.4 \ --transition-fps=60 \ --transition-type=$transition_type \ @@ -103,7 +124,7 @@ elif [ "$wallpaper_engine" == "hyprpaper" ] ;then echo ":: Using hyprpaper" killall hyprpaper wal_tpl=$(cat $HOME/dotfiles/.settings/hyprpaper.tpl) - output=${wal_tpl//WALLPAPER/$wallpaper} + output=${wal_tpl//WALLPAPER/$used_wallpaper} echo "$output" > $HOME/dotfiles/hypr/hyprpaper.conf hyprpaper & else @@ -114,8 +135,12 @@ if [ "$1" == "init" ] ;then echo ":: Init" else sleep 1 - dunstify "Changing wallpaper ..." "with image $newwall" -h int:value:33 -h string:x-dunst-stack-tag:wallpaper - sleep 2 + dunstify "Changing wallpaper ..." "with image $newwall" -h int:value:25 -h string:x-dunst-stack-tag:wallpaper + + # ----------------------------------------------------- + # Reload Hyprctl.sh + # ----------------------------------------------------- + $HOME/.config/ml4w-hyprland-settings/hyprctl.sh & fi # ----------------------------------------------------- @@ -124,16 +149,27 @@ fi if [ "$1" == "init" ] ;then echo ":: Init" else - dunstify "Creating blurred version ..." "with image $newwall" -h int:value:66 -h string:x-dunst-stack-tag:wallpaper + dunstify "Creating blurred version ..." "with image $newwall" -h int:value:50 -h string:x-dunst-stack-tag:wallpaper fi -magick $wallpaper -resize 75% $blurred +magick $used_wallpaper -resize 75% $blurred echo ":: Resized to 75%" if [ ! "$blur" == "0x0" ] ;then magick $blurred -blur $blur $blurred echo ":: Blurred" fi +# ----------------------------------------------------- +# Created quare wallpaper +# ----------------------------------------------------- +if [ "$1" == "init" ] ;then + echo ":: Init" +else + dunstify "Creating square version ..." "with image $newwall" -h int:value:75 -h string:x-dunst-stack-tag:wallpaper +fi +magick $wallpaper -gravity Center -extent 1:1 $square +echo ":: Square version created" + # ----------------------------------------------------- # Write selected wallpaper into .cache files # ----------------------------------------------------- diff --git a/hypr/scripts/xdg.sh b/hypr/scripts/xdg.sh index 80691e4..cc8790e 100755 --- a/hypr/scripts/xdg.sh +++ b/hypr/scripts/xdg.sh @@ -9,12 +9,12 @@ sleep 1 # kill all possible running xdg-desktop-portals -killall xdg-desktop-portal-hyprland -killall xdg-desktop-portal-gnome -killall xdg-desktop-portal-kde -killall xdg-desktop-portal-lxqt -killall xdg-desktop-portal-wlr -killall xdg-desktop-portal-gtk +killall -e xdg-desktop-portal-hyprland +killall -e xdg-desktop-portal-gnome +killall -e xdg-desktop-portal-kde +killall -e xdg-desktop-portal-lxqt +killall -e xdg-desktop-portal-wlr +killall -e xdg-desktop-portal-gtk killall xdg-desktop-portal sleep 1 diff --git a/hypr/shaders/invert-colors.glsl b/hypr/shaders/invert-colors.glsl new file mode 100644 index 0000000..a504901 --- /dev/null +++ b/hypr/shaders/invert-colors.glsl @@ -0,0 +1,8 @@ +precision highp float; +varying vec2 v_texcoord; +uniform sampler2D tex; + +void main() { + vec4 pixColor = texture2D(tex, v_texcoord); + gl_FragColor = vec4(1.0 - pixColor.r, 1.0 - pixColor.g, 1.0 - pixColor.b, pixColor.a); +} diff --git a/install.sh b/install.sh index b93aea4..730a327 100755 --- a/install.sh +++ b/install.sh @@ -27,14 +27,15 @@ echo "Version: $version" echo "by Stephan Raabe 2024" echo "" if [ -d ~/dotfiles ] ;then - echo "A ML4W Dotfiles installation has been detected." - echo "This script will guide you through the update process of the ML4W Dotfiles." + echo ":: An existing ML4W Dotfiles installation has been detected." + echo ":: This script will guide you through the update process of the ML4W Dotfiles." else - echo "This script will guide you through the installation process of the ML4W dotfiles." + echo ":: This script will guide you through the installation process of the ML4W dotfiles." fi echo "" source .install/required.sh source .install/confirm-start.sh +source .install/paralleldownloads.sh source .install/yay.sh source .install/updatesystem.sh source .install/backup.sh @@ -66,8 +67,8 @@ source .install/issue.sh source .install/restore.sh source .install/keyboard.sh source .install/neovim.sh -source .install/vm.sh source .install/hook.sh +source .install/vm.sh source .install/copy.sh source .install/init-pywal.sh if [[ $profile == *"Hyprland"* ]]; then @@ -81,5 +82,6 @@ source .install/apps.sh source .install/gtk.sh source .install/bashrc.sh source .install/cleanup.sh +source .install/diagnosis.sh source .install/reboot.sh sleep 3 diff --git a/qtile/scripts/diagnosis.sh b/qtile/scripts/diagnosis.sh new file mode 100755 index 0000000..65f5ec7 --- /dev/null +++ b/qtile/scripts/diagnosis.sh @@ -0,0 +1,37 @@ +#!/bin/bash +clear +sleep 0.5 +figlet "Diagnosis" +echo +echo "This script will check that essential packages and " +echo "execution commands are available on your system." +echo + +_commandExists() { + package="$1"; + if ! type $package > /dev/null 2>&1; then + echo ":: ERROR: $package doesn't exists. Please install it with yay -S $2" + else + echo ":: OK: $package found." + fi +} + +_folderExists() { + folder="$1"; + if [ ! -d $folder ]; then + echo ":: ERROR: $folder doesn't exists." + else + echo ":: OK: $folder found." + fi +} + +_commandExists "rofi" "rofi-wayland" +_commandExists "dunst" "dunst" +_commandExists "wal" "python-pywal" +_commandExists "gum" "gum" +_commandExists "magick" "imagemagick" +_commandExists "figlet" "figlet" + +echo +echo "Press return to exit" +read \ No newline at end of file diff --git a/qtile/scripts/powermenu.sh b/qtile/scripts/powermenu.sh index ca23ffb..dcfcf07 100755 --- a/qtile/scripts/powermenu.sh +++ b/qtile/scripts/powermenu.sh @@ -9,11 +9,7 @@ # by Stephan Raabe (2023) # ----------------------------------------------------- echo $XDG_SESSION_TYPE -if [ $XDG_SESSION_TYPE == "wayland" ]; then - lockapp=swaylock -else - lockapp=slock -fi +lockapp=slock echo "Using $lockapp to lock the screen." option1=" lock" diff --git a/qtile/scripts/wallpaper.sh b/qtile/scripts/wallpaper.sh index f40b8b4..69bea1a 100755 --- a/qtile/scripts/wallpaper.sh +++ b/qtile/scripts/wallpaper.sh @@ -10,6 +10,10 @@ # ----------------------------------------------------- # Cache file for holding the current wallpaper +wallpaper_folder="$HOME/wallpaper" +if [ -f ~/dotfiles/.settings/wallpaper-folder.sh ] ;then + source ~/dotfiles/.settings/wallpaper-folder.sh +fi cache_file="$HOME/.cache/current_wallpaper" blurred="$HOME/.cache/blurred_wallpaper.png" rasi_file="$HOME/.cache/current_wallpaper.rasi" @@ -17,13 +21,13 @@ rasi_file="$HOME/.cache/current_wallpaper.rasi" # Create cache file if not exists if [ ! -f $cache_file ] ;then touch $cache_file - echo "$HOME/wallpaper/default.jpg" > "$cache_file" + echo "$wallpaper_folder/default.jpg" > "$cache_file" fi # Create rasi file if not exists if [ ! -f $rasi_file ] ;then touch $rasi_file - echo "* { current-image: url(\"$HOME/wallpaper/default.jpg\", height); }" > "$rasi_file" + echo "* { current-image: url(\"$wallpaper_folder/default.jpg\", height); }" > "$rasi_file" fi current_wallpaper=$(cat "$cache_file") @@ -35,26 +39,26 @@ case $1 in if [ -f $cache_file ]; then wal -q -i $current_wallpaper else - wal -q -i ~/wallpaper/ + wal -q -i $wallpaper_folder fi ;; # Select wallpaper with rofi "select") - selected=$( find "$HOME/wallpaper" -type f \( -iname "*.jpg" -o -iname "*.jpeg" -o -iname "*.png" \) -exec basename {} \; | sort -R | while read rfile + selected=$( find "$wallpaper_folder" -type f \( -iname "*.jpg" -o -iname "*.jpeg" -o -iname "*.png" \) -exec basename {} \; | sort -R | while read rfile do - echo -en "$rfile\x00icon\x1f$HOME/wallpaper/${rfile}\n" + echo -en "$rfile\x00icon\x1f$wallpaper_folder/${rfile}\n" done | rofi -dmenu -replace -l 6 -config ~/dotfiles/rofi/config-wallpaper.rasi) if [ ! "$selected" ]; then echo "No wallpaper selected" exit fi - wal -q -i ~/wallpaper/$selected + wal -q -i $wallpaper_folder/$selected ;; # Randomly select wallpaper *) - wal -q -i ~/wallpaper/ + wal -q -i $wallpaper_folder/ ;; esac diff --git a/rofi/config-compact.rasi b/rofi/config-compact.rasi index 422f047..ba54e22 100644 --- a/rofi/config-compact.rasi +++ b/rofi/config-compact.rasi @@ -19,7 +19,8 @@ configuration { display-run: "RUN"; display-filebrowser: "FILES"; display-window: "WINDOW"; - hover-select: true; + hover-select: false; + scroll-method: 1; me-select-entry: ""; me-accept-entry: "MousePrimary"; drun-display-format: "{name}"; @@ -150,8 +151,8 @@ listview { enabled: true; columns: 1; lines: 8; - cycle: true; - dynamic: true; + cycle: false; + dynamic: false; scrollbar: false; layout: vertical; reverse: false; diff --git a/rofi/config-hyprshade.rasi b/rofi/config-hyprshade.rasi new file mode 100644 index 0000000..8a617c4 --- /dev/null +++ b/rofi/config-hyprshade.rasi @@ -0,0 +1,262 @@ +/* +# ____ __ _ +# | _ \ ___ / _(_) +# | |_) / _ \| |_| | +# | _ < (_) | _| | +# |_| \_\___/|_| |_| +# +# by Stephan Raabe (2023) +# ----------------------------------------------------- +*/ + +/* ---- Configuration ---- */ +configuration { + modi: "drun,run"; + font: "Fira Sans 11"; + show-icons: false; + icon-theme: "kora"; + display-drun: "APPS"; + display-run: "RUN"; + display-filebrowser: "FILES"; + display-window: "WINDOW"; + hover-select: true; + me-select-entry: ""; + me-accept-entry: "MousePrimary"; + drun-display-format: "{name}"; + window-format: "{w} · {c} · {t}"; + +} + +/* ---- Load font ---- */ +@import "~/dotfiles/.settings/rofi-font.rasi" + +/* ---- Load pywal colors (custom wal template) ---- */ +@import "~/.cache/wal/colors-rofi-pywal" + +/* ---- Load wallpaper ---- */ +@import "~/.cache/current_wallpaper.rasi" + +/* ---- Load border width ---- */ +@import "~/dotfiles/.settings/rofi-border.rasi" + +/* ---- Window ---- */ +window { + width: 400px; + x-offset: -14px; + y-offset: 65px; + spacing: 0px; + padding: 0px; + margin: 0px; + color: #FFFFFF; + border: @border-width; + border-color: #FFFFFF; + cursor: "default"; + transparency: "real"; + location: center; + anchor: center; + fullscreen: false; + enabled: true; + border-radius: 10px; + background-color: transparent; +} + +/* ---- Mainbox ---- */ +mainbox { + enabled: true; + orientation: horizontal; + spacing: 0px; + margin: 0px; + background-color: @background; + background-image: @current-image; + children: ["listbox"]; +} + +/* ---- Imagebox ---- */ +imagebox { + padding: 18px; + background-color: transparent; + orientation: vertical; + children: [ "inputbar", "dummy", "mode-switcher" ]; +} + +/* ---- Listbox ---- */ +listbox { + spacing: 20px; + background-color: transparent; + orientation: vertical; + children: [ "listview" ]; +} + +/* ---- Dummy ---- */ +dummy { + background-color: transparent; +} + +/* ---- Inputbar ---- */ +inputbar { + enabled: true; + text-color: @foreground; + spacing: 10px; + padding: 15px; + border-radius: 0px; + border-color: @foreground; + background-color: @background; + children: [ "textbox-prompt-colon", "entry" ]; +} + +textbox-prompt-colon { + enabled: true; + expand: false; + padding: 0px 5px 0px 0px; + str: ""; + background-color: transparent; + text-color: inherit; +} + +entry { + enabled: true; + background-color: transparent; + text-color: inherit; + cursor: text; + placeholder: "Search"; + placeholder-color: inherit; +} + +/* ---- Mode Switcher ---- */ +mode-switcher{ + enabled: true; + spacing: 20px; + background-color: transparent; + text-color: @foreground; +} + +button { + padding: 10px; + border-radius: 10px; + background-color: @background; + text-color: inherit; + cursor: pointer; + border: 0px; +} + +button selected { + background-color: @color11; + text-color: @foreground; +} + +/* ---- Listview ---- */ +listview { + enabled: true; + columns: 1; + lines: 2; + cycle: true; + dynamic: true; + scrollbar: false; + layout: vertical; + reverse: false; + fixed-height: true; + fixed-columns: true; + spacing: 0px; + padding: 10px; + margin: 0px; + background-color: @background; + border:0px; +} + +/* ---- Element ---- */ +element { + enabled: true; + padding: 10px; + margin: 5px; + cursor: pointer; + background-color: @background; + border-radius: 10px; + border: @border-width; +} + +element normal.normal { + background-color: inherit; + text-color: @foreground; +} + +element normal.urgent { + background-color: inherit; + text-color: @foreground; +} + +element normal.active { + background-color: inherit; + text-color: @foreground; +} + +element selected.normal { + background-color: @color11; + text-color: @foreground; +} + +element selected.urgent { + background-color: inherit; + text-color: @foreground; +} + +element selected.active { + background-color: inherit; + text-color: @foreground; +} + +element alternate.normal { + background-color: inherit; + text-color: @foreground; +} + +element alternate.urgent { + background-color: inherit; + text-color: @foreground; +} + +element alternate.active { + background-color: inherit; + text-color: @foreground; +} + +element-icon { + background-color: transparent; + text-color: inherit; + size: 32px; + cursor: inherit; +} + +element-text { + background-color: transparent; + text-color: inherit; + cursor: inherit; + vertical-align: 0.5; + horizontal-align: 0.0; +} + +/*****----- Message -----*****/ +message { + background-color: transparent; + border:0px; + margin:20px 0px 0px 0px; + padding:0px; + spacing:0px; + border-radius: 10px; +} + +textbox { + padding: 15px; + margin: 0px; + border-radius: 0px; + background-color: @background; + text-color: @foreground; + vertical-align: 0.5; + horizontal-align: 0.0; +} + +error-message { + padding: 15px; + border-radius: 20px; + background-color: @background; + text-color: @foreground; +} diff --git a/rofi/config-ml4w-launcher.rasi b/rofi/config-ml4w-launcher.rasi new file mode 100644 index 0000000..e5e82f0 --- /dev/null +++ b/rofi/config-ml4w-launcher.rasi @@ -0,0 +1,261 @@ +/* +# ____ __ _ +# | _ \ ___ / _(_) +# | |_) / _ \| |_| | +# | _ < (_) | _| | +# |_| \_\___/|_| |_| +# +# by Stephan Raabe (2023) +# ----------------------------------------------------- +*/ + +/* ---- Configuration ---- */ +configuration { + modi: "drun,run"; + font: "Fira Sans 8"; + show-icons: false; + display-drun: "APPS"; + display-run: "RUN"; + display-filebrowser: "FILES"; + display-window: "WINDOW"; + hover-select: true; + me-select-entry: ""; + me-accept-entry: "MousePrimary"; + drun-display-format: "{name}"; + window-format: "{w} · {c} · {t}"; + +} + +/* ---- Load font ---- */ +@import "~/dotfiles/.settings/rofi-font.rasi" + +/* ---- Load pywal colors (custom wal template) ---- */ +@import "~/.cache/wal/colors-rofi-pywal" + +/* ---- Load wallpaper ---- */ +@import "~/.cache/current_wallpaper.rasi" + +/* ---- Load border width ---- */ +@import "~/dotfiles/.settings/rofi-border.rasi" + +/* ---- Window ---- */ +window { + width: 260px; + x-offset: -14px; + y-offset: 15px; + spacing: 0px; + padding: 0px; + margin: 0px; + color: #FFFFFF; + border: @border-width; + border-color: #FFFFFF; + cursor: "default"; + transparency: "real"; + location: northeast; + anchor: northeast; + fullscreen: false; + enabled: true; + border-radius: 10px; + background-color: transparent; +} + +/* ---- Mainbox ---- */ +mainbox { + enabled: true; + orientation: horizontal; + spacing: 0px; + margin: 0px; + background-color: @background; + background-image: @current-image; + children: ["listbox"]; +} + +/* ---- Imagebox ---- */ +imagebox { + padding: 18px; + background-color: transparent; + orientation: vertical; + children: [ "inputbar", "dummy", "mode-switcher" ]; +} + +/* ---- Listbox ---- */ +listbox { + spacing: 20px; + background-color: transparent; + orientation: vertical; + children: [ "listview" ]; +} + +/* ---- Dummy ---- */ +dummy { + background-color: transparent; +} + +/* ---- Inputbar ---- */ +inputbar { + enabled: true; + text-color: @foreground; + spacing: 10px; + padding: 15px; + border-radius: 0px; + border-color: @foreground; + background-color: @background; + children: [ "textbox-prompt-colon", "entry" ]; +} + +textbox-prompt-colon { + enabled: true; + expand: false; + padding: 0px 5px 0px 0px; + str: ""; + background-color: transparent; + text-color: inherit; +} + +entry { + enabled: true; + background-color: transparent; + text-color: inherit; + cursor: text; + placeholder: "Search"; + placeholder-color: inherit; +} + +/* ---- Mode Switcher ---- */ +mode-switcher{ + enabled: true; + spacing: 20px; + background-color: transparent; + text-color: @foreground; +} + +button { + padding: 10px; + border-radius: 10px; + background-color: @background; + text-color: inherit; + cursor: pointer; + border: 0px; +} + +button selected { + background-color: @color11; + text-color: @foreground; +} + +/* ---- Listview ---- */ +listview { + enabled: true; + columns: 1; + lines: 2; + cycle: true; + dynamic: true; + scrollbar: false; + layout: vertical; + reverse: false; + fixed-height: true; + fixed-columns: true; + spacing: 0px; + padding: 10px; + margin: 0px; + background-color: @background; + border:0px; +} + +/* ---- Element ---- */ +element { + enabled: true; + padding: 10px; + margin: 5px; + cursor: pointer; + background-color: @background; + border-radius: 10px; + border: @border-width; +} + +element normal.normal { + background-color: inherit; + text-color: @foreground; +} + +element normal.urgent { + background-color: inherit; + text-color: @foreground; +} + +element normal.active { + background-color: inherit; + text-color: @foreground; +} + +element selected.normal { + background-color: @color11; + text-color: @foreground; +} + +element selected.urgent { + background-color: inherit; + text-color: @foreground; +} + +element selected.active { + background-color: inherit; + text-color: @foreground; +} + +element alternate.normal { + background-color: inherit; + text-color: @foreground; +} + +element alternate.urgent { + background-color: inherit; + text-color: @foreground; +} + +element alternate.active { + background-color: inherit; + text-color: @foreground; +} + +element-icon { + background-color: transparent; + text-color: inherit; + size: 32px; + cursor: inherit; +} + +element-text { + background-color: transparent; + text-color: inherit; + cursor: inherit; + vertical-align: 0.5; + horizontal-align: 0.0; +} + +/*****----- Message -----*****/ +message { + background-color: transparent; + border:0px; + margin:20px 0px 0px 0px; + padding:0px; + spacing:0px; + border-radius: 10px; +} + +textbox { + padding: 15px; + margin: 0px; + border-radius: 0px; + background-color: @background; + text-color: @foreground; + vertical-align: 0.5; + horizontal-align: 0.0; +} + +error-message { + padding: 15px; + border-radius: 20px; + background-color: @background; + text-color: @foreground; +} diff --git a/rofi/config-themes.rasi b/rofi/config-themes.rasi index fc7b340..b1f3a56 100644 --- a/rofi/config-themes.rasi +++ b/rofi/config-themes.rasi @@ -19,12 +19,12 @@ configuration { display-run: "RUN"; display-filebrowser: "FILES"; display-window: "WINDOW"; - hover-select: true; + hover-select: false; me-select-entry: ""; me-accept-entry: "MousePrimary"; drun-display-format: "{name}"; window-format: "{w} · {c} · {t}"; - + scroll-method: 1; } /* ---- Load font ---- */ @@ -150,8 +150,8 @@ listview { enabled: true; columns: 1; lines: 8; - cycle: true; - dynamic: true; + cycle: false; + dynamic: false; scrollbar: false; layout: vertical; reverse: false; diff --git a/rofi/config-wallpaper.rasi b/rofi/config-wallpaper.rasi index a218490..e137f7e 100644 --- a/rofi/config-wallpaper.rasi +++ b/rofi/config-wallpaper.rasi @@ -14,12 +14,12 @@ configuration { modi: "drun,run"; font: "Fira Sans 11"; show-icons: true; - hover-select: true; + hover-select: false; me-select-entry: ""; me-accept-entry: "MousePrimary"; drun-display-format: "{name}"; window-format: "{w} · {c} · {t}"; - + scroll-method: 1; } /* ---- Load font ---- */ @@ -144,8 +144,8 @@ listview { enabled: true; columns: 6; lines: 3; - cycle: true; - dynamic: true; + cycle: false; + dynamic: false; scrollbar: true; layout: vertical; reverse: false; diff --git a/rofi/config.rasi b/rofi/config.rasi index 5a658ef..f4f1e0f 100644 --- a/rofi/config.rasi +++ b/rofi/config.rasi @@ -20,7 +20,8 @@ configuration { display-filebrowser: "FILES"; display-window: "WINDOW"; drun-display-format: "{name}"; - hover-select: true; + hover-select: false; + scroll-method: 1; me-select-entry: ""; me-accept-entry: "MousePrimary"; window-format: "{w} · {c} · {t}"; @@ -150,8 +151,8 @@ listview { enabled: true; columns: 1; lines: 8; - cycle: true; - dynamic: true; + cycle: false; + dynamic: false; scrollbar: false; layout: vertical; reverse: false; diff --git a/screenshots/screenshot-dotfiles-settings-app.png b/screenshots/screenshot-dotfiles-settings-app.png deleted file mode 100644 index d6657f1..0000000 Binary files a/screenshots/screenshot-dotfiles-settings-app.png and /dev/null differ diff --git a/screenshots/screenshot-welcome.app.png b/screenshots/screenshot-welcome.app.png deleted file mode 100644 index 8038959..0000000 Binary files a/screenshots/screenshot-welcome.app.png and /dev/null differ diff --git a/screenshots/screenshot1.png b/screenshots/screenshot1.png new file mode 100644 index 0000000..62ddec7 Binary files /dev/null and b/screenshots/screenshot1.png differ diff --git a/screenshots/screenshot2.png b/screenshots/screenshot2.png new file mode 100644 index 0000000..61d58f6 Binary files /dev/null and b/screenshots/screenshot2.png differ diff --git a/screenshots/screenshot3.png b/screenshots/screenshot3.png new file mode 100644 index 0000000..ceb4e71 Binary files /dev/null and b/screenshots/screenshot3.png differ diff --git a/screenshots/screenshot4.png b/screenshots/screenshot4.png new file mode 100644 index 0000000..afbf600 Binary files /dev/null and b/screenshots/screenshot4.png differ diff --git a/screenshots/v27/screenshot-27-1.png b/screenshots/v27/screenshot-27-1.png deleted file mode 100644 index b84be26..0000000 Binary files a/screenshots/v27/screenshot-27-1.png and /dev/null differ diff --git a/screenshots/v27/screenshot-27-2.png b/screenshots/v27/screenshot-27-2.png deleted file mode 100644 index 1e03071..0000000 Binary files a/screenshots/v27/screenshot-27-2.png and /dev/null differ diff --git a/screenshots/v27/screenshot-27-3.png b/screenshots/v27/screenshot-27-3.png deleted file mode 100644 index d92fac8..0000000 Binary files a/screenshots/v27/screenshot-27-3.png and /dev/null differ diff --git a/screenshots/v27/screenshot-27-4.png b/screenshots/v27/screenshot-27-4.png deleted file mode 100644 index 47e2e5b..0000000 Binary files a/screenshots/v27/screenshot-27-4.png and /dev/null differ diff --git a/screenshots/v271/screenshot-271-1.png b/screenshots/v271/screenshot-271-1.png deleted file mode 100644 index 919ad9a..0000000 Binary files a/screenshots/v271/screenshot-271-1.png and /dev/null differ diff --git a/screenshots/v28/screenshot-28-1.png b/screenshots/v28/screenshot-28-1.png deleted file mode 100644 index 2b9d44d..0000000 Binary files a/screenshots/v28/screenshot-28-1.png and /dev/null differ diff --git a/screenshots/v28/screenshot-28-2.png b/screenshots/v28/screenshot-28-2.png deleted file mode 100644 index dfa1e54..0000000 Binary files a/screenshots/v28/screenshot-28-2.png and /dev/null differ diff --git a/screenshots/v28/screenshot-28-3.png b/screenshots/v28/screenshot-28-3.png deleted file mode 100644 index c9c8b9e..0000000 Binary files a/screenshots/v28/screenshot-28-3.png and /dev/null differ diff --git a/screenshots/v281/screenshot-281-1.png b/screenshots/v281/screenshot-281-1.png deleted file mode 100644 index 5a03527..0000000 Binary files a/screenshots/v281/screenshot-281-1.png and /dev/null differ diff --git a/screenshots/v283/screenshot-283-1.png b/screenshots/v283/screenshot-283-1.png deleted file mode 100644 index 4b62b82..0000000 Binary files a/screenshots/v283/screenshot-283-1.png and /dev/null differ diff --git a/screenshots/v283/screenshot-283-2.png b/screenshots/v283/screenshot-283-2.png deleted file mode 100644 index 5c2efbe..0000000 Binary files a/screenshots/v283/screenshot-283-2.png and /dev/null differ diff --git a/screenshots/v284/screenshot-284-1.png b/screenshots/v284/screenshot-284-1.png deleted file mode 100644 index 35cec80..0000000 Binary files a/screenshots/v284/screenshot-284-1.png and /dev/null differ diff --git a/screenshots/variations/variations1.png b/screenshots/variations/variations1.png deleted file mode 100644 index 7e5d50f..0000000 Binary files a/screenshots/variations/variations1.png and /dev/null differ diff --git a/screenshots/variations/variations2.png b/screenshots/variations/variations2.png deleted file mode 100644 index 6801b46..0000000 Binary files a/screenshots/variations/variations2.png and /dev/null differ diff --git a/screenshots/variations/variations3.png b/screenshots/variations/variations3.png deleted file mode 100644 index d32e5f4..0000000 Binary files a/screenshots/variations/variations3.png and /dev/null differ diff --git a/screenshots/variations/variations4.png b/screenshots/variations/variations4.png deleted file mode 100644 index 518104e..0000000 Binary files a/screenshots/variations/variations4.png and /dev/null differ diff --git a/screenshots/welcome-update-dotfiles.png b/screenshots/welcome-update-dotfiles.png deleted file mode 100644 index 9c6e467..0000000 Binary files a/screenshots/welcome-update-dotfiles.png and /dev/null differ diff --git a/scripts/bravebookmarks.sh b/scripts/bravebookmarks.sh deleted file mode 100755 index 1784c39..0000000 --- a/scripts/bravebookmarks.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash -# ____ _ _ -# | __ ) ___ ___ | | ___ __ ___ __ _ _ __| | _____ -# | _ \ / _ \ / _ \| |/ / '_ ` _ \ / _` | '__| |/ / __| -# | |_) | (_) | (_) | <| | | | | | (_| | | | <\__ \ -# |____/ \___/ \___/|_|\_\_| |_| |_|\__,_|_| |_|\_\___/ -# -# by Stephan Raabe (2023) -# ----------------------------------------------------- - -selected=$(cat ~/.config/BraveSoftware/Brave-Browser/Default/Bookmarks | grep '"url":' | awk '{print $2}' | sed 's/"//g' | rofi -dmenu -p "Select a Brave Bookmark") - -if [ "$selected" ]; then - brave $selected -fi diff --git a/scripts/calculator.sh b/scripts/calculator.sh deleted file mode 100755 index de14ba7..0000000 --- a/scripts/calculator.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash -# ____ _ _ _ -# / ___|__ _| | ___ _ _| | __ _| |_ ___ _ __ -# | | / _` | |/ __| | | | |/ _` | __/ _ \| '__| -# | |__| (_| | | (__| |_| | | (_| | || (_) | | -# \____\__,_|_|\___|\__,_|_|\__,_|\__\___/|_| -# -# -# by Stephan Raabe (2023) -# ----------------------------------------------------- - -rofi -show calc diff --git a/scripts/diagnosis.sh b/scripts/diagnosis.sh deleted file mode 100755 index ee766c9..0000000 --- a/scripts/diagnosis.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash -clear -sleep 0.5 -figlet "Diagnosis" -echo -echo "This script will check if some core packages are available on your system." -echo - -_commandExists() { - package="$1"; - if ! type $package > /dev/null; then - echo ":: ERROR: $package doesn't exists. Please install it." - else - echo ":: OK: $package found." - fi -} - -_folderExists() { - folder="$1"; - if [ ! -d $folder ]; then - echo ":: ERROR: $folder doesn't exists." - else - echo ":: OK: $folder found." - fi -} - -_commandExists "rofi" -_commandExists "dunst" -_commandExists "waybar" -_commandExists "swww" -_commandExists "wal" -_commandExists "gum" -_commandExists "wlogout" - -echo -echo "Press return to close the window" -read \ No newline at end of file diff --git a/scripts/installupdates.sh b/scripts/installupdates.sh index 1f78dd8..2a2ad73 100755 --- a/scripts/installupdates.sh +++ b/scripts/installupdates.sh @@ -13,7 +13,7 @@ sleep 1 clear figlet "Updates" - +echo _isInstalledYay() { package="$1"; check="$(yay -Qs --color always "${package}" | grep "local" | grep "${package} ")"; diff --git a/scripts/launchvm.sh b/scripts/launchvm.sh index 953bbd4..7815b41 100755 --- a/scripts/launchvm.sh +++ b/scripts/launchvm.sh @@ -1,35 +1,60 @@ #!/bin/bash -# _ _ __ ____ __ -# | | __ _ _ _ _ __ ___| |__ \ \ / / \/ | -# | | / _` | | | | '_ \ / __| '_ \ \ \ / /| |\/| | -# | |__| (_| | |_| | | | | (__| | | | \ V / | | | | -# |_____\__,_|\__,_|_| |_|\___|_| |_| \_/ |_| |_| -# -# -# by Stephan Raabe (2023) -# ----------------------------------------------------- +# _ _ __ ____ __ +# | | __ _ _ _ _ __ ___| |__ \ \ / / \/ | +# | | / _` | | | | '_ \ / __| '_ \ \ \ / /| |\/| | +# | |__| (_| | |_| | | | | (__| | | | \ V / | | | | +# |_____\__,_|\__,_|_| |_|\___|_| |_| \_/ |_| |_| +# +# +# by Stephan Raabe (2023) +# ----------------------------------------------------- if [ -f ~/private/win11-credentials.sh ]; then - echo "Credential file exists. Using the file." - source ~/private/win11-credentials.sh + echo "Credential file exists. Using the file." + source ~/private/win11-credentials.sh else - win11user="USER" - win11pass="PASS" - vmip="192.168.122.44" + win11user="USER" + win11pass="PASS" + win11ip="192.168.122.44" + win11name="windows11" + + echo "## Preparing to remotely access your Windows virtual machine ##" + + echo -n "Please enter your virtual machine name [default: $win11name]: " + read vmname + vmname=${vmname:-$win11name} + + echo -n "Please enter your virtual machine ip [default: $win11ip]: " + read vmip + vmip=${vmip:-$win11ip} + + echo -n "Please enter your username [default: $win11user]: " + read user + user=${user:-$win11user} + + echo -n "Please enter your password [default: $win11pass]: " + read password + password=${password:-$win11pass} fi +# echo "Hello, $vmname, $vmip, $user, $password" -tmp=$(virsh --connect qemu:///system list | grep " win11 " | awk '{ print $3}') +tmp=$(virsh --connect qemu:///system list | grep " $vmname " | awk '{ print $3}') -if ([ "x$tmp" == "x" ] || [ "x$tmp" != "xrunning" ]) -then - echo "Virtual Machine win11 is starting now... Waiting 30s before starting xfreerdp." - notify-send "Virtual Machine win11 is starting now..." "Waiting 30s before starting xfreerdp." - virsh --connect qemu:///system start win11 - sleep 30 +if ([ "x$tmp" == "x" ] || [ "x$tmp" != "xrunning" ]); then + echo "Virtual Machine $vmname is starting now... Waiting 30s before starting xfreerdp." + notify-send "Virtual Machine $vmname 11 is starting now..." "Waiting 30s before starting xfreerdp." + virsh --connect qemu:///system start $vmname + sleep 30 else - notify-send "Virtual Machine win11 is already running." "Launching xfreerdp now!" - echo "Starting xfreerdp now..." + notify-send "Virtual Machine $vmname is already running." "Launching xfreerdp now!" + echo "Starting xfreerdp now..." fi -xfreerdp -grab-keyboard /v:$vmip /size:100% /cert-ignore /u:$win11user /p:$win11pass /d: /dynamic-resolution /gfx-h264:avc444 +gfx-progressive & +if command -v xfreerdp >/dev/null 2>&1; then + xfreerdp -grab-keyboard /v:$vmip /size:100% /cert-ignore /u:$user /p:$password /d: /dynamic-resolution /gfx-h264:avc444 +gfx-progressive /f & +elif command -v xfreerdp3 >/dev/null 2>&1; then + xfreerdp3 -v:$vmip -u:$user -p:$password -d: -dynamic-resolution /cert:ignore /f /gfx:AVC444 & +else + echo "'xfreerdp' or 'xfreerdp3' command not found." +fi diff --git a/scripts/lid-improvements.sh b/scripts/lid-improvements.sh new file mode 100755 index 0000000..2ffad61 --- /dev/null +++ b/scripts/lid-improvements.sh @@ -0,0 +1,12 @@ +#!/bin/bash +while IFS= read -r line; do + # If the line starts with # and the next line is not the lines to be added + if [[ $line == \#HandleLidSwitchDocked=ignore ]]; then + # Add the new lines + echo "HandleLidSwitchDocked=ignore" | sudo tee -a /etc/systemd/logind.conf > /dev/null + fi + if [[ $line == \#HoldoffTimeoutSec=5s ]]; then + # Add the new lines + echo "HoldoffTimeoutSec=5s" | sudo tee -a /etc/systemd/logind.conf > /dev/null + fi +done < /etc/systemd/logind.conf \ No newline at end of file diff --git a/scripts/nm-applet.sh b/scripts/nm-applet.sh new file mode 100755 index 0000000..37c01e2 --- /dev/null +++ b/scripts/nm-applet.sh @@ -0,0 +1,6 @@ +#!/bin/bash +if [[ "$1" == "stop" ]]; then + killall nm-applet +else + nm-applet --indicator & +fi diff --git a/scripts/pacman.sh b/scripts/pacman.sh new file mode 100755 index 0000000..7c1fbdd --- /dev/null +++ b/scripts/pacman.sh @@ -0,0 +1,58 @@ +#!/bin/bash +# ____ +# | _ \ __ _ ___ _ __ ___ __ _ _ __ +# | |_) / _` |/ __| '_ ` _ \ / _` | '_ \ +# | __/ (_| | (__| | | | | | (_| | | | | +# |_| \__,_|\___|_| |_| |_|\__,_|_| |_| +# + +sleep 1 +clear +figlet "pacman.conf" +echo +echo ":: This script will activate or deactivate additions for your pacman.conf." +echo +if grep -Fq "#ParallelDownloads" /etc/pacman.conf +then + if gum confirm "Do you want to activate parallel downloads?" ;then + sudo sed -i 's/^#ParallelDownloads/ParallelDownloads/' /etc/pacman.conf + else + echo ":: Activation of parallel downloads skipped." + fi +else + echo ":: Parallel downloads are already activated." +fi + +if grep -Fxq "#Color" /etc/pacman.conf +then + if gum confirm "Do you want to activate colors?" ;then + sudo sed -i 's/^#Color/Color/' /etc/pacman.conf + else + echo ":: Activation of Color skipped." + fi +else + echo ":: Color is already activated." +fi + +if grep -Fxq "#VerbosePkgLists" /etc/pacman.conf +then + if gum confirm "Do you want to activate VerbosePkgLists?" ;then + sudo sed -i 's/^#VerbosePkgLists/VerbosePkgLists/' /etc/pacman.conf + else + echo ":: Activation of VerbosePkgLists skipped." + fi +else + echo ":: VerbosePkgLists is already activated." +fi + +if grep -Fxq "ILoveCandy" /etc/pacman.conf +then + echo ":: ILoveCandy is already activated." +else + if gum confirm "Do you want to activate ILoveCandy?" ;then + sudo sed -i '/^ParallelDownloads = .*/a ILoveCandy' /etc/pacman.conf + else + echo ":: Activation of ILoveCandy skipped." + fi +fi +sleep 2 \ No newline at end of file diff --git a/scripts/updates.sh b/scripts/updates.sh index 88ee02c..a214f3f 100755 --- a/scripts/updates.sh +++ b/scripts/updates.sh @@ -58,7 +58,7 @@ if [ "$updates" -gt $threshhold_red ]; then fi if [ "$updates" -gt $threshhold_green ]; then - printf '{"text": "%s", "alt": "%s", "tooltip": "%s Updates", "class": "%s"}' "$updates" "$updates" "$updates" "$css_class" + printf '{"text": "%s", "alt": "%s", "tooltip": "Click to update your system", "class": "%s"}' "$updates" "$updates" "$updates" "$css_class" else - printf '{"text": "0", "alt": "0", "tooltip": "0 Updates", "class": "green"}' + printf '{"text": "0", "alt": "0", "tooltip": "No updates available", "class": "green"}' fi diff --git a/setup.sh b/setup.sh new file mode 100755 index 0000000..8f16612 --- /dev/null +++ b/setup.sh @@ -0,0 +1,136 @@ +#!/bin/bash +clear + +# Check if package is installed +_isInstalledPacman() { + package="$1"; + check="$(sudo pacman -Qs --color always "${package}" | grep "local" | grep "${package} ")"; + if [ -n "${check}" ] ; then + echo 0; #'0' means 'true' in Bash + return; #true + fi; + echo 1; #'1' means 'false' in Bash + return; #false +} + +# Install required packages +_installPackagesPacman() { + toInstall=(); + for pkg; do + if [[ $(_isInstalledPacman "${pkg}") == 0 ]]; then + echo "${pkg} is already installed."; + continue; + fi; + toInstall+=("${pkg}"); + done; + if [[ "${toInstall[@]}" == "" ]] ; then + # echo "All pacman packages are already installed."; + return; + fi; + printf "Package not installed:\n%s\n" "${toInstall[@]}"; + sudo pacman --noconfirm -S "${toInstall[@]}"; +} + +# Required packages for the installer +packages=( + "wget" + "unzip" + "gum" + "rsync" +) + +# Some colors +GREEN='\033[0;32m' +NONE='\033[0m' + +# Header +echo -e "${GREEN}" +cat <<"EOF" + ___ _ _ _ +|_ _|_ __ ___| |_ __ _| | | ___ _ __ + | || '_ \/ __| __/ _` | | |/ _ \ '__| + | || | | \__ \ || (_| | | | __/ | +|___|_| |_|___/\__\__,_|_|_|\___|_| + +EOF +echo "for ML4W Dotfiles" +echo +echo -e "${NONE}" +echo "This script will support you to download and install the ML4W Dotfiles". +echo +while true; do + read -p "DO YOU WANT TO START THE INSTALLATION NOW? (Yy/Nn): " yn + case $yn in + [Yy]* ) + echo ":: Installation started." + echo + break;; + [Nn]* ) + echo ":: Installation canceled." + exit; + break;; + * ) echo ":: Please answer yes or no.";; + esac +done + +# Remove existing download folder and zip files +if [ -f $HOME/Downloads/dotfiles-main.zip ] ;then + rm $HOME/Downloads/dotfiles-main.zip +fi +if [ -f $HOME/Downloads/dotfiles-dev.zip ] ;then + rm $HOME/Downloads/dotfiles-dev.zip +fi +if [ -f $HOME/Downloads/dotfiles.zip ] ;then + rm $HOME/Downloads/dotfiles.zip +fi +if [ -d $HOME/Downloads/dotfiles ] ;then + rm -rf $HOME/Downloads/dotfiles +fi +if [ -d $HOME/Downloads/dotfiles-main ] ;then + rm -rf $HOME/Downloads/dotfiles-main +fi +if [ -d $HOME/Downloads/dotfiles-dev ] ;then + rm -rf $HOME/Downloads/dotfiles-dev +fi + +# Synchronizing package databases +sudo pacman -Sy +echo + +# Install required packages +echo ":: Checking that required packages are installed..." +_installPackagesPacman "${packages[@]}"; +echo + +# Double check rsync +if ! command -v rsync &> /dev/null; then + echo ":: Force rsync installation" + sudo pacman -S rsync --noconfirm +else + echo ":: rsync double checked" +fi +echo + +# Select the dotfiles version +echo "Please choose between the main-release or the rolling-release (development version):" +version=$(gum choose "main-release" "rolling-release") +if [ "$version" == "main-release" ] ;then + wget -P ~/Downloads/ https://gitlab.com/stephan-raabe/dotfiles/-/archive/main/dotfiles-main.zip + v="main" +elif [ "$version" == "rolling-release" ] ;then + wget -P ~/Downloads/ https://gitlab.com/stephan-raabe/dotfiles/-/archive/dev/dotfiles-dev.zip + v="dev" +else + exit 130 +fi +echo ":: Download complete." +echo + +# Unzip +unzip -o -q ~/Downloads/dotfiles-$v.zip -d ~/Downloads/ +echo ":: Unzip complete." +cd $HOME/Downloads/dotfiles-$v +echo ":: Changed into ~/Downloads/dotfiles-$v/" +echo +gum spin --spinner dot --title "Starting the installation now..." -- sleep 3 +./install.sh \ No newline at end of file diff --git a/update.sh b/update.sh index 4769f7c..799e153 100755 --- a/update.sh +++ b/update.sh @@ -13,6 +13,7 @@ if [ ! -d $HOME/Downloads ] ;then echo "ERROR:: $HOME/Downloads folder not found." exit fi +echo if gum confirm "Do you want to start the update now?" ;then # Remove existing download folder and zip files @@ -56,9 +57,7 @@ if gum confirm "Do you want to start the update now?" ;then # Start the installatiom if gum confirm "Do you want to start the update now?" ;then - echo - echo "Starting the update now..." - sleep 2 + gum spin --spinner dot --title "Starting the update now..." -- sleep 3 cd $HOME/Downloads/dotfiles-$v ./install.sh elif [ $? -eq 130 ]; then diff --git a/wallpapers/default.jpg b/wallpapers/default.jpg index 4f289c5..994a193 100644 Binary files a/wallpapers/default.jpg and b/wallpapers/default.jpg differ diff --git a/wallpapers/sundown-over-water.jpg b/wallpapers/sundown-over-water.jpg new file mode 100644 index 0000000..4f289c5 Binary files /dev/null and b/wallpapers/sundown-over-water.jpg differ diff --git a/waybar/README.md b/waybar/README.md deleted file mode 100644 index 147c70d..0000000 --- a/waybar/README.md +++ /dev/null @@ -1,44 +0,0 @@ -## Theme Switcher - -Select a theme with SUPER + CTRL + T (custom Hyprland key binding) to execute the themeswitcher.sh script. The script will open rofi to show the themes in the folder ~/dotfiles/waybar/themes/ - -## Waybar Documentation - -Waybar github: https://github.com/Alexays/Waybar -Waybar Wiki: https://github.com/Alexays/Waybar/wiki - -## Define your own config and style.css for a ML4W theme - -If you want to hide modules from the dotfiles ML4W themes or tweak the style, you can do this by creating a copy of the config file and name it config-custom or a copy of style.css and name it style-custom.css - -The waybar loader will the use your copies instead of the default files. - -With a personal config-custom you can also load a personal modules.json with additional modules. - -You can reload the waybar theme with SUPER + SHIFT + B - -## Create your own theme based on the starter theme - -Please check the configurations of the folders in ~/dotfiles/waybar/themes/ - -A good starting point is to copy the the waybar starter theme. - -Copy the folder ~/dotfiles/waybar/themes/starter and name the copy for example to mytheme. - -Open the file ~/dotfiles/waybar/themes/mytheme/config.sh and give your theme a name - -``` -#!/bin/bash -theme_name="MyTheme" -``` - -Select your new theme by clicking in the ... icon or with SUPER + CTRL + T - -To customize your theme, you can edit the files config, style.css and modules.json - -You can reload the waybar theme with SUPER + SHIFT + B - -## Waybar documentation - -Waybar configuration: https://github.com/Alexays/Waybar/wiki/Configuration -Waybar Styling: https://github.com/Alexays/Waybar/wiki/Styling diff --git a/waybar/modules.json b/waybar/modules.json index d6b9355..3bd41aa 100644 --- a/waybar/modules.json +++ b/waybar/modules.json @@ -58,11 +58,19 @@ // ML4W Welcome App "custom/ml4w-welcome": { - "on-click": "~/dotfiles/apps/ML4W_Welcome-x86_64.AppImage", + "on-click": "sleep 0.1 && ~/dotfiles/eww/ml4w-sidebar/launch.sh", + "on-click-right": "sleep 0.1 && ~/dotfiles/apps/ML4W_Welcome-x86_64.AppImage", "format": " ", - "tooltip": false + "tooltip-format": "Open Sidebar" }, + // ML4W Welcome App + "custom/ml4w-hyprland-settings": { + "on-click": "~/dotfiles/apps/ML4W_Hyprland_Settings-x86_64.AppImage", + "format": " ", + "tooltip-format": "ML4W Hyprland Settings" + }, + // Empty "custom/empty": { "format": "" @@ -83,42 +91,40 @@ "on-click": "sleep 0.1 && ~/dotfiles/scripts/cliphist.sh", "on-click-right": "sleep 0.1 && ~/dotfiles/scripts/cliphist.sh d", "on-click-middle": "sleep 0.1 && ~/dotfiles/scripts/cliphist.sh w", - "tooltip": false + "tooltip-format": "Clipboard Manager" }, // Updates Count "custom/updates": { - "format": " {}", - "tooltip-format": "{}", + "format": " {}", "escape": true, "return-type": "json", "exec": "~/dotfiles/scripts/updates.sh", "restart-interval": 60, "on-click": "alacritty --class dotfiles-floating -e ~/dotfiles/scripts/installupdates.sh", - "on-click-right": "~/dotfiles/.settings/software.sh", - "tooltip": false + "on-click-right": "~/dotfiles/.settings/software.sh" }, // Wallpaper "custom/wallpaper": { "format": "", "on-click": "~/dotfiles/hypr/scripts/wallpaper.sh select", - "on-click-right": "~/dotfiles/hypr/scripts/wallpaper.sh", - "tooltip": false + "on-click-right": "~/dotfiles/hypr/scripts/wallpaper-effects.sh", + "tooltip-format": "Left: Select a wallpaper\nRight: Select wallpaper effect" }, // Waybar Themes "custom/waybarthemes": { "format": "", "on-click": "~/dotfiles/waybar/themeswitcher.sh", - "tooltip": false + "tooltip-format": "Select a waybar theme" }, // Settings "custom/settings": { "format": "", "on-click": "~/dotfiles/apps/ML4W_Dotfiles_Settings-x86_64.AppImage", - "tooltip": false + "tooltip-format": "ML4W Dotfiles Settings" }, // Keybindings @@ -132,35 +138,21 @@ "custom/filemanager": { "format": "", "on-click": "~/dotfiles/.settings/filemanager.sh", - "tooltip": false - }, - - // Outlook Launcher - "custom/outlook": { - "format": "", - "on-click": "chromium --app=https://outlook.office.com/mail/", - "tooltip": false - }, - - // Teams Launcher - "custom/teams": { - "format": "", - "on-click": "chromium --app=https://teams.microsoft.com/go", - "tooltip": false + "tooltip-format": "Open the filemanager" }, // Browser Launcher "custom/browser": { "format": "", "on-click": "~/dotfiles/.settings/browser.sh", - "tooltip": false + "tooltip-format": "Open the browser" }, // ChatGPT Launcher "custom/chatgpt": { "format": " ", "on-click": "chromium --app=https://chat.openai.com", - "tooltip": false + "tooltip-format": "Open ChatGPT" }, // Calculator @@ -184,7 +176,7 @@ // END APPS LABEL "on-click": "sleep 0.2;rofi -show drun -replace", "on-click-right": "~/dotfiles/hypr/scripts/keybindings.sh", - "tooltip": false + "tooltip-format": "Left: Open the application launcher\nRight: Show all keybindings" }, // Rofi Application Launcher @@ -192,14 +184,34 @@ "format": "", "on-click": "rofi -show drun -replace", "on-click-right": "~/dotfiles/hypr/scripts/keybindings.sh", - "tooltip": false + "tooltip-format": "Left: Open the application launcher\nRight: Show all keybindings" }, // Power Menu "custom/exit": { "format": "", "on-click": "wlogout", - "tooltip": false + "tooltip-format": "Power Menu" + }, + + // Hyprshade + "custom/hyprshade": { + "format": "", + "tooltip-format": "Toggle Screen Shader", + "on-click": "sleep 0.5; ~/dotfiles/hypr/scripts/hyprshade.sh", + "on-click-right": "sleep 0.5; ~/dotfiles/hypr/scripts/hyprshade.sh rofi" + }, + + // Hypridle inhibitor + "custom/hypridle": { + "format": "", + "return-type": "json", + "escape": true, + "exec-on-event": true, + "interval": 60, + "exec": "~/dotfiles/hypr/scripts/hypridle.sh status", + "on-click": "~/dotfiles/hypr/scripts/hypridle.sh toggle", + "on-click-right": "hyprlock" }, // Keyboard State @@ -277,15 +289,27 @@ }, // Group Settings - "group/settings": { + "group/links": { "orientation": "horizontal", "modules": [ - // START CHATGPT TOOGLE "custom/chatgpt", - // END CHATGPT TOOGLE + "custom/empty" + ] + }, + + // Group Settings + "group/settings": { + "orientation": "inherit", + "drawer": { + "transition-duration": 300, + "children-class": "not-memory", + "transition-left-to-right": true + }, + "modules": [ "custom/settings", "custom/waybarthemes", - "custom/wallpaper" + "custom/wallpaper", + "custom/ml4w-hyprland-settings" ] }, @@ -309,7 +333,8 @@ "tooltip-format-ethernet": " {ifname}\nIP: {ipaddr}\n up: {bandwidthUpBits} down: {bandwidthDownBits}", "tooltip-format-disconnected": "Disconnected", "max-length": 50, - "on-click": "~/dotfiles/.settings/networkmanager.sh" + "on-click": "alacritty --class dotfiles-floating -e nmtui", + "on-click-right": "~/dotfiles/.settings/networkmanager.sh" }, // Battery @@ -331,8 +356,8 @@ // Pulseaudio "pulseaudio": { // "scroll-step": 1, // %, can be a float - "format": "{icon} {volume}%", - "format-bluetooth": "{volume}% {icon} {format_source}", + "format": "{icon} {volume}%", + "format-bluetooth": "{volume}% {icon} {format_source}", "format-bluetooth-muted": " {icon} {format_source}", "format-muted": " {format_source}", "format-source": "{volume}% ", @@ -364,16 +389,5 @@ "format": "{user}", "interval": 60, "icon": false, - }, - - // Idle Inhibator - "idle_inhibitor": { - "format": "{icon}", - "tooltip": true, - "format-icons":{ - "activated": "", - "deactivated": "" - }, - "on-click-right": "hyprlock" } } diff --git a/waybar/themes/assets/hyprland-icon-20.png b/waybar/themes/assets/hyprland-icon-20.png new file mode 100644 index 0000000..0d36ec2 Binary files /dev/null and b/waybar/themes/assets/hyprland-icon-20.png differ diff --git a/waybar/themes/assets/hyprland-icon.png b/waybar/themes/assets/hyprland-icon.png new file mode 100644 index 0000000..c87b767 Binary files /dev/null and b/waybar/themes/assets/hyprland-icon.png differ diff --git a/waybar/themes/assets/ml4w-icon-dark.png b/waybar/themes/assets/ml4w-icon-dark.png new file mode 100644 index 0000000..73ec085 Binary files /dev/null and b/waybar/themes/assets/ml4w-icon-dark.png differ diff --git a/waybar/themes/ml4w-blur-bottom/black/style.css b/waybar/themes/ml4w-blur-bottom/black/style.css index ef2c247..2ec68f9 100644 --- a/waybar/themes/ml4w-blur-bottom/black/style.css +++ b/waybar/themes/ml4w-blur-bottom/black/style.css @@ -18,3 +18,7 @@ window#waybar { background-color: rgba(255,255,255,0.1); } + +#custom-ml4w-welcome { + background-image: url("../../assets/ml4w-icon-dark.png"); +} diff --git a/waybar/themes/ml4w-blur-bottom/config b/waybar/themes/ml4w-blur-bottom/config index e3afab2..4b9fdf2 100644 --- a/waybar/themes/ml4w-blur-bottom/config +++ b/waybar/themes/ml4w-blur-bottom/config @@ -24,8 +24,9 @@ // Modules Left "modules-left": [ "custom/appmenu", + "group/links", "group/settings", - "wlr/taskbar", + //"wlr/taskbar", "group/quicklinks", "hyprland/window", "custom/empty" @@ -44,9 +45,9 @@ "battery", "network", "group/hardware", - "group/settings", "custom/cliphist", - "idle_inhibitor", + "custom/hypridle", + "custom/hyprshade", "tray", "custom/exit", "custom/ml4w-welcome", diff --git a/waybar/themes/ml4w-blur/black/style.css b/waybar/themes/ml4w-blur/black/style.css index fbc1152..ab90c15 100644 --- a/waybar/themes/ml4w-blur/black/style.css +++ b/waybar/themes/ml4w-blur/black/style.css @@ -18,3 +18,7 @@ window#waybar { background-color: rgba(255,255,255,0.1); } + +#custom-ml4w-welcome { + background-image: url("../../assets/ml4w-icon-dark.png"); +} diff --git a/waybar/themes/ml4w-blur/config b/waybar/themes/ml4w-blur/config index 5bf26eb..8009d43 100644 --- a/waybar/themes/ml4w-blur/config +++ b/waybar/themes/ml4w-blur/config @@ -24,8 +24,9 @@ // Modules Left "modules-left": [ "custom/appmenu", + "group/links", "group/settings", - "wlr/taskbar", + //"wlr/taskbar", "group/quicklinks", "hyprland/window", "custom/empty" @@ -45,7 +46,8 @@ "network", "group/hardware", "custom/cliphist", - "idle_inhibitor", + "custom/hypridle", + "custom/hyprshade", "tray", "custom/exit", "custom/ml4w-welcome", diff --git a/waybar/themes/ml4w-blur/style.css b/waybar/themes/ml4w-blur/style.css index 8fa90c8..65787f5 100644 --- a/waybar/themes/ml4w-blur/style.css +++ b/waybar/themes/ml4w-blur/style.css @@ -163,6 +163,8 @@ window#waybar.empty #window { #custom-settings, #custom-wallpaper, #custom-system, +#custom-hyprshade, +#custom-hypridle, #custom-waybarthemes { margin-right: 23px; font-size: 20px; @@ -170,7 +172,23 @@ window#waybar.empty #window { opacity: 0.8; color: @iconcolor; } - + +#custom-hyprshade { + margin-right:12px; +} + +#custom-hypridle { + margin-right:18px; +} + +#custom-hypridle.active { + color: @iconcolor; +} + +#custom-hypridle.notactive { + color: #dc2f2f; +} + #custom-system { margin-right:15px; } @@ -184,15 +202,23 @@ window#waybar.empty #window { } #custom-ml4w-welcome { - margin-right: 15px; + margin-right: 12px; background-image: url("../assets/ml4w-icon.png"); background-repeat: no-repeat; background-position: center; padding-right: 24px; } +#custom-ml4w-hyprland-settings { + margin-right: 12px; + background-image: url("../assets/hyprland-icon.png"); + background-repeat: no-repeat; + background-position: center; + padding-right: 16px; +} + #custom-chatgpt { - margin-right: 15px; + margin-right: 12px; background-image: url("../assets/ai-icon-20.png"); background-repeat: no-repeat; background-position: center; @@ -204,8 +230,8 @@ window#waybar.empty #window { * ----------------------------------------------------- */ #idle_inhibitor { - margin-right: 15px; - font-size: 22px; + margin-right: 17px; + font-size: 20px; font-weight: bold; opacity: 0.8; color: @iconcolor; @@ -229,7 +255,7 @@ window#waybar.empty #window { color: @textcolor1; border-radius: 15px; padding: 0px 10px 0px 10px; - margin: 6px 15px 6px 14px; + margin: 8px 14px 8px 14px; opacity:0.8; border:3px solid @bordercolor; } @@ -312,7 +338,7 @@ window#waybar.empty #window { color: @textcolor1; border-radius: 15px; padding: 1px 10px 0px 10px; - margin: 6px 15px 6px 0px; + margin: 8px 15px 8px 0px; opacity:0.8; border:3px solid @bordercolor; } diff --git a/waybar/themes/ml4w-bottom/black/style.css b/waybar/themes/ml4w-bottom/black/style.css index 4b4f603..ff14a02 100644 --- a/waybar/themes/ml4w-bottom/black/style.css +++ b/waybar/themes/ml4w-bottom/black/style.css @@ -14,3 +14,7 @@ @define-color iconcolor #000000; @import '../../ml4w/style.css'; + +#custom-ml4w-welcome { + background-image: url("../../assets/ml4w-icon-dark.png"); +} diff --git a/waybar/themes/ml4w-bottom/config b/waybar/themes/ml4w-bottom/config index aea3cc9..935fe98 100644 --- a/waybar/themes/ml4w-bottom/config +++ b/waybar/themes/ml4w-bottom/config @@ -24,8 +24,9 @@ // Modules Left "modules-left": [ "custom/appmenu", + "group/links", "group/settings", - "wlr/taskbar", + //"wlr/taskbar", "group/quicklinks", "hyprland/window" ], @@ -45,7 +46,8 @@ "network", "group/hardware", "custom/cliphist", - "idle_inhibitor", + "custom/hypridle", + "custom/hyprshade", "tray", "custom/exit", "custom/ml4w-welcome", diff --git a/waybar/themes/ml4w-minimal/config b/waybar/themes/ml4w-minimal/config index 1691e1d..bb8ef1d 100644 --- a/waybar/themes/ml4w-minimal/config +++ b/waybar/themes/ml4w-minimal/config @@ -24,6 +24,7 @@ "modules-left": [ "custom/appmenuicon", "hyprland/workspaces", + "group/links", "group/settings", "group/quicklinks" ], @@ -43,7 +44,8 @@ "network", "group/hardware", "custom/cliphist", - "idle_inhibitor", + "custom/hypridle", + "custom/hyprshade", "custom/exit", "clock", "tray", diff --git a/waybar/themes/ml4w-minimal/style.css b/waybar/themes/ml4w-minimal/style.css index 2c6a5f2..55da7c5 100644 --- a/waybar/themes/ml4w-minimal/style.css +++ b/waybar/themes/ml4w-minimal/style.css @@ -134,6 +134,8 @@ window#waybar.empty #window { #custom-settings, #custom-wallpaper, #custom-system, +#custom-hyprshade, +#custom-hypridle, #custom-waybarthemes { margin-right: 23px; font-size: 14px; @@ -141,13 +143,36 @@ window#waybar.empty #window { color: @iconcolor; } -#custom-settings { - margin-right: 15; +#custom-hyprshade { + margin-right:12px; +} +#custom-hypridle { + margin-right:16px; +} + +#custom-hypridle.active { + color: @iconcolor; +} + +#custom-hypridle.notactive { + color: #dc2f2f; +} + +#custom-settings { + margin-right: 15px; +} + +#custom-browser { + margin-right: 16px; +} + +#custom-wallpaper { + margin-right: 14px; } #custom-chatgpt { - margin-right: 15px; + margin-right: 10px; background-image: url("../assets/ai-icon-20.png"); background-repeat: no-repeat; background-position: center; @@ -167,6 +192,15 @@ window#waybar.empty #window { padding-right: 24px; } +#custom-ml4w-hyprland-settings { + margin-right: 12px; + background-image: url("../assets/hyprland-icon-20.png"); + background-repeat: no-repeat; + background-position: center; + padding-right: 16px; +} + + /* ----------------------------------------------------- * Idle Inhibator * ----------------------------------------------------- */ diff --git a/waybar/themes/ml4w/black/style.css b/waybar/themes/ml4w/black/style.css index 4b15319..641ab13 100644 --- a/waybar/themes/ml4w/black/style.css +++ b/waybar/themes/ml4w/black/style.css @@ -14,4 +14,7 @@ @define-color iconcolor #000000; @import '../style.css'; - \ No newline at end of file + + #custom-ml4w-welcome { + background-image: url("../../assets/ml4w-icon-dark.png"); +} diff --git a/waybar/themes/ml4w/config b/waybar/themes/ml4w/config index 4192b36..ded798e 100644 --- a/waybar/themes/ml4w/config +++ b/waybar/themes/ml4w/config @@ -24,8 +24,9 @@ // Modules Left "modules-left": [ "custom/appmenu", + "group/links", "group/settings", - "wlr/taskbar", + //"wlr/taskbar", "group/quicklinks", "hyprland/window", "custom/empty" @@ -45,7 +46,8 @@ "network", "group/hardware", "custom/cliphist", - "idle_inhibitor", + "custom/hypridle", + "custom/hyprshade", "tray", "custom/exit", "custom/ml4w-welcome", diff --git a/waybar/themes/ml4w/style.css b/waybar/themes/ml4w/style.css index 1a1c19a..64a4620 100644 --- a/waybar/themes/ml4w/style.css +++ b/waybar/themes/ml4w/style.css @@ -164,6 +164,8 @@ window#waybar.empty #window { #custom-settings, #custom-wallpaper, #custom-system, +#custom-hyprshade, +#custom-hypridle, #custom-waybarthemes { margin-right: 23px; font-size: 20px; @@ -172,6 +174,22 @@ window#waybar.empty #window { color: @iconcolor; } +#custom-hyprshade { + margin-right:12px; +} + +#custom-hypridle { + margin-right:18px; +} + +#custom-hypridle.active { + color: @iconcolor; +} + +#custom-hypridle.notactive { + color: #dc2f2f; +} + #custom-system { margin-right:15px; } @@ -185,7 +203,7 @@ window#waybar.empty #window { } #custom-chatgpt { - margin-right: 15px; + margin-right: 12px; background-image: url("../assets/ai-icon.png"); background-repeat: no-repeat; background-position: center; @@ -193,13 +211,21 @@ window#waybar.empty #window { } #custom-ml4w-welcome { - margin-right: 15px; + margin-right: 12px; background-image: url("../assets/ml4w-icon.png"); background-repeat: no-repeat; background-position: center; padding-right: 24px; } +#custom-ml4w-hyprland-settings { + margin-right: 12px; + background-image: url("../assets/hyprland-icon.png"); + background-repeat: no-repeat; + background-position: center; + padding-right: 16px; +} + /* ----------------------------------------------------- * Idle Inhibator * ----------------------------------------------------- */ diff --git a/waybar/themes/starter/config b/waybar/themes/starter/config index b1c1062..6674efd 100644 --- a/waybar/themes/starter/config +++ b/waybar/themes/starter/config @@ -34,7 +34,7 @@ "custom/settings", "custom/waybarthemes", "custom/wallpaper", - // "wlr/taskbar", + //"wlr/taskbar", "group/quicklinks", "hyprland/window", "custom/starter" @@ -54,7 +54,8 @@ "network", "group/hardware", "custom/cliphist", - "idle_inhibitor", + "custom/hypridle", + "custom/hyprshade", "tray", "custom/exit", "custom/ml4w-welcome", diff --git a/waybar/themes/starter/modules.json b/waybar/themes/starter/modules.json index 02a132f..984b923 100644 --- a/waybar/themes/starter/modules.json +++ b/waybar/themes/starter/modules.json @@ -65,9 +65,29 @@ "tooltip": false }, + // Hyprshade + "custom/hyprshade": { + "format": "", + "on-click": "sleep 0.1; ~/dotfiles/hypr/scripts/hyprshade.sh", + "on-click-right": "sleep 0.1; ~/dotfiles/hypr/scripts/hyprshade.sh rofi", + "tooltip": false + }, + + // Hypridle inhibitor + "custom/hypridle": { + "format": "", + "return-type": "json", + "escape": true, + "exec-on-event": true, + "interval": 60, + "exec": "~/dotfiles/hypr/scripts/hypridle.sh status", + "on-click": "~/dotfiles/hypr/scripts/hypridle.sh toggle", + "on-click-right": "hyprlock" + }, + // Updates Count "custom/updates": { - "format": " {}", + "format": " {}", "tooltip-format": "{}", "escape": true, "return-type": "json", @@ -87,7 +107,7 @@ "custom/wallpaper": { "format": "", "on-click": "~/dotfiles/hypr/scripts/wallpaper.sh select", - "on-click-right": "~/dotfiles/hypr/scripts/wallpaper.sh", + "on-click-right": "~/dotfiles/hypr/scripts/wallpaper-effects.sh", "tooltip": false }, @@ -283,7 +303,7 @@ // Pulseaudio "pulseaudio": { // "scroll-step": 1, // %, can be a float - "format": "{icon} {volume}%", + "format": "{icon} {volume}%", "format-bluetooth": "{volume}% {icon} {format_source}", "format-bluetooth-muted": " {icon} {format_source}", "format-muted": " {format_source}", diff --git a/waybar/themes/starter/style.css b/waybar/themes/starter/style.css index 4224494..00aef52 100644 --- a/waybar/themes/starter/style.css +++ b/waybar/themes/starter/style.css @@ -164,6 +164,8 @@ window#waybar.empty #window { #custom-settings, #custom-wallpaper, #custom-system, +#custom-hyprshade, +#custom-hypridle, #custom-waybarthemes { margin-right: 23px; font-size: 20px; @@ -171,12 +173,27 @@ window#waybar.empty #window { color: @iconcolor; } - #custom-waybarthemes,#custom-system { +#custom-hyprshade { + margin-right:12px; +} + +#custom-hypridle { + margin-right:16px; +} + +#custom-hypridle.active { + color: @iconcolor; +} + +#custom-hypridle.notactive { + color: #dc2f2f; +} + +#custom-waybarthemes,#custom-system { margin-right:15px; - } +} - - #custom-ml4w-welcome { +#custom-ml4w-welcome { margin-right: 15px; background-image: url("../assets/ml4w-icon.png"); background-repeat: no-repeat; @@ -396,7 +413,7 @@ window#waybar.empty #window { * ----------------------------------------------------- */ #tray { - background-color: #2980b9; + margin:0px 10px 0px 0px; } #tray > .passive { diff --git a/waybar/toggle.sh b/waybar/toggle.sh new file mode 100755 index 0000000..3ca8efb --- /dev/null +++ b/waybar/toggle.sh @@ -0,0 +1,15 @@ +#!/bin/bash +# _____ _ __ __ _ +# |_ _|__ __ _ __ _| | ___ \ \ / /_ _ _ _| |__ __ _ _ __ +# | |/ _ \ / _` |/ _` | |/ _ \ \ \ /\ / / _` | | | | '_ \ / _` | '__| +# | | (_) | (_| | (_| | | __/ \ V V / (_| | |_| | |_) | (_| | | +# |_|\___/ \__, |\__, |_|\___| \_/\_/ \__,_|\__, |_.__/ \__,_|_| +# |___/ |___/ |___/ +# + +if [ -f ~/.cache/waybar-disabled ] ;then + rm ~/.cache/waybar-disabled +else + touch ~/.cache/waybar-disabled +fi +~/dotfiles/waybar/launch.sh & diff --git a/wlogout/layout b/wlogout/layout index 6a3a3c3..35902d4 100644 --- a/wlogout/layout +++ b/wlogout/layout @@ -1,36 +1,36 @@ { "label" : "lock", - "action" : "sleep 1; hyprlock", + "action" : "$HOME/dotfiles/hypr/scripts/power.sh lock", "text" : "Lock", "keybind" : "l" } { "label" : "hibernate", - "action" : "sleep 1; systemctl hibernate", + "action" : "$HOME/dotfiles/hypr/scripts/power.sh hibernate", "text" : "Hibernate", "keybind" : "h" } { "label" : "logout", - "action" : "$HOME/dotfiles/hypr/scripts/exit.sh", + "action" : "$HOME/dotfiles/hypr/scripts/power.sh exit", "text" : "Exit", "keybind" : "e" } { "label" : "shutdown", - "action" : "sleep 1; systemctl poweroff", + "action" : "$HOME/dotfiles/hypr/scripts/power.sh shutdown", "text" : "Shutdown", "keybind" : "s" } { "label" : "suspend", - "action" : "sleep 1; systemctl suspend", + "action" : "$HOME/dotfiles/hypr/scripts/power.sh suspend", "text" : "Suspend", "keybind" : "u" } { "label" : "reboot", - "action" : "sleep 1; systemctl reboot", + "action" : "$HOME/dotfiles/hypr/scripts/power.sh reboot", "text" : "Reboot", "keybind" : "r" }