From 51e9d6778147f5d9b76f7bc28648b66407376655 Mon Sep 17 00:00:00 2001 From: Stephan Raabe Date: Wed, 20 Dec 2023 11:05:15 +0100 Subject: [PATCH] Updates --- .bashrc | 3 +- .dev/excludes.txt | 3 +- .install/displaymanager.sh | 5 +- .install/keyboard.sh | 6 +- .install/restore.sh | 14 +- CHANGELOG | 11 +- hypr/scripts/wallpaper.sh | 6 +- qtile/{autostart_x11.sh => autostart.sh} | 3 +- qtile/autostart_wayland.sh | 35 ----- qtile/config.py | 174 +++++++---------------- qtile/reload.sh | 0 qtile/scripts/{x11 => }/barswitcher.sh | 0 qtile/scripts/{x11 => }/loadbar.sh | 0 qtile/scripts/{x11 => }/screenshot.sh | 0 qtile/scripts/{x11 => }/wallpaper.sh | 5 +- qtile/scripts/wayland/screenshot.sh | 32 ----- qtile/scripts/wayland/wallpaper.sh | 78 ---------- rofi/config-wallpaper.rasi | 4 +- 18 files changed, 82 insertions(+), 297 deletions(-) rename qtile/{autostart_x11.sh => autostart.sh} (95%) delete mode 100755 qtile/autostart_wayland.sh delete mode 100644 qtile/reload.sh rename qtile/scripts/{x11 => }/barswitcher.sh (100%) rename qtile/scripts/{x11 => }/loadbar.sh (100%) rename qtile/scripts/{x11 => }/screenshot.sh (100%) rename qtile/scripts/{x11 => }/wallpaper.sh (85%) delete mode 100755 qtile/scripts/wayland/screenshot.sh delete mode 100755 qtile/scripts/wayland/wallpaper.sh diff --git a/.bashrc b/.bashrc index f1e5a5f..4e4a1be 100644 --- a/.bashrc +++ b/.bashrc @@ -36,7 +36,7 @@ alias dot="cd ~/dotfiles" # ----------------------------------------------------- alias Qtile='startx' -alias QtileWayland='qtile start -b wayland' +# alias QtileWayland='qtile start -b wayland' # Hyprland with Hyprland # ----------------------------------------------------- @@ -120,7 +120,6 @@ if [[ $(tty) == *"pts"* ]]; then else if [ -f /bin/qtile ]; then echo "Start Qtile X11 with command Qtile" - echo "Start Qtile Wayland with command QtileWayland" fi if [ -f /bin/hyprctl ]; then echo "Start Hyprland with command Hyprland" diff --git a/.dev/excludes.txt b/.dev/excludes.txt index e9d31e7..cf5c095 100644 --- a/.dev/excludes.txt +++ b/.dev/excludes.txt @@ -11,4 +11,5 @@ keyboard.conf keyboard.py animation.conf decoration.conf -window.conf \ No newline at end of file +window.conf +autostart.sh \ No newline at end of file diff --git a/.install/displaymanager.sh b/.install/displaymanager.sh index 1b76e96..acc25e6 100755 --- a/.install/displaymanager.sh +++ b/.install/displaymanager.sh @@ -24,9 +24,12 @@ echo -e "${NONE}" echo "" fi if [[ $profile == *"Qtile"* ]]; then + if [ -f /usr/share/wayland-sessions/qtile-wayland.desktop ]; then + sudo mv /usr/share/wayland-sessions/qtile-wayland.desktop /usr/share/wayland-sessions/qtile-wayland.bak + fi echo "PLEASE NOTE: Qtile works with Display Managers." echo "But if you want to use the tty based (terminal) login instead, you can disable the display manager now." - echo "If you install the aliases with the included .bashrc, you can start Qtile with the command Qtile or QtileWayland." + echo "If you install the aliases with the included .bashrc, you can start Qtile with the command Qtile." echo "" fi diff --git a/.install/keyboard.sh b/.install/keyboard.sh index 25cc639..dd219a4 100755 --- a/.install/keyboard.sh +++ b/.install/keyboard.sh @@ -50,9 +50,9 @@ else REPLACE="$keyboard_layout" 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/conf/keyboard.py + SEARCH="\"setxkbmap en\"" + REPLACE="\"setxkbmap $keyboard_layout\"" + sed -i "s/$SEARCH/$REPLACE/g" ~/dotfiles-versions/$version/qtile/autostart.sh echo "" echo "Keyboard setup updated successfully." diff --git a/.install/restore.sh b/.install/restore.sh index c86d272..09922ac 100755 --- a/.install/restore.sh +++ b/.install/restore.sh @@ -59,17 +59,9 @@ _showRestoreOptions() { fi fi if [[ $profile == *"Qtile"* ]]; then - if [ -f ~/dotfiles/qtile/conf/keyboard.py ]; then - restorelist+="~/dotfiles/qtile/conf/keyboard.py " - selectedlist+="~/dotfiles/qtile/conf/keyboard.py," - fi - if [ -f ~/dotfiles/qtile/autostart_wayland.sh ]; then - restorelist+="~/dotfiles/qtile/autostart_wayland.sh " - selectedlist+="~/dotfiles/qtile/autostart_wayland.sh," - fi - if [ -f ~/dotfiles/qtile/autostart_x11.sh ]; then - restorelist+="~/dotfiles/qtile/autostart_x11.sh " - selectedlist+="~/dotfiles/qtile/autostart_x11.sh," + if [ -f ~/dotfiles/qtile/autostart.sh ]; then + restorelist+="~/dotfiles/qtile/autostart.sh " + selectedlist+="~/dotfiles/qtile/autostart.sh," fi fi restoreselect=$(gum choose --no-limit --height 20 --cursor-prefix "( ) " --selected-prefix "(x) " --unselected-prefix "( ) " --selected="$selectedlist" $restorelist) diff --git a/CHANGELOG b/CHANGELOG index 318f66b..bd4c6d1 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -8,11 +8,14 @@ Installation: 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 - -Settings Script: +- Wallpaper selector now with preview thumbnails - 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 +- Waybar settings module to edit some ML4W waybar themes settings on the fly +- SDDM settings module to update the SDDM background with current wallpaper + +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 + Version 2.6.1 https://gitlab.com/stephan-raabe/dotfiles/-/releases/2.6.1 diff --git a/hypr/scripts/wallpaper.sh b/hypr/scripts/wallpaper.sh index 91194b9..2a5942f 100755 --- a/hypr/scripts/wallpaper.sh +++ b/hypr/scripts/wallpaper.sh @@ -22,7 +22,11 @@ case $1 in # Select wallpaper with rofi "select") - selected=$(ls -1 ~/wallpaper | grep "jpg" | rofi -dmenu -replace -config ~/dotfiles/rofi/config-wallpaper.rasi) + + selected=$( find "$HOME/wallpaper" -type f \( -iname "*.jpg" -o -iname "*.jpeg" -o -iname "*.png" \) -exec basename {} \; | sort | while read rfile + do + echo -en "$rfile\x00icon\x1f$HOME/wallpaper/${rfile}\n" + done | rofi -dmenu -replace -l 6 -config ~/dotfiles/rofi/config-wallpaper.rasi) if [ ! "$selected" ]; then echo "No wallpaper selected" exit diff --git a/qtile/autostart_x11.sh b/qtile/autostart.sh similarity index 95% rename from qtile/autostart_x11.sh rename to qtile/autostart.sh index 122bf32..6ddcc2c 100755 --- a/qtile/autostart_x11.sh +++ b/qtile/autostart.sh @@ -15,7 +15,8 @@ # For Virtual Machine # xrandr --output Virtual-1 --mode 1920x1080 -# Set keyboard layout in config.py +# Keyboard layout +setxkbmap en # Load picom picom & diff --git a/qtile/autostart_wayland.sh b/qtile/autostart_wayland.sh deleted file mode 100755 index 01c7f93..0000000 --- a/qtile/autostart_wayland.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash -# ___ _____ ___ _ _____ ____ _ _ -# / _ \_ _|_ _| | | ____| / ___|| |_ __ _ _ __| |_ -# | | | || | | || | | _| \___ \| __/ _` | '__| __| -# | |_| || | | || |___| |___ ___) | || (_| | | | |_ -# \__\_\|_| |___|_____|_____| |____/ \__\__,_|_| \__| -# -# -# by Stephan Raabe (2023) -# ----------------------------------------------------- - -# My screen resolution -# xrandr --rate 120 - -# For Virtual Machine -# xrandr --output Virtual-1 --mode 1920x1080 - -# Set keyboard mapping in config.py - -# Load power manager -xfce4-power-manager & - -# Load notification service -dunst & - -# Load cliphist history -wl-paste --watch cliphist store & - -# Launch GTK -~/dotfiles/gtk/gtk.sh - -swww init - -# Setup Wallpaper and update colors -~/dotfiles/qtile/scripts/wayland/wallpaper.sh init & \ No newline at end of file diff --git a/qtile/config.py b/qtile/config.py index ad64790..3438300 100644 --- a/qtile/config.py +++ b/qtile/config.py @@ -60,14 +60,12 @@ logger.warning("Using config.py with " + core_name) # -------------------------------------------------------- # Define Status Bar # -------------------------------------------------------- -if core_name == "x11": - try: - wm_bar = Path(home + "/.cache/.qtile_bar_x11.sh").read_text().replace("\n", "") - except: - wm_bar = "qtile" -elif qtile.core.name == "wayland": +try: + wm_bar = Path(home + "/.cache/.qtile_bar_x11.sh").read_text().replace("\n", "") +except: wm_bar = "qtile" + logger.warning("Status bar: " + wm_bar) # -------------------------------------------------------- @@ -89,118 +87,60 @@ terminal = "alacritty" mod = "mod4" # SUPER KEY -if core_name == "x11": - logger.warning("Using keys with x11") - keys = [ +keys = [ - # Focus - Key([mod], "Left", lazy.layout.left(), desc="Move focus to left"), - Key([mod], "Right", lazy.layout.right(), desc="Move focus to right"), - Key([mod], "Down", lazy.layout.down(), desc="Move focus down"), - Key([mod], "Up", lazy.layout.up(), desc="Move focus up"), - Key([mod], "space", lazy.layout.next(), desc="Move window focus to other window around"), - - # Move - Key([mod, "shift"], "Left", lazy.layout.shuffle_left(), desc="Move window to the left"), - Key([mod, "shift"], "Right", lazy.layout.shuffle_right(), desc="Move window to the right"), - Key([mod, "shift"], "Down", lazy.layout.shuffle_down(), desc="Move window down"), - Key([mod, "shift"], "Up", lazy.layout.shuffle_up(), desc="Move window up"), - - # Swap - Key([mod, "shift"], "h", lazy.layout.swap_left()), - Key([mod, "shift"], "l", lazy.layout.swap_right()), - - Key([mod], "Print", lazy.spawn(home + "/dotfiles/qtile/scripts/x11/screenshot.sh")), - - # Size - Key([mod, "control"], "Down", lazy.layout.shrink(), desc="Grow window to the left"), - Key([mod, "control"], "Up", lazy.layout.grow(), desc="Grow window to the right"), - Key([mod], "n", lazy.layout.normalize(), desc="Reset all window sizes"), - - # Floating - Key([mod], "t", lazy.window.toggle_floating(), desc='Toggle floating'), - - # Split - Key([mod, "shift"], "Return", lazy.layout.toggle_split(), desc="Toggle between split and unsplit sides of stack"), - - # Toggle Layouts - Key([mod], "Tab", lazy.next_layout(), desc="Toggle between layouts"), - - # Fullscreen - Key([mod], "f", lazy.window.toggle_fullscreen()), - - #System - Key([mod], "q", lazy.window.kill(), desc="Kill focused window"), - Key([mod, "shift"], "r", lazy.reload_config(), desc="Reload the config"), - Key([mod, "control"], "q", lazy.spawn(home + "/dotfiles/qtile/scripts/powermenu.sh"), desc="Open Powermenu"), - Key([mod, "shift"], "s", lazy.spawn(home + "/dotfiles/qtile/scripts/x11/barswitcher.sh"), desc="Switch Status Bar"), + # Focus + Key([mod], "Left", lazy.layout.left(), desc="Move focus to left"), + Key([mod], "Right", lazy.layout.right(), desc="Move focus to right"), + Key([mod], "Down", lazy.layout.down(), desc="Move focus down"), + Key([mod], "Up", lazy.layout.up(), desc="Move focus up"), + Key([mod], "space", lazy.layout.next(), desc="Move window focus to other window around"), - # Apps - Key([mod], "Return", lazy.spawn(terminal), desc="Launch terminal"), - Key([mod, "control"], "Return", lazy.spawn("rofi -show drun"), desc="Launch Rofi"), - Key([mod], "b", lazy.spawn("sh " + home + "/dotfiles/.settings/browser.sh"), desc="Launch Browser"), - Key([mod, "shift"], "w", lazy.spawn(home + "/dotfiles/qtile/scripts/x11/wallpaper.sh"), desc="Update Theme and Wallpaper"), - Key([mod, "control"], "w", lazy.spawn(home + "/dotfiles/qtile/scripts/x11/wallpaper.sh select"), desc="Select Theme and Wallpaper"), + # Move + Key([mod, "shift"], "Left", lazy.layout.shuffle_left(), desc="Move window to the left"), + Key([mod, "shift"], "Right", lazy.layout.shuffle_right(), desc="Move window to the right"), + Key([mod, "shift"], "Down", lazy.layout.shuffle_down(), desc="Move window down"), + Key([mod, "shift"], "Up", lazy.layout.shuffle_up(), desc="Move window up"), - Key([], "XF86MonBrightnessUp", lazy.spawn("brightnessctl -q s +20%")), - Key([], "XF86MonBrightnessDown", lazy.spawn("brightnessctl -q s 20%-")) - ] -elif qtile.core.name == "wayland": - logger.warning("Using keys with wayland") + # Swap + Key([mod, "shift"], "h", lazy.layout.swap_left()), + Key([mod, "shift"], "l", lazy.layout.swap_right()), - keys = [ + Key([mod], "Print", lazy.spawn(home + "/dotfiles/qtile/scripts/screenshot.sh")), - # Focus - Key([mod], "Left", lazy.layout.left(), desc="Move focus to left"), - Key([mod], "Right", lazy.layout.right(), desc="Move focus to right"), - Key([mod], "Down", lazy.layout.down(), desc="Move focus down"), - Key([mod], "Up", lazy.layout.up(), desc="Move focus up"), - Key([mod], "space", lazy.layout.next(), desc="Move window focus to other window around"), - - # Move - Key([mod, "shift"], "Left", lazy.layout.shuffle_left(), desc="Move window to the left"), - Key([mod, "shift"], "Right", lazy.layout.shuffle_right(), desc="Move window to the right"), - Key([mod, "shift"], "Down", lazy.layout.shuffle_down(), desc="Move window down"), - Key([mod, "shift"], "Up", lazy.layout.shuffle_up(), desc="Move window up"), + # Size + Key([mod, "control"], "Down", lazy.layout.shrink(), desc="Grow window to the left"), + Key([mod, "control"], "Up", lazy.layout.grow(), desc="Grow window to the right"), + Key([mod], "n", lazy.layout.normalize(), desc="Reset all window sizes"), - # Swap - Key([mod, "shift"], "h", lazy.layout.swap_left()), - Key([mod, "shift"], "l", lazy.layout.swap_right()), + # Floating + Key([mod], "t", lazy.window.toggle_floating(), desc='Toggle floating'), + + # Split + Key([mod, "shift"], "Return", lazy.layout.toggle_split(), desc="Toggle between split and unsplit sides of stack"), - Key([mod], "Print", lazy.spawn(home + "/dotfiles/qtile/scripts/wayland/screenshot.sh")), + # Toggle Layouts + Key([mod], "Tab", lazy.next_layout(), desc="Toggle between layouts"), - # Size - Key([mod, "control"], "Down", lazy.layout.shrink(), desc="Grow window to the left"), - Key([mod, "control"], "Up", lazy.layout.grow(), desc="Grow window to the right"), - Key([mod], "n", lazy.layout.normalize(), desc="Reset all window sizes"), + # Fullscreen + Key([mod], "f", lazy.window.toggle_fullscreen()), - # Floating - Key([mod], "t", lazy.window.toggle_floating(), desc='Toggle floating'), - - # Split - Key([mod, "shift"], "Return", lazy.layout.toggle_split(), desc="Toggle between split and unsplit sides of stack"), + #System + Key([mod], "q", lazy.window.kill(), desc="Kill focused window"), + Key([mod, "shift"], "r", lazy.reload_config(), desc="Reload the config"), + Key([mod, "control"], "q", lazy.spawn(home + "/dotfiles/qtile/scripts/powermenu.sh"), desc="Open Powermenu"), + Key([mod, "shift"], "s", lazy.spawn(home + "/dotfiles/qtile/scripts/barswitcher.sh"), desc="Switch Status Bar"), - # Toggle Layouts - Key([mod], "Tab", lazy.next_layout(), desc="Toggle between layouts"), + # Apps + Key([mod], "Return", lazy.spawn(terminal), desc="Launch terminal"), + Key([mod, "control"], "Return", lazy.spawn("rofi -show drun"), desc="Launch Rofi"), + Key([mod], "b", lazy.spawn("sh " + home + "/dotfiles/.settings/browser.sh"), desc="Launch Browser"), + Key([mod, "shift"], "w", lazy.spawn(home + "/dotfiles/qtile/scripts/wallpaper.sh"), desc="Update Theme and Wallpaper"), + Key([mod, "control"], "w", lazy.spawn(home + "/dotfiles/qtile/scripts/wallpaper.sh select"), desc="Select Theme and Wallpaper"), - # Fullscreen - Key([mod], "f", lazy.window.toggle_fullscreen()), - - #System - Key([mod], "q", lazy.window.kill(), desc="Kill focused window"), - Key([mod, "shift"], "r", lazy.reload_config(), desc="Reload the config"), - Key([mod, "control"], "q", lazy.spawn(home + "/dotfiles/qtile/scripts/powermenu.sh"), desc="Open Powermenu"), - - # Apps - Key([mod], "Return", lazy.spawn(terminal), desc="Launch terminal"), - Key([mod, "control"], "Return", lazy.spawn("rofi -show drun"), desc="Launch Rofi"), - Key([mod], "b", lazy.spawn("sh " + home + "/dotfiles/.settings/browser.sh"), desc="Launch Browser"), - Key([mod, "shift"], "w", lazy.spawn(home + "/dotfiles/qtile/scripts/wayland/wallpaper.sh"), desc="Update Theme and Wallpaper"), - Key([mod, "control"], "w", lazy.spawn(home + "/dotfiles/qtile/scripts/wayland/wallpaper.sh select"), desc="Select Theme and Wallpaper"), - - Key([], "XF86MonBrightnessUp", lazy.spawn("brightnessctl -q s +20%")), - Key([], "XF86MonBrightnessDown", lazy.spawn("brightnessctl -q s 20%-")) - ] + Key([], "XF86MonBrightnessUp", lazy.spawn("brightnessctl -q s +20%")), + Key([], "XF86MonBrightnessDown", lazy.spawn("brightnessctl -q s 20%-")) +] # -------------------------------------------------------- # Groups @@ -517,9 +457,6 @@ reconfigure_screens = True # focus, should we respect this or not? auto_minimize = True -# When using the Wayland backend, this can be used to configure input devices. -wl_input_rules = None - # XXX: Gasp! We're lying here. In fact, nobody really uses or cares about this # string besides java UI toolkits; you can see several discussions on the # mailing lists, GitHub issues, and other WM documentation that suggest setting @@ -535,15 +472,6 @@ wl_input_rules = None wmname = "QTILE" -# -------------------------------------------------------- -# Set wayland properties -# -------------------------------------------------------- - -# Keyboard layout -wl_input_rules = { - "type:keyboard": InputConfig(kb_layout=keyboard_layout), -} - # -------------------------------------------------------- # Hooks # -------------------------------------------------------- @@ -551,12 +479,8 @@ wl_input_rules = { # HOOK startup @hook.subscribe.startup_once def autostart(): - if qtile.core.name == "x11": - autostartscript = "~/.config/qtile/autostart_x11.sh" - subprocess.Popen(['setxkbmap',keyboard_layout]) - elif qtile.core.name == "wayland": - autostartscript = "~/.config/qtile/autostart_wayland.sh" - + autostartscript = "~/.config/qtile/autostart_x11.sh" + subprocess.Popen(['setxkbmap',keyboard_layout]) home = os.path.expanduser(autostartscript) subprocess.Popen([home]) diff --git a/qtile/reload.sh b/qtile/reload.sh deleted file mode 100644 index e69de29..0000000 diff --git a/qtile/scripts/x11/barswitcher.sh b/qtile/scripts/barswitcher.sh similarity index 100% rename from qtile/scripts/x11/barswitcher.sh rename to qtile/scripts/barswitcher.sh diff --git a/qtile/scripts/x11/loadbar.sh b/qtile/scripts/loadbar.sh similarity index 100% rename from qtile/scripts/x11/loadbar.sh rename to qtile/scripts/loadbar.sh diff --git a/qtile/scripts/x11/screenshot.sh b/qtile/scripts/screenshot.sh similarity index 100% rename from qtile/scripts/x11/screenshot.sh rename to qtile/scripts/screenshot.sh diff --git a/qtile/scripts/x11/wallpaper.sh b/qtile/scripts/wallpaper.sh similarity index 85% rename from qtile/scripts/x11/wallpaper.sh rename to qtile/scripts/wallpaper.sh index a0144a2..d6de54a 100755 --- a/qtile/scripts/x11/wallpaper.sh +++ b/qtile/scripts/wallpaper.sh @@ -22,7 +22,10 @@ case $1 in # Select wallpaper with rofi "select") - selected=$(ls -1 ~/wallpaper | grep "jpg" | rofi -dmenu -replace -config ~/dotfiles/rofi/config-wallpaper.rasi) + selected=$( find "$HOME/wallpaper" -type f \( -iname "*.jpg" -o -iname "*.jpeg" -o -iname "*.png" \) -exec basename {} \; | sort | while read rfile + do + echo -en "$rfile\x00icon\x1f$HOME/wallpaper/${rfile}\n" + done | rofi -dmenu -replace -l 6 -config ~/dotfiles/rofi/config-wallpaper.rasi) if [ ! "$selected" ]; then echo "No wallpaper selected" exit diff --git a/qtile/scripts/wayland/screenshot.sh b/qtile/scripts/wayland/screenshot.sh deleted file mode 100755 index 5e617ad..0000000 --- a/qtile/scripts/wayland/screenshot.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash -# ____ _ _ -# / ___| ___ _ __ ___ ___ _ __ ___| |__ ___ | |_ -# \___ \ / __| '__/ _ \/ _ \ '_ \/ __| '_ \ / _ \| __| -# ___) | (__| | | __/ __/ | | \__ \ | | | (_) | |_ -# |____/ \___|_| \___|\___|_| |_|___/_| |_|\___/ \__| -# -# -# by Stephan Raabe (2023) -# ----------------------------------------------------- - -DIR="$HOME/Pictures/screenshots/" -NAME="screenshot_$(date +%d%m%Y_%H%M%S).png" - -option2="Selected area" -option3="Fullscreen (delay 3 sec)" - -options="$option2\n$option3" - -choice=$(echo -e "$options" | rofi -dmenu -replace -config ~/dotfiles/rofi/config-screenshot.rasi -i -no-show-icons -l 2 -width 30 -p "Take Screenshot") - -case $choice in - $option2) - grim -g "$(slurp)" - | swappy -f - - notify-send "Screenshot created" "Mode: Selected area" - ;; - $option3) - sleep 3 - grim - | swappy -f - - notify-send "Screenshot created" "Mode: Fullscreen" - ;; -esac diff --git a/qtile/scripts/wayland/wallpaper.sh b/qtile/scripts/wayland/wallpaper.sh deleted file mode 100755 index 8489f72..0000000 --- a/qtile/scripts/wayland/wallpaper.sh +++ /dev/null @@ -1,78 +0,0 @@ -#!/bin/bash -# _ _ -# __ ____ _| | |_ __ __ _ _ __ ___ _ __ -# \ \ /\ / / _` | | | '_ \ / _` | '_ \ / _ \ '__| -# \ V V / (_| | | | |_) | (_| | |_) | __/ | -# \_/\_/ \__,_|_|_| .__/ \__,_| .__/ \___|_| -# |_| |_| -# -# by Stephan Raabe (2023) -# ----------------------------------------------------- - -case $1 in - - # Load wallpaper from .cache of last session - "init") - if [ -f ~/.cache/current_wallpaper.jpg ]; then - wal -q -i ~/.cache/current_wallpaper.jpg - else - wal -q -i ~/wallpaper/ - fi - ;; - - # Select wallpaper with rofi - "select") - selected=$(ls -1 ~/wallpaper | grep "jpg" | rofi -dmenu -replace -config ~/dotfiles/rofi/config-wallpaper.rasi) - if [ ! "$selected" ]; then - echo "No wallpaper selected" - exit - fi - wal -q -i ~/wallpaper/$selected - ;; - - # Randomly select wallpaper - *) - wal -q -i ~/wallpaper/ - ;; - -esac - -# ----------------------------------------------------- -# Load current pywal color scheme -# ----------------------------------------------------- -source "$HOME/.cache/wal/colors.sh" -echo "Wallpaper: $wallpaper" - -# ----------------------------------------------------- -# Copy selected wallpaper into .cache folder -# ----------------------------------------------------- -cp $wallpaper ~/.cache/current_wallpaper.jpg - -# ----------------------------------------------------- -# get wallpaper iamge name -# ----------------------------------------------------- -newwall=$(echo $wallpaper | sed "s|$HOME/wallpaper/||g") - -# ----------------------------------------------------- -# Set the new wallpaper -# ----------------------------------------------------- -swww init - -transition_type="wipe" -# transition_type="outer" -# transition_type="random" - -swww img $wallpaper \ - --transition-bezier .43,1.19,1,.4 \ - --transition-fps=60 \ - --transition-type=$transition_type \ - --transition-duration=0.7 \ - -qtile cmd-obj -o cmd -f reload_config - -# ----------------------------------------------------- -# Send notification -# ----------------------------------------------------- -notify-send "Colors and Wallpaper updated" "with image $newwall" - -echo "DONE!" diff --git a/rofi/config-wallpaper.rasi b/rofi/config-wallpaper.rasi index 95946a4..63b6c22 100644 --- a/rofi/config-wallpaper.rasi +++ b/rofi/config-wallpaper.rasi @@ -13,7 +13,7 @@ configuration { modi: "drun,run"; font: "Fira Sans Bold 10"; - show-icons: false; + show-icons: true; icon-theme: "kora"; display-drun: "APPS"; display-run: "RUN"; @@ -212,7 +212,7 @@ element alternate.active { element-icon { background-color: transparent; text-color: inherit; - size: 32px; + size: 60px; cursor: inherit; }