summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornavewindre <boneyaard@gmail.com>2025-07-12 00:24:41 +0200
committernavewindre <boneyaard@gmail.com>2025-07-12 00:24:41 +0200
commit0c69d29a0ca88c5614bd91cab8a9d96f04500fc1 (patch)
tree46eebc5ecb00ae5917717a1a60c4d9dc051cc1e9
parent5c82d4eb4d33fde8d8274a6f522d7daf2edf4e96 (diff)
a
-rwxr-xr-x.projector_off7
-rwxr-xr-x.projector_on29
-rwxr-xr-x.restart-panel3
-rw-r--r--config/openbox/rc-templ.xml15
-rwxr-xr-xconfig/openbox/spacefm3
5 files changed, 57 insertions, 0 deletions
diff --git a/.projector_off b/.projector_off
new file mode 100755
index 0000000..0fc54af
--- /dev/null
+++ b/.projector_off
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+killall spacefm
+screen -d -m "~/.config/openbox/spacefm"
+
+xrandr --output DP-2 --off
+
diff --git a/.projector_on b/.projector_on
new file mode 100755
index 0000000..ca153eb
--- /dev/null
+++ b/.projector_on
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+~/.config/openbox/autorun/1_screenres
+xrandr --output DP-2 --mode 1920x1080 --rate 60 --pos 3200x0
+
+if [ ! -d "$HOME/Pictures/Wall" ]; then
+ exit 1
+fi
+
+while IFS= read -r file; do
+ if [ -n "$files_string" ]; then
+ files_string+=" "
+ fi
+ files_string+="$file"
+done < <(find "$HOME/Pictures/Wall" -type f)
+
+IFS=' ' read -ra files <<< "$files_string"
+sorted_files=($(printf "%s\n" "${files[@]}" | sort))
+sorted_file_list=$(printf "%s " "${sorted_files[@]}")
+
+echo $sorted_file_list
+
+killall spacefm
+screen -d -m "~/.config/openbox/spacefm"
+
+
+sleep 1
+feh --bg-fill $sorted_file_list
+
diff --git a/.restart-panel b/.restart-panel
new file mode 100755
index 0000000..578bd82
--- /dev/null
+++ b/.restart-panel
@@ -0,0 +1,3 @@
+#!/bin/sh
+killall xfce4-panel
+xfce4-panel &
diff --git a/config/openbox/rc-templ.xml b/config/openbox/rc-templ.xml
index 68a1094..699b0f4 100644
--- a/config/openbox/rc-templ.xml
+++ b/config/openbox/rc-templ.xml
@@ -364,6 +364,21 @@
<command>xfce4-popup-whiskermenu</command>
</action>
</keybind>
+ <keybind key="W-F5">
+ <action name="Execute">
+ <command>sh ~/.restart-panel</command>
+ </action>
+ </keybind>
+ <keybind key="W-F6">
+ <action name="Execute">
+ <command>sh ~/.projector_on</command>
+ </action>
+ </keybind>
+ <keybind key="W-F7">
+ <action name="Execute">
+ <command>sh ~/.projector_off</command>
+ </action>
+ </keybind>
</keyboard>
<mouse>
<dragThreshold>10</dragThreshold>
diff --git a/config/openbox/spacefm b/config/openbox/spacefm
new file mode 100755
index 0000000..2a71d13
--- /dev/null
+++ b/config/openbox/spacefm
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+spacefm --desktop