wallpaper image file support
This commit is contained in:
parent
9033dbf59b
commit
88a73b7039
@ -12,6 +12,7 @@ Hyprland:
|
|||||||
- Settings script reworked completely. Implementation of custom modules are now possible.
|
- Settings script reworked completely. Implementation of custom modules are now possible.
|
||||||
- Waybar settings module to edit some ML4W waybar themes settings on the fly
|
- Waybar settings module to edit some ML4W waybar themes settings on the fly
|
||||||
- SDDM settings module to update the SDDM background with current wallpaper
|
- SDDM settings module to update the SDDM background with current wallpaper
|
||||||
|
- All image formats are now supported for setting a wallpaper (jpg,jpeg,png,...)
|
||||||
|
|
||||||
Qtile:
|
Qtile:
|
||||||
- Removed wayland support due to many limitations. Installation script will rename /usr/share/wayland-sessions/qtile-wayland.session to qtile-wayland.bak to hide in sddm
|
- Removed wayland support due to many limitations. Installation script will rename /usr/share/wayland-sessions/qtile-wayland.session to qtile-wayland.bak to hide in sddm
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# ML4W dotfiles 2.7 RC1
|
# ML4W dotfiles 2.7 RC2
|
||||||
|
|
||||||
This is my configuration of Hyprland (Wayland) and Qtile (Xorg & Wayland) for Arch. This package includes an installation script to install and setup the required components.
|
This is my configuration of Hyprland (Wayland) and Qtile (Xorg & Wayland) for Arch. This package includes an installation script to install and setup the required components.
|
||||||
|
|
||||||
|
@ -9,12 +9,30 @@
|
|||||||
# by Stephan Raabe (2023)
|
# by Stephan Raabe (2023)
|
||||||
# -----------------------------------------------------
|
# -----------------------------------------------------
|
||||||
|
|
||||||
|
# Cache file for holding the current wallpaper
|
||||||
|
cache_file="$HOME/.cache/current_wallpaper"
|
||||||
|
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"
|
||||||
|
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"
|
||||||
|
fi
|
||||||
|
|
||||||
|
current_wallpaper=$(cat "$cache_file")
|
||||||
|
|
||||||
case $1 in
|
case $1 in
|
||||||
|
|
||||||
# Load wallpaper from .cache of last session
|
# Load wallpaper from .cache of last session
|
||||||
"init")
|
"init")
|
||||||
if [ -f ~/.cache/current_wallpaper.jpg ]; then
|
if [ -f $cache_file ]; then
|
||||||
wal -q -c -i ~/.cache/current_wallpaper.jpg
|
wal -q -i $current_wallpaper
|
||||||
else
|
else
|
||||||
wal -q -i ~/wallpaper/
|
wal -q -i ~/wallpaper/
|
||||||
fi
|
fi
|
||||||
@ -48,9 +66,10 @@ source "$HOME/.cache/wal/colors.sh"
|
|||||||
echo "Wallpaper: $wallpaper"
|
echo "Wallpaper: $wallpaper"
|
||||||
|
|
||||||
# -----------------------------------------------------
|
# -----------------------------------------------------
|
||||||
# Copy selected wallpaper into .cache folder
|
# Write selected wallpaper into .cache files
|
||||||
# -----------------------------------------------------
|
# -----------------------------------------------------
|
||||||
cp $wallpaper ~/.cache/current_wallpaper.jpg
|
echo "$wallpaper" > "$cache_file"
|
||||||
|
echo "* { current-image: url(\"$wallpaper\", height); }" > "$rasi_file"
|
||||||
|
|
||||||
# -----------------------------------------------------
|
# -----------------------------------------------------
|
||||||
# get wallpaper image name
|
# get wallpaper image name
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
_getHeader "$name" "$author"
|
_getHeader "$name" "$author"
|
||||||
echo "$homepage ($email)"
|
echo "$homepage ($email)"
|
||||||
|
echo "ML4W dotfiles Version 2.7"
|
||||||
echo "Settings Version" $(_getVersion)
|
echo "Settings Version" $(_getVersion)
|
||||||
echo ""
|
echo ""
|
||||||
echo $description
|
echo $description
|
||||||
|
@ -2,6 +2,9 @@
|
|||||||
_getHeader "$name" "$author"
|
_getHeader "$name" "$author"
|
||||||
|
|
||||||
if gum confirm "Do you want to update the SDDM background with the current wallpaper?" ;then
|
if gum confirm "Do you want to update the SDDM background with the current wallpaper?" ;then
|
||||||
|
|
||||||
|
cache_file="$HOME/.cache/current_wallpaper"
|
||||||
|
|
||||||
if [ ! -d /etc/sddm.conf.d/ ]; then
|
if [ ! -d /etc/sddm.conf.d/ ]; then
|
||||||
sudo mkdir /etc/sddm.conf.d
|
sudo mkdir /etc/sddm.conf.d
|
||||||
echo "Folder /etc/sddm.conf.d created."
|
echo "Folder /etc/sddm.conf.d created."
|
||||||
@ -10,11 +13,15 @@ if gum confirm "Do you want to update the SDDM background with the current wallp
|
|||||||
sudo cp ~/dotfiles/sddm/sddm.conf /etc/sddm.conf.d/
|
sudo cp ~/dotfiles/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."
|
||||||
|
|
||||||
sudo cp ~/.cache/current_wallpaper.jpg /usr/share/sddm/themes/sugar-candy/Backgrounds/
|
current_wallpaper=$(cat "$cache_file")
|
||||||
echo "Current wallpaper copied into /usr/share/sddm/themes/sugar-candy/Backgrounds/"
|
extension="${current_wallpaper##*.}"
|
||||||
|
|
||||||
|
sudo cp $current_wallpaper /usr/share/sddm/themes/sugar-candy/Backgrounds/current_wallpaper.$extension
|
||||||
|
echo "Current wallpaper copied into /usr/share/sddm/themes/sugar-candy/Backgrounds/"
|
||||||
|
new_wall=$(echo $current_wallpaper | sed "s|$HOME/wallpaper/||g")
|
||||||
sudo cp ~/dotfiles/sddm/theme.conf /usr/share/sddm/themes/sugar-candy/
|
sudo cp ~/dotfiles/sddm/theme.conf /usr/share/sddm/themes/sugar-candy/
|
||||||
echo "File theme.conf updated in /usr/share/sddm/themes/sugar-candy/"
|
|
||||||
|
sudo sed -i 's/CURRENTWALLPAPER/'"current_wallpaper.$extension"'/' /usr/share/sddm/themes/sugar-candy/theme.conf
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "SDDM background successfully updated!"
|
echo "SDDM background successfully updated!"
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
# xrandr --output Virtual-1 --mode 1920x1080
|
# xrandr --output Virtual-1 --mode 1920x1080
|
||||||
|
|
||||||
# Keyboard layout
|
# Keyboard layout
|
||||||
setxkbmap en
|
setxkbmap us
|
||||||
|
|
||||||
# Load picom
|
# Load picom
|
||||||
picom &
|
picom &
|
||||||
@ -28,9 +28,9 @@ xfce4-power-manager &
|
|||||||
dunst &
|
dunst &
|
||||||
|
|
||||||
# Launch polybar
|
# Launch polybar
|
||||||
~/dotfiles/qtile/scripts/x11/loadbar.sh
|
~/dotfiles/qtile/scripts/loadbar.sh
|
||||||
|
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|
||||||
# Setup Wallpaper and update colors
|
# Setup Wallpaper and update colors
|
||||||
~/dotfiles/qtile/scripts/x11/wallpaper.sh init
|
~/dotfiles/qtile/scripts/wallpaper.sh init
|
||||||
|
@ -479,8 +479,7 @@ wmname = "QTILE"
|
|||||||
# HOOK startup
|
# HOOK startup
|
||||||
@hook.subscribe.startup_once
|
@hook.subscribe.startup_once
|
||||||
def autostart():
|
def autostart():
|
||||||
autostartscript = "~/.config/qtile/autostart_x11.sh"
|
autostartscript = "~/.config/qtile/autostart.sh"
|
||||||
subprocess.Popen(['setxkbmap',keyboard_layout])
|
|
||||||
home = os.path.expanduser(autostartscript)
|
home = os.path.expanduser(autostartscript)
|
||||||
subprocess.Popen([home])
|
subprocess.Popen([home])
|
||||||
|
|
||||||
|
@ -9,12 +9,30 @@
|
|||||||
# by Stephan Raabe (2023)
|
# by Stephan Raabe (2023)
|
||||||
# -----------------------------------------------------
|
# -----------------------------------------------------
|
||||||
|
|
||||||
|
# Cache file for holding the current wallpaper
|
||||||
|
cache_file="$HOME/.cache/current_wallpaper"
|
||||||
|
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"
|
||||||
|
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"
|
||||||
|
fi
|
||||||
|
|
||||||
|
current_wallpaper=$(cat "$cache_file")
|
||||||
|
|
||||||
case $1 in
|
case $1 in
|
||||||
|
|
||||||
# Load wallpaper from .cache of last session
|
# Load wallpaper from .cache of last session
|
||||||
"init")
|
"init")
|
||||||
if [ -f ~/.cache/current_wallpaper.jpg ]; then
|
if [ -f $cache_file ]; then
|
||||||
wal -q -i ~/.cache/current_wallpaper.jpg
|
wal -q -i $current_wallpaper
|
||||||
else
|
else
|
||||||
wal -q -i ~/wallpaper/
|
wal -q -i ~/wallpaper/
|
||||||
fi
|
fi
|
||||||
@ -53,9 +71,10 @@ echo "Wallpaper: $wallpaper"
|
|||||||
newwall=$(echo $wallpaper | sed "s|$HOME/wallpaper/||g")
|
newwall=$(echo $wallpaper | sed "s|$HOME/wallpaper/||g")
|
||||||
|
|
||||||
# -----------------------------------------------------
|
# -----------------------------------------------------
|
||||||
# Copy selected wallpaper into .cache folder
|
# Write selected wallpaper into .cache files
|
||||||
# -----------------------------------------------------
|
# -----------------------------------------------------
|
||||||
cp $wallpaper ~/.cache/current_wallpaper.jpg
|
echo "$wallpaper" > "$cache_file"
|
||||||
|
echo "* { current-image: url(\"$wallpaper\", height); }" > "$rasi_file"
|
||||||
|
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|
||||||
|
@ -29,6 +29,7 @@ configuration {
|
|||||||
|
|
||||||
/* ---- Load pywal colors (custom wal template) ---- */
|
/* ---- Load pywal colors (custom wal template) ---- */
|
||||||
@import "~/.cache/wal/colors-rofi-pywal"
|
@import "~/.cache/wal/colors-rofi-pywal"
|
||||||
|
@import "~/.cache/current_wallpaper.rasi"
|
||||||
|
|
||||||
/* ---- Window ---- */
|
/* ---- Window ---- */
|
||||||
window {
|
window {
|
||||||
@ -58,7 +59,7 @@ mainbox {
|
|||||||
spacing: 0px;
|
spacing: 0px;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
background-color: @background;
|
background-color: @background;
|
||||||
background-image: url("~/.cache/current_wallpaper.jpg", height);
|
background-image: @current-image;
|
||||||
children: ["listbox"];
|
children: ["listbox"];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,6 +29,7 @@ configuration {
|
|||||||
|
|
||||||
/* ---- Load pywal colors (custom wal template) ---- */
|
/* ---- Load pywal colors (custom wal template) ---- */
|
||||||
@import "~/.cache/wal/colors-rofi-pywal"
|
@import "~/.cache/wal/colors-rofi-pywal"
|
||||||
|
@import "~/.cache/current_wallpaper.rasi"
|
||||||
|
|
||||||
/* ---- Window ---- */
|
/* ---- Window ---- */
|
||||||
window {
|
window {
|
||||||
@ -58,7 +59,7 @@ mainbox {
|
|||||||
spacing: 0px;
|
spacing: 0px;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
background-color: @background;
|
background-color: @background;
|
||||||
background-image: url("~/.cache/current_wallpaper.jpg", height);
|
background-image: @current-image;
|
||||||
children: ["listbox"];
|
children: ["listbox"];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,6 +29,7 @@ configuration {
|
|||||||
|
|
||||||
/* ---- Load pywal colors (custom wal template) ---- */
|
/* ---- Load pywal colors (custom wal template) ---- */
|
||||||
@import "~/.cache/wal/colors-rofi-pywal"
|
@import "~/.cache/wal/colors-rofi-pywal"
|
||||||
|
@import "~/.cache/current_wallpaper.rasi"
|
||||||
|
|
||||||
/* ---- Window ---- */
|
/* ---- Window ---- */
|
||||||
window {
|
window {
|
||||||
@ -58,7 +59,7 @@ mainbox {
|
|||||||
spacing: 0px;
|
spacing: 0px;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
background-color: @background;
|
background-color: @background;
|
||||||
background-image: url("~/.cache/current_wallpaper.jpg", height);
|
background-image: @current-image;
|
||||||
children: ["listbox"];
|
children: ["listbox"];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,6 +29,7 @@ configuration {
|
|||||||
|
|
||||||
/* ---- Load pywal colors (custom wal template) ---- */
|
/* ---- Load pywal colors (custom wal template) ---- */
|
||||||
@import "~/.cache/wal/colors-rofi-pywal"
|
@import "~/.cache/wal/colors-rofi-pywal"
|
||||||
|
@import "~/.cache/current_wallpaper.rasi"
|
||||||
|
|
||||||
/* ---- Window ---- */
|
/* ---- Window ---- */
|
||||||
window {
|
window {
|
||||||
@ -58,7 +59,7 @@ mainbox {
|
|||||||
spacing: 0px;
|
spacing: 0px;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
background-color: @background;
|
background-color: @background;
|
||||||
background-image: url("~/.cache/current_wallpaper.jpg", height);
|
background-image: @current-image;
|
||||||
children: ["listbox"];
|
children: ["listbox"];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,6 +29,7 @@ configuration {
|
|||||||
|
|
||||||
/* ---- Load pywal colors (custom wal template) ---- */
|
/* ---- Load pywal colors (custom wal template) ---- */
|
||||||
@import "~/.cache/wal/colors-rofi-pywal"
|
@import "~/.cache/wal/colors-rofi-pywal"
|
||||||
|
@import "~/.cache/current_wallpaper.rasi"
|
||||||
|
|
||||||
/* ---- Window ---- */
|
/* ---- Window ---- */
|
||||||
window {
|
window {
|
||||||
@ -59,7 +60,7 @@ mainbox {
|
|||||||
spacing: 0px;
|
spacing: 0px;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
background-color: @background;
|
background-color: @background;
|
||||||
background-image: url("~/.cache/current_wallpaper.jpg", height);
|
background-image: @current-image;
|
||||||
children: ["listbox"];
|
children: ["listbox"];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,6 +29,7 @@ configuration {
|
|||||||
|
|
||||||
/* ---- Load pywal colors (custom wal template) ---- */
|
/* ---- Load pywal colors (custom wal template) ---- */
|
||||||
@import "~/.cache/wal/colors-rofi-pywal"
|
@import "~/.cache/wal/colors-rofi-pywal"
|
||||||
|
@import "~/.cache/current_wallpaper.rasi"
|
||||||
|
|
||||||
/* ---- Window ---- */
|
/* ---- Window ---- */
|
||||||
window {
|
window {
|
||||||
@ -58,7 +59,7 @@ mainbox {
|
|||||||
spacing: 0px;
|
spacing: 0px;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
background-color: @background;
|
background-color: @background;
|
||||||
background-image: url("~/.cache/current_wallpaper.jpg", height);
|
background-image: @current-image;
|
||||||
children: ["listbox"];
|
children: ["listbox"];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,6 +29,7 @@ configuration {
|
|||||||
|
|
||||||
/* ---- Load pywal colors (custom wal template) ---- */
|
/* ---- Load pywal colors (custom wal template) ---- */
|
||||||
@import "~/.cache/wal/colors-rofi-pywal"
|
@import "~/.cache/wal/colors-rofi-pywal"
|
||||||
|
@import "~/.cache/current_wallpaper.rasi"
|
||||||
|
|
||||||
/* ---- Window ---- */
|
/* ---- Window ---- */
|
||||||
window {
|
window {
|
||||||
@ -58,7 +59,7 @@ mainbox {
|
|||||||
spacing: 0px;
|
spacing: 0px;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
background-color: @background;
|
background-color: @background;
|
||||||
background-image: url("~/.cache/current_wallpaper.jpg", height);
|
background-image: @current-image;
|
||||||
children: ["listbox"];
|
children: ["listbox"];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,6 +29,7 @@ configuration {
|
|||||||
|
|
||||||
/* ---- Load pywal colors (custom wal template) ---- */
|
/* ---- Load pywal colors (custom wal template) ---- */
|
||||||
@import "~/.cache/wal/colors-rofi-pywal"
|
@import "~/.cache/wal/colors-rofi-pywal"
|
||||||
|
@import "~/.cache/current_wallpaper.rasi"
|
||||||
|
|
||||||
/* ---- Window ---- */
|
/* ---- Window ---- */
|
||||||
window {
|
window {
|
||||||
@ -58,7 +59,7 @@ mainbox {
|
|||||||
spacing: 0px;
|
spacing: 0px;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
background-color: @background;
|
background-color: @background;
|
||||||
background-image: url("~/.cache/current_wallpaper.jpg", height);
|
background-image: @current-image;
|
||||||
children: ["imagebox","listbox"];
|
children: ["imagebox","listbox"];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[General]
|
[General]
|
||||||
|
|
||||||
Background="Backgrounds/current_wallpaper.jpg"
|
Background="Backgrounds/CURRENTWALLPAPER"
|
||||||
|
|
||||||
## Path relative to the theme root directory. Most standard image file formats are allowed including support for transparency. (e.g. background.jpeg/illustration.GIF/Foto.png/undraw.svgz)
|
## Path relative to the theme root directory. Most standard image file formats are allowed including support for transparency. (e.g. background.jpeg/illustration.GIF/Foto.png/undraw.svgz)
|
||||||
|
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
# by Stephan Raabe (2023)
|
# by Stephan Raabe (2023)
|
||||||
# -----------------------------------------------------
|
# -----------------------------------------------------
|
||||||
|
|
||||||
|
cache_file="$HOME/.cache/current_wallpaper"
|
||||||
clear
|
clear
|
||||||
echo "Update the background wallpaper of sddm to the current wallpaper."
|
echo "Update the background wallpaper of sddm to the current wallpaper."
|
||||||
echo ""
|
echo ""
|
||||||
@ -20,10 +21,15 @@ fi
|
|||||||
sudo cp sddm.conf /etc/sddm.conf.d/
|
sudo cp sddm.conf /etc/sddm.conf.d/
|
||||||
echo "File /etc/sddm.conf.d/sddm.conf updated."
|
echo "File /etc/sddm.conf.d/sddm.conf updated."
|
||||||
|
|
||||||
sudo cp ~/.cache/current_wallpaper.jpg /usr/share/sddm/themes/sugar-candy/Backgrounds/
|
current_wallpaper=$(cat "$cache_file")
|
||||||
echo "Current wallpaper copied into /usr/share/sddm/themes/sugar-candy/Backgrounds/"
|
extension="${current_wallpaper##*.}"
|
||||||
|
|
||||||
|
sudo cp $current_wallpaper /usr/share/sddm/themes/sugar-candy/Backgrounds/current_wallpaper.$extension
|
||||||
|
echo "Current wallpaper copied into /usr/share/sddm/themes/sugar-candy/Backgrounds/"
|
||||||
|
new_wall=$(echo $current_wallpaper | sed "s|$HOME/wallpaper/||g")
|
||||||
sudo cp theme.conf /usr/share/sddm/themes/sugar-candy/
|
sudo cp theme.conf /usr/share/sddm/themes/sugar-candy/
|
||||||
|
sudo sed -i 's/CURRENTWALLPAPER/'"current_wallpaper.$extension"'/' /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/"
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
|
Loading…
Reference in New Issue
Block a user