Commit Diff


commit - f1a984e68519d5606bd8bfda2f551cefc5c3bb5e
commit + c9894f9b2514675a713901b7993c33f7c68e2a4d
blob - /dev/null
blob + 60d8c48860576525bdaf262e6bfeb01db0a3bbd7 (mode 644)
--- /dev/null
+++ .gitignore
@@ -0,0 +1,4 @@
+home/.local/share/
+*.swp
+*.swo
+*.log
blob - 6d7efb02dee78f6151a076e20669a1b45e937ce8
blob + 6e2554248e02c3f56e8d2cde2d7dbc2065396349
--- home/.config/herbstluftwm/autostart
+++ home/.config/herbstluftwm/autostart
@@ -21,13 +21,14 @@ Mod=Mod1    # Use alt as the main modifier
 hc keybind $Mod-F4 close_and_remove
 # hc keybind $Mod-Shift-q quit
 hc keybind $Mod-Shift-r reload
-# hc keybind $Mod-Shift-c close
+hc keybind $Mod-Shift-c close
 hc keybind $Mod-Return spawn "${TERMINAL:-xterm}" # use your $TERMINAL with xterm as fallback
 
 # Rofi
 hc keybind $Mod-Shift-e spawn rofi -show drun
 hc keybind $Mod-Shift-w spawn rofi -show
 
+
 # basic movement in tiling and floating mode
 # focusing clients
 hc keybind $Mod-Left  focus left
@@ -52,10 +53,6 @@ hc keybind $Mod-Shift-l     shift right
 # splitting frames
 # create an empty frame at the specified direction
 hc keybind $Mod-Control-u       split   bottom  0.5
-hc keybind $Mod-Control-i chain  \
-	, set_attr clients.focus.floating true \
-	, move 25% 25% \
-	, resize 50% 50%
 hc keybind $Mod-Control-o       split   right   0.5
 # let the current frame explode into subframes
 #hc keybind $Mod-Control-space split explode
@@ -77,6 +74,11 @@ hc keybind $Mod-Shift-l spawn slock
 # Monitors
 hc keybind $Mod-F7 spawn /home/sp/.local/bin/dmenumon.sh
 
+# Screenshot
+hc keybind $Mod-F6 spawn /home/sp/.local/bin/screenshot-menu.sh
+hc keybind $Mod-F7 spawn /home/sp/.local/bin/screenshot-menu.sh region
+hc keybind $Mod-F8 spawn /home/sp/.local/bin/screenshot-menu.sh clipboard
+
 # tags
 tag_names=( {1..9} )
 tag_keys=( {1..9} 0 )
@@ -141,7 +143,7 @@ hc set frame_gap 4
 
 hc attr theme.title_height 15
 hc attr theme.title_when always
-hc attr theme.title_font 'Dejavu Sans:pixelsize=12'  # example using Xft
+hc attr theme.title_font 'Speen:pixelsize=12'  # example using Xft
 # hc attr theme.title_font '-*-fixed-medium-r-*-*-13-*-*-*-*-*-*-*'
 hc attr theme.title_depth 3  # space below the title's baseline
 hc attr theme.active.color '#345F0Cef'
blob - /dev/null
blob + dc9b1ab54b93e03d4cbc6e03e59cea855ef3c0d8 (mode 755)
--- /dev/null
+++ home/.local/bin/screenshot-menu.sh
@@ -0,0 +1,65 @@
+#!/bin/sh
+# Based on https://git.smithies.me.uk/openbsd-desktop-dotfiles/tree/.local/bin/screenshot.sh
+
+dir="$HOME/Pictures/Screenshots"
+mkdir -p "$dir"
+img_path="$dir/$(date +%Y-%m-%d_%H-%M-%S).png"
+
+copy_to_clipboard() {
+  xclip -selection clipboard -t image/png -i "$1"
+}
+
+current_screen() {
+  set -- $(xrandr --current | awk '/ connected/ {print $3}' | grep '^[0-9]')
+  geom="$1"
+
+  MONW=$(echo "$geom" | awk -F '[x+]' '{print $1}')
+  MONH=$(echo "$geom" | awk -F '[x+]' '{print $2}')
+  MONX=$(echo "$geom" | awk -F '[x+]' '{print $3}')
+  MONY=$(echo "$geom" | awk -F '[x+]' '{print $4}')
+}
+
+take_action() {
+  case "$1" in
+    "screen")
+      current_screen
+      maim -g "${MONW}x${MONH}+${MONX}+${MONY}" "$img_path"
+      copy_to_clipboard "$img_path" 
+      printf '%s\n' "$img_path"
+      ;;
+    "region")
+      maim -s "$img_path"
+      copy_to_clipboard "$img_path" 
+      printf '%s\n' "$img_path"
+      ;;
+    "window")
+      maim -i "$(xdotool getactivewindow)" "$img_path"
+      copy_to_clipboard "$img_path" 
+      printf '%s\n' "$img_path"
+      ;;
+    "clipboard")
+      current_screen
+      maim -g "${MONW}x${MONH}+${MONX}+${MONY}" | \
+        xclip -selection clipboard -t image/png
+      printf 'Copied screenshot to clipboard\n'
+      ;;
+    *)
+      exit 1
+      ;;
+  esac
+}
+
+if [ -n "$1" ]; then
+  take_action "$1"
+  exit 0
+fi
+
+choice=$(printf '%s\n' \
+  "screen" \
+  "region" \
+  "window" \
+  "clipboard" |
+  rofi -dmenu -i -p "screenshot")
+
+[ -n "$choice" ] || exit 0
+take_action "$choice"
blob - f6574c3436736b1a7518a29f7031ad9ce9358e08 (mode 644)
blob + /dev/null
--- home/.local/state/btop.log
+++ /dev/null
@@ -1,12 +0,0 @@
-
-2026/03/15 (17:18:00) | ===> btop++ v.1.4.5
-2026/03/15 (17:18:00) | WARNING: failed to get battery
-
-2026/03/15 (21:31:31) | ===> btop++ v.1.4.5
-2026/03/15 (21:31:31) | WARNING: failed to get battery
-
-2026/03/15 (22:19:01) | ===> btop++ v.1.4.5
-2026/03/15 (22:19:01) | WARNING: failed to get battery
-
-2026/03/15 (22:20:06) | ===> btop++ v.1.4.5
-2026/03/15 (22:20:06) | WARNING: failed to get battery
blob - a0bb7efc728c7c95f573311f974c947f7b6c1f29
blob + fdbca08814e1cb19838e85b21204b688beb0372c
--- pkg_mgmt.sh
+++ pkg_mgmt.sh
@@ -14,6 +14,7 @@ herbstluftwm
 lemonbar-xft
 spleen
 ripgrep
+xdotool
 
 rofi
 ranger
@@ -24,7 +25,11 @@ xautolock
 tree
 nmap
 ansible
+maim
+xclip
+feh
 
+
 ungoogled-chromium
 firefox
 thunderbird