From 345b5fd5933fdbad8edf437a8dd53c624351754b Mon Sep 17 00:00:00 2001 From: Justine Smithies Date: Wed, 18 Oct 2023 19:14:53 +0100 Subject: Updated daily back to Qtile Wayland --- .bashrc | 2 +- .config/kanshi/config | 4 ++-- .config/lf/lfrc | 3 ++- .local/bin/screenshot.sh | 15 +++++++++++++-- README.md | 24 ++++++++++++++---------- screenshot.jpg | Bin 827294 -> 942415 bytes 6 files changed, 32 insertions(+), 16 deletions(-) diff --git a/.bashrc b/.bashrc index b2aa920..2a789a3 100644 --- a/.bashrc +++ b/.bashrc @@ -91,7 +91,7 @@ fi # If on matching tty start the WM if [ "$(tty)" = "/dev/tty1" ]; then - exec dbus-run-session river + exec dbus-run-session qtile start -b wayland fi # If not in xterm don't start starship diff --git a/.config/kanshi/config b/.config/kanshi/config index b617c94..70c1ced 100644 --- a/.config/kanshi/config +++ b/.config/kanshi/config @@ -1,10 +1,10 @@ profile Laptop { output eDP-1 position 0,0 mode 1920x1080 - exec sh -c "$HOME/.config/yambar/scripts/yambar-start.sh" + #exec sh -c "$HOME/.config/yambar/scripts/yambar-start.sh" } profile Dock { output HDMI-A-1 position 0,0 mode 1920x1080 output eDP-1 position 1920,0 mode 1920x1080 - exec sh -c "$HOME/.config/yambar/scripts/yambar-start.sh" + #exec sh -c "$HOME/.config/yambar/scripts/yambar-start.sh" } diff --git a/.config/lf/lfrc b/.config/lf/lfrc index 8fda791..32f8409 100644 --- a/.config/lf/lfrc +++ b/.config/lf/lfrc @@ -52,7 +52,8 @@ cmd open ${{ }} cmd setwallpaper ${{ - cp -f "$f" ~/.cache/wallpaper; pkill swaybg > /dev/null 2>&1; nohup swaybg -m fill -i ~/.cache/wallpaper > /dev/null 2>&1 & + #cp -f "$f" ~/.cache/wallpaper; pkill swaybg > /dev/null 2>&1; nohup swaybg -m fill -i ~/.cache/wallpaper > /dev/null 2>&1 & + cp -f "$f" ~/.cache/wallpaper && qtile cmd-obj -o cmd -f reload_config }} # Key Mappings diff --git a/.local/bin/screenshot.sh b/.local/bin/screenshot.sh index 088c1b1..29c62c8 100755 --- a/.local/bin/screenshot.sh +++ b/.local/bin/screenshot.sh @@ -9,10 +9,21 @@ case $1 in # Take a screenshot and save it to the clipboard grim -g "$(slurp -d)" - | wl-copy ;; + focused-window) + # Take a screenshot of the focused window + pos=$(qtile cmd-obj -o window -f get_position | awk '{ print $1" "$2}' | tr -dc '0-9 ') + xpos=$(echo $pos | awk '{ print $1 }') + ypos=$(echo $pos | awk '{ print $2 }') + size=$(qtile cmd-obj -o window -f get_size | awk '{ print $1" "$2}' | tr -dc '0-9 ') + xsize=$(echo $size | awk '{ print $1 }') + ysize=$(echo $size | awk '{ print $2 }') + xsize=$((xsize+4)) # Value added is 2 times the border width + ysize=$((ysize+4)) # Value added is 2 times the border width + grim -g "$xpos"",""$ypos $xsize""x""$ysize" -t jpeg ~/Pictures/Screenshots/$(date +%Y-%m-%d_%H-%m-%s).jpg + ;; *) # Take a screenshot of the currently focused output and save it into screenshots - output="$(lswt -j | jq -c '.[] | select(.activated) | .outputs' | awk -F'["" -]' '{print $2}')" + output="$(qtile cmd-obj -o core -f eval -a "self._current_output.wlr_output.name" | awk -F"['']" '/,/{print $2}')" grim -o $output -t jpeg ~/Pictures/Screenshots/$(date +%Y-%m-%d_%H-%m-%s).jpg ;; esac diff --git a/README.md b/README.md index 0982d36..4b2e77f 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,19 @@ -# Various dotfiles for my [Void](https://voidlinux.org/) - [River](https://github.com/riverwm/river) setup. -River is a dynamic tiling Wayland compositor with flexible runtime configuration. +# Various dotfiles for my [Void](https://voidlinux.org/) - [Qtile-Wayland](https://github.com/qtile/qtile) setup. +A full-featured, hackable tiling window manager written and configured in Python. +Please note that I use the latest Qtile from their GitHub repo which can be installed by following the installation instructions [below](#installing-qtile-wayland). ![ScreenShot](screenshot.jpg) ## Details -Below is a list of some of the packages that I use for my current setup which consists of two screens. A monitor as the main screen and the laptop screen as a slave and Kanshi is used to set the monitor as the left most and apply focus to it using a riverctl focus-output command. Please note that my config isn't perfect so your mileage may vary.
+Below is a list of some of the packages that I use for my current setup which consists of two screens. A monitor as the main screen and the laptop screen as a slave and Kanshi is used to set the monitor as the left most. Please note that my config isn't perfect so your mileage may vary.
The wallpaper featured in the screenshots can be found here: https://cdna.artstation.com/p/assets/images/images/015/554/914/large/artur-sadlos-to-sh300-ooh-as-05i.jpg
- **Operating System** --- [Void](https://voidlinux.org/) - **Boot Loader** --- [Grub](https://www.gnu.org/software/grub/index.html) - **Resource Monitor** --- [Btop](https://github.com/aristocratos/btop) -- **Window Manager** --- [River](https://github.com/riverwm/river) -- **Status Bar** --- [Yambar](https://codeberg.org/dnkl/yambar) +- **Window Manager** --- [Qtile](https://github.com/qtile/qtile) +- **Status Bar** --- [Qtile's own](https://codeberg.org/qtile/qtile) - **Screen Detection** --- [wlr-randr](https://sr.ht/~emersion/wlr-randr/) - **Screen Hotplug** --- [Kanshi](https://sr.ht/~emersion/kanshi/) - **Screen Locker** --- [Swaylock](https://github.com/swaywm/swaylock) @@ -81,11 +82,14 @@ The wallpaper featured in the screenshots can be found here: https://cdna.artsta ### Window manager controls | Keys | Action | | ------------------------------------ | ------------------------- | -| MOD + q | Kill window | -| MOD + RETURN | Spawn terminal | -| MOD + d | Fuzzel menu | -| CTRL + MOD + p | Fuzzel power menu | +| CTRL + MOD + r | restart Qtile | +| CTRL + MOD + q | shutdown Qtile | +| CTRL + MOD + w | Open window switcher | +| MOD + w | kill window | +| MOD + RETURN | spawn terminal | +| CTRL + Space | Rofi menu | +| CTRL + MOD + p | Rofi power menu | ## To set the wallpaper -From within ranger if you highlight a valid image file and enter "wp" it will set that image as the default wallpaper. +From within lf if you highlight a valid image file and enter "bg" it will set that image as the default wallpaper. diff --git a/screenshot.jpg b/screenshot.jpg index 362fb92..cd36f3f 100644 Binary files a/screenshot.jpg and b/screenshot.jpg differ -- cgit v1.2.3