diff --git a/qtile/config.py b/qtile/config.py index 0e818ed..aeb1c27 100644 --- a/qtile/config.py +++ b/qtile/config.py @@ -44,7 +44,7 @@ from libqtile import hook from libqtile import qtile from typing import List from libqtile import bar, layout, widget -from libqtile.config import Click, Drag, Group, Key, Match, Screen, ScratchPad, DropDown +from libqtile.config import Click, Drag, Group, Key, Match, Screen, ScratchPad, DropDown, KeyChord from libqtile.lazy import lazy from libqtile.utils import guess_terminal from libqtile.widget import Spacer, Backlight @@ -130,8 +130,10 @@ keys = [ Key([mod], "r", lazy.spawn("rofi -show drun -icon-theme 'Papirus' -show-icons"), desc="Launch Rofi"), Key([mod], "b", lazy.spawn(browser), desc="Launch Chromium"), Key([mod], "v", lazy.spawn("/home/raabe/dotfiles/scripts/looking-glass.sh"), desc="Start Looking Glass Client"), - Key([mod, "shift"], "w", lazy.spawn("/home/raabe/dotfiles/scripts/updatewal.sh"), desc="Update Thema and Wallpaper"), + Key([mod, "shift"], "w", lazy.spawn("/home/raabe/dotfiles/scripts/updatewal.sh"), desc="Update Theme and Wallpaper"), + Key([mod, "control"], "w", lazy.spawn("/home/raabe/dotfiles/scripts/wallpaper.sh"), desc="Select Theme and Wallpaper"), Key([mod, "shift"], "s", lazy.spawn("scrot -s"), desc="Screenshot of selected area"), + Key([mod, "control"], "t", lazy.spawn("/home/raabe/dotfiles/scripts/templates.sh"), desc="Select Tempate and copy to clipboard"), # Scratchpads Key([mod, "shift"], "t", lazy.group["terminal"].dropdown_toggle("term")), @@ -240,8 +242,7 @@ widget_list = [ text='  ', foreground=ColorC, ), - widget.WindowName( - ), + widget.WindowName(), widget.Systray(), widget.TextBox( text='', @@ -312,6 +313,13 @@ screens = [ ), ] + +# -------------------------------------------------------- +# Screens Gap for PolyBar +# -------------------------------------------------------- + +# screens = [Screen(top=bar.Gap(size=35))] + # -------------------------------------------------------- # Drag floating layouts. # -------------------------------------------------------- diff --git a/scripts/templates.sh b/scripts/templates.sh new file mode 100755 index 0000000..f1e0adc --- /dev/null +++ b/scripts/templates.sh @@ -0,0 +1,16 @@ +#!/bin/bash +# _____ _ _ +# |_ _|__ _ __ ___ _ __ | | __ _| |_ ___ ___ +# | |/ _ \ '_ ` _ \| '_ \| |/ _` | __/ _ \/ __| +# | | __/ | | | | | |_) | | (_| | || __/\__ \ +# |_|\___|_| |_| |_| .__/|_|\__,_|\__\___||___/ +# |_| +# +# by Stephan Raabe (2023) +# ----------------------------------------------------- + +# Select text file +selected=$(ls -1 ~/private/templates | rofi -dmenu -p "Select the template") + +# Add content to clipboard +xclip -sel clip ~/private/templates/$selected diff --git a/scripts/wallpaper.sh b/scripts/wallpaper.sh new file mode 100755 index 0000000..27b96fd --- /dev/null +++ b/scripts/wallpaper.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# __ __ _ _ +# \ \ / /_ _| | |_ __ __ _ _ __ ___ _ __ +# \ \ /\ / / _` | | | '_ \ / _` | '_ \ / _ \ '__| +# \ V V / (_| | | | |_) | (_| | |_) | __/ | +# \_/\_/ \__,_|_|_| .__/ \__,_| .__/ \___|_| +# |_| |_| +# +# by Stephan Raabe (2023) +# ----------------------------------------------------- + +# Select wallpaper +selected=$(ls -1 ~/wallpaper | rofi -dmenu -p "Select the wallpaper") + +# Update wallpaper with pywal +wal -q -i ~/wallpaper/$selected + +# Wait for 1 sec +sleep 1 + +# Reload qtile to color bar +qtile cmd-obj -o cmd -f reload_config