summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-x6cord.sh2
-rwxr-xr-xdocked.sh3
-rwxr-xr-xi3blocks-net.sh2
-rwxr-xr-xthemer.sh34
-rwxr-xr-xtoggle-docked.sh44
-rwxr-xr-xundocked.sh3
6 files changed, 66 insertions, 22 deletions
diff --git a/6cord.sh b/6cord.sh
new file mode 100755
index 0000000..49fbb24
--- /dev/null
+++ b/6cord.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+6cord -t "$(cat ~/.config/6cord/token)"
diff --git a/docked.sh b/docked.sh
deleted file mode 100755
index 22393d2..0000000
--- a/docked.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-xrandr
-xrandr --output VGA-0 --mode 1024x768 --pos 1920x312 --rotate normal --dpi 82 --output DP-0 --off --output DP-1 --off --output DP-2 --off --output DP-3 --primary --mode 1920x1080 --pos 0x0 --rotate normal --dpi 96 --output DP-4 --off
diff --git a/i3blocks-net.sh b/i3blocks-net.sh
index 8690cb9..cd0f6c4 100755
--- a/i3blocks-net.sh
+++ b/i3blocks-net.sh
@@ -1,5 +1,5 @@
#!/bin/sh
-icon_ethernet=󰈁
+icon_ethernet=󰈀
icon_wireless=󰖩
is_ethernet=$(ifconfig em0 | grep status | cut -d':' -f2)
diff --git a/themer.sh b/themer.sh
index c8b01a0..b36c444 100755
--- a/themer.sh
+++ b/themer.sh
@@ -1,26 +1,30 @@
#!/bin/sh
add_theme() {
- INDIR="$1"
- [ -z "$INDIR" ] && INDIR=$HOME/pictures/wallpapers
- OUTDIR=$HOME/.local/share/wallpapers
- [ ! -d "$INDIR" ] && exit 1
- [ ! -d "$OUTDIR" ] && mkdir -p "$OUTDIR"
- for INFILE in $(sxiv -rot "$INDIR"); do
- OUTFILE="$OUTDIR"/$(basename "$INFILE")
- convert -verbose "$INFILE" -geometry 1920x1080^ -gravity center -crop 1920x1080+0+0 "$OUTFILE"
- wpg -a "$OUTFILE"
+ indir="$1"
+ [ -z "$indir" ] && indir=$HOME/downloads
+ outdir=$HOME/.local/share/wallpapers
+ [ ! -d "$indir" ] && exit 1
+ [ ! -d "$outdir" ] && mkdir -p "$outdir"
+ sxiv -rot "$indir" | while read infile; do
+ outfile="$outdir"/$(basename "$infile")
+ convert "$infile" -geometry '1920x1080^' -gravity center -crop 1920x1080+0+0 "$outfile"
+ wpg -a "$outfile"
done
- wait
}
set_theme() {
- THEME=$(sxiv -rot $HOME/.config/wpg/wallpapers)
- [ -z "$THEME" ] && exit 4
- wpg -s "$THEME" &
- convert -verbose -background black -vignette 100x65000 "$THEME" $HOME/.local/share/wallpapers/lock.png &
+ theme=$(sxiv -rot $HOME/.config/wpg/wallpapers)
+ [ -z "$theme" ] && exit 4
+ wpg -s "$theme" &
+ convert -verbose -background black -vignette 100x65000 "$theme" $HOME/.local/share/wallpapers/lock.png &
}
+reapply_theme() {
+ wpg -s "$(wpg -c)"
+}
+
+[ "$1" = "-r" ] && reapply_theme && exit
[ "$1" = "-a" ] && add_theme "$2"
-set_theme
+[ "$1" = "-s" ] && set_theme
wait
diff --git a/toggle-docked.sh b/toggle-docked.sh
new file mode 100755
index 0000000..4e2cb89
--- /dev/null
+++ b/toggle-docked.sh
@@ -0,0 +1,44 @@
+#!/bin/sh
+hasVGA=$(xrandr | grep VGA-0 | cut -w -f2)
+
+if [ "$hasVGA" = "connected" ]; then
+ xrandr \
+ --output VGA-0 \
+ --mode 1024x768 \
+ --pos 1920x312 \
+ --rotate normal \
+ --dpi 82 \
+ --output DP-0 \
+ --off \
+ --output DP-1 \
+ --off \
+ --output DP-2 \
+ --off \
+ --output DP-3 \
+ --primary \
+ --mode 1920x1080 \
+ --pos 0x0 \
+ --rotate normal \
+ --dpi 96 \
+ --output DP-4 \
+ --off
+else
+ xrandr \
+ --output VGA-0 \
+ --off \
+ --output DP-0 \
+ --off \
+ --output DP-1 \
+ --off \
+ --output DP-2 \
+ --off \
+ --output DP-3 \
+ --primary \
+ --mode 1920x1080 \
+ --pos 0x0 \
+ --rotate normal \
+ --dpi 96 \
+ --output DP-4 \
+ --off
+fi
+
diff --git a/undocked.sh b/undocked.sh
deleted file mode 100755
index b0f24c9..0000000
--- a/undocked.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-xrandr
-xrandr --output VGA-0 --off --output DP-0 --off --output DP-1 --off --output DP-2 --off --output DP-3 --primary --mode 1920x1080 --pos 0x0 --rotate normal --dpi 96 --output DP-4 --off