diff --git a/.install/disabledm.sh b/.install/displaymanager.sh old mode 100644 new mode 100755 similarity index 51% rename from .install/disabledm.sh rename to .install/displaymanager.sh index 701a742..1b76e96 --- a/.install/disabledm.sh +++ b/.install/displaymanager.sh @@ -2,6 +2,7 @@ # Disable display manager # ------------------------------------------------------ disman=0 +profile="Hyprland" if [ -f /etc/systemd/system/display-manager.service ]; then echo -e "${GREEN}" cat <<"EOF" @@ -14,12 +15,11 @@ cat <<"EOF" EOF echo -e "${NONE}" - echo "An active display manager has been dedected." + echo "An active display manager has been detected." echo "" if [[ $profile == *"Hyprland"* ]]; then - echo "IMPORTANT: Starting Hyprland from tty (terminal) with command Hyprland is recommended." + echo "IMPORTANT: Starting Hyprland works from tty (terminal) with command Hyprland or with the display manager SDDM (> 0.20.0 already installed or the latest git version (yay -S sddm-git)." echo "Please check: https://wiki.hyprland.org/hyprland-wiki/pages/Getting-Started/Master-Tutorial/#launching-hyprland" - echo "Hyprland could work with SDDM > 0.20.0 or the latest git version (yay -S sddm-git)." echo "Login with other display managers could fail and could have negative side effects on some devices." echo "" fi @@ -30,17 +30,40 @@ echo -e "${NONE}" echo "" fi - if gum confirm "Do you want to deactive the current display manager?" ;then + if gum confirm "Do you want to enable/update to sddm or disable the display manager?" --affirmative "Enable" --negative "Disable" ;then + if [ -f /etc/systemd/system/display-manager.service ]; then + sudo rm /etc/systemd/system/display-manager.service + fi + sudo systemctl enable sddm.service + + if [ ! -d /etc/sddm.conf.d/ ]; then + sudo mkdir /etc/sddm.conf.d + echo "Folder /etc/sddm.conf.d created." + fi + + sudo cp sddm/sddm.conf /etc/sddm.conf.d/ + echo "File /etc/sddm.conf.d/sddm.conf updated." + + if [ -f /usr/share/sddm/themes/sugar-candy/theme.conf ]; then + if [ -f ~/.cache/current_wallpaper.jpg ]; then + sudo cp ~/.cache/current_wallpaper.jpg /usr/share/sddm/themes/sugar-candy/Backgrounds/current_wallpaper.jpg + echo "Current wallpaper copied into /usr/share/sddm/themes/sugar-candy/Backgrounds/" + else + 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/" + fi + + sudo cp sddm/theme.conf /usr/share/sddm/themes/sugar-candy/ + echo "File theme.conf updated in /usr/share/sddm/themes/sugar-candy/" + fi + elif [ $? -eq 130 ]; then + exit 130 + else if [ -f /etc/systemd/system/display-manager.service ]; then sudo rm /etc/systemd/system/display-manager.service echo "Current display manager removed." fi disman=1 - elif [ $? -eq 130 ]; then - exit 130 - else - echo "Disable display manager skipped." - echo "You can run ~/dotfiles/hypr/script/disablewm.sh at a later point of time if needed." fi echo "" else diff --git a/.install/preparation.sh b/.install/preparation.sh index a697594..d20378a 100644 --- a/.install/preparation.sh +++ b/.install/preparation.sh @@ -33,8 +33,5 @@ if [[ $(_isFolderEmpty ~/dotfiles-versions/$version/) == 0 ]] ;then echo "Execution of rsync -a -I --exclude-from=.install/excludes.txt . ~/dotfiles-versions/$version/ is required." exit fi -if [ ! -f ~/dotfiles-versions/hook.sh ]; then - # cp .install/templates/hook.sh ~/dotfiles-versions/ -fi echo "dotfiles $version successfully prepared in ~/dotfiles-versions/$version/" echo "" diff --git a/CHANGELOG b/CHANGELOG index 4de0f9f..318f66b 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,10 +1,18 @@ -Version 2.6.2 +Version 2.7 https://gitlab.com/stephan-raabe/dotfiles/-/releases/2.6.2 -------------------------------------------------------- +Installation: +- Display Manager SDDM and sugar-candy theme will be installed. +- Optional display manager disablement possible + Hyprland: - New Waybar Module Idle Inhibitor to deactivate the automatic start of swaylock e.g. to watch videos or for online meetings - Create own customization of ML4W waybar themes: https://gitlab.com/stephan-raabe/dotfiles/-/tree/main/waybar?ref_type=heads#define-your-own-config-and-stylecss-for-a-ml4w-theme -- Waybar bluetooth module hidden when no bluetooth device detected or disabled + +Settings Script: +- Settings script reworked completely. Implementation of custom modules are now possible. +- New waybar module to edit some ML4W waybar themes settings on the fly +- SDDM module to update the SDDM background with current wallpaper Version 2.6.1 https://gitlab.com/stephan-raabe/dotfiles/-/releases/2.6.1 diff --git a/hypr/settings/modules/appearance/config.sh b/hypr/settings/modules/appearance/config.sh index 120552e..89ac796 100644 --- a/hypr/settings/modules/appearance/config.sh +++ b/hypr/settings/modules/appearance/config.sh @@ -1,3 +1,3 @@ name="Appearance" -order=2 +order=10 author="Stephan Raabe ML4W" diff --git a/hypr/settings/modules/keybindings/config.sh b/hypr/settings/modules/keybindings/config.sh index f7ccb0d..368cb72 100644 --- a/hypr/settings/modules/keybindings/config.sh +++ b/hypr/settings/modules/keybindings/config.sh @@ -1,4 +1,4 @@ name="Keybindings" -order=2 +order=20 author="Stephan Raabe ML4W" diff --git a/hypr/settings/modules/sddm/config.sh b/hypr/settings/modules/sddm/config.sh new file mode 100644 index 0000000..fd9e80a --- /dev/null +++ b/hypr/settings/modules/sddm/config.sh @@ -0,0 +1,4 @@ +name="SDDM" +desxription="Update the background wallpaper of sddm to the current wallpaper." +order=50 +author="Stephan Raabe ML4W" diff --git a/hypr/settings/modules/sddm/module.sh b/hypr/settings/modules/sddm/module.sh new file mode 100755 index 0000000..c0f8dd0 --- /dev/null +++ b/hypr/settings/modules/sddm/module.sh @@ -0,0 +1,23 @@ +#!/bin/bash +_getHeader "$name" "$author" + +if gum confirm "Do you want to update the SDDM background with the current wallpaper?" ;then + if [ ! -d /etc/sddm.conf.d/ ]; then + sudo mkdir /etc/sddm.conf.d + echo "Folder /etc/sddm.conf.d created." + fi + + sudo cp ~/dotfiles/sddm/sddm.conf /etc/sddm.conf.d/ + echo "File /etc/sddm.conf.d/sddm.conf updated." + + sudo cp ~/.cache/current_wallpaper.jpg /usr/share/sddm/themes/sugar-candy/Backgrounds/ + echo "Current wallpaper copied into /usr/share/sddm/themes/sugar-candy/Backgrounds/" + + sudo cp ~/dotfiles/sddm/theme.conf /usr/share/sddm/themes/sugar-candy/ + echo "File theme.conf updated in /usr/share/sddm/themes/sugar-candy/" + + echo "" + echo "SDDM background successfully updated!" + sleep 2 +fi +_goBack diff --git a/hypr/settings/modules/system/config.sh b/hypr/settings/modules/system/config.sh index b3606d9..3844a8e 100644 --- a/hypr/settings/modules/system/config.sh +++ b/hypr/settings/modules/system/config.sh @@ -1,3 +1,3 @@ name="System" -order=2 +order=30 author="Stephan Raabe ML4W" diff --git a/hypr/settings/modules/waybar/config.sh b/hypr/settings/modules/waybar/config.sh index be14a96..32d60e9 100644 --- a/hypr/settings/modules/waybar/config.sh +++ b/hypr/settings/modules/waybar/config.sh @@ -1,2 +1,2 @@ name="Waybar" -order=1 +order=40 diff --git a/sddm/theme.conf b/sddm/theme.conf index a473e6f..c25d62f 100644 --- a/sddm/theme.conf +++ b/sddm/theme.conf @@ -10,8 +10,8 @@ DimBackgroundImage="0.0" ScaleImageCropped="true" ## Whether the image should be cropped when scaled proportionally. Setting this to false will fit the whole image instead, possibly leaving white space. This can be exploited beautifully with illustrations (try it with "undraw.svg" included in the theme). -ScreenWidth="1440" -ScreenHeight="900" +# ScreenWidth="2560" +# ScreenHeight="1440" ## Adjust to your resolution to help SDDM speed up on calculations