From 4e7cf6c285f1e932a04e16cf144917333b78e579 Mon Sep 17 00:00:00 2001 From: InigoGutierrez Date: Sun, 17 May 2020 14:41:53 +0200 Subject: i3blocks: short mem text and fixed exit when cmus not running. --- i3blocks/i3mem.sh | 1 + i3blocks/i3music.sh | 2 +- mapGen/bigmap.dg | 55 +++++++++++++++++++++++++++++++++++++++++++ mapGen/chamber.xcf | Bin 0 -> 777 bytes mapGen/door.xcf | Bin 0 -> 804 bytes mapGen/floor.xcf | Bin 0 -> 723 bytes mapGen/grass.xcf | Bin 0 -> 801 bytes mapGen/greenBlueRedOut.jpg | Bin 0 -> 16272 bytes mapGen/map.dg | 5 ++++ mapGen/mapGen.sh | 38 ++++++++++++++++++++++++++++++ mapGen/mapOut.jpg | Bin 0 -> 263440 bytes mapGen/out.jpg | Bin 0 -> 15478 bytes mapGen/passage.xcf | Bin 0 -> 795 bytes mapGen/randomMap.dg | 26 ++++++++++++++++++++ mapGen/secretDoor.xcf | Bin 0 -> 801 bytes mapGen/tiles/Cchamber.jpg | Bin 0 -> 1278 bytes mapGen/tiles/Ddoor.jpg | Bin 0 -> 1282 bytes mapGen/tiles/Ggrass.jpg | Bin 0 -> 1275 bytes mapGen/tiles/Ppassage.jpg | Bin 0 -> 1286 bytes mapGen/tiles/SsecretDoor.jpg | Bin 0 -> 1280 bytes mapGen/tiles/Xwall.jpg | Bin 0 -> 1267 bytes mapGen/tiles/ofloor.jpg | Bin 0 -> 1263 bytes mapGen/wall.xcf | Bin 0 -> 768 bytes 23 files changed, 126 insertions(+), 1 deletion(-) create mode 100644 mapGen/bigmap.dg create mode 100644 mapGen/chamber.xcf create mode 100644 mapGen/door.xcf create mode 100644 mapGen/floor.xcf create mode 100644 mapGen/grass.xcf create mode 100644 mapGen/greenBlueRedOut.jpg create mode 100644 mapGen/map.dg create mode 100755 mapGen/mapGen.sh create mode 100644 mapGen/mapOut.jpg create mode 100644 mapGen/out.jpg create mode 100644 mapGen/passage.xcf create mode 100644 mapGen/randomMap.dg create mode 100644 mapGen/secretDoor.xcf create mode 100644 mapGen/tiles/Cchamber.jpg create mode 100644 mapGen/tiles/Ddoor.jpg create mode 100644 mapGen/tiles/Ggrass.jpg create mode 100644 mapGen/tiles/Ppassage.jpg create mode 100644 mapGen/tiles/SsecretDoor.jpg create mode 100644 mapGen/tiles/Xwall.jpg create mode 100644 mapGen/tiles/ofloor.jpg create mode 100644 mapGen/wall.xcf diff --git a/i3blocks/i3mem.sh b/i3blocks/i3mem.sh index 3e1447e..fc7b94d 100755 --- a/i3blocks/i3mem.sh +++ b/i3blocks/i3mem.sh @@ -6,3 +6,4 @@ $(ps axch -o cmd:18,%mem --sort=-%mem | sed 10q)" ;; esac free -h | awk '/^Mem/ {print $3 "/" $2}' +free -h | awk '/^Mem/ {print $3}' diff --git a/i3blocks/i3music.sh b/i3blocks/i3music.sh index bb646b9..d446b50 100755 --- a/i3blocks/i3music.sh +++ b/i3blocks/i3music.sh @@ -8,7 +8,7 @@ esac symbol=🎵 ampersand='and' # & in echo messes up script -pgrep -x cmus >/dev/null || (echo "" && exit 0) +pgrep -x cmus >/dev/null || exit 0 stat="$(cmus-remote -Q | grep "^status " | awk '{print $2}' | sed "s/&/$ampersand/")" artist="$(cmus-remote -Q | grep "^tag artist " | cut -d' ' -f3- | sed "s/&/$ampersand/")" title="$(cmus-remote -Q | grep "^tag title " | cut -d' ' -f3- | sed "s/&/$ampersand/")" diff --git a/mapGen/bigmap.dg b/mapGen/bigmap.dg new file mode 100644 index 0000000..26f5289 --- /dev/null +++ b/mapGen/bigmap.dg @@ -0,0 +1,55 @@ +xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx- +xGGxxxGGxxxGGxxxGGxxxGGxxxGGxxxGGxxxGGxxxGGxxxGGxxxGGxxxGGxxxGGxxxGGxxxGGxx +xxGGGxxGGGxxGGGxxGGGxxGGGxxGGGxxGGGxxGGGxxGGGxxGGGxxGGGx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GGx-xGGx-xGGx-xGGx-xGGx-xGGx-xGGx-xGGx-xGGx-xGGx-xGGx-xGGx-xGGx +-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx +xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx- +xGGxxxGGxxxGGxxxGGxxxGGxxxGGxxxGGxxxGGxxxGGxxxGGxxxGGxxxGGxxxGGxxxGGxxxGGxx +xxGGGxxGGGxxGGGxxGGGxxGGGxxGGGxxGGGxxGGGxxGGGxxGGGxxGGGxxGGGxxGGGxxGGGxxGGG +-xGGx-xGGx-xGGx-xGGx-xGGx-xGGx-xGGx-xGGx-xGGx-xGGx-xGGx-xGGx-xGGx-xGGx-xGGx +-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx +xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx- +xGGxxxGGxxxGGxxxGGxxxGGxxxGGxxxGGxxxGGxxxGGxxxGGxxxGGxxxGGxxxGGxxxGGxxxGGxx +xxGGGxxGGGxxGGGxxGGGxxGGGxxGGGxxGGGxxGGGxxGGGxxGGGxxGGGxxGGGxxGGGxxGGGxxGGG +-xGGx-xGGx-xGGx-xGGx-xGGx-xGGx-xGGx-xGGx-xGGx-xGGx-xGGx-xGGx-xGGx-xGGx-xGGx +-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx diff --git a/mapGen/chamber.xcf b/mapGen/chamber.xcf new file mode 100644 index 0000000..2198b9b Binary files /dev/null and b/mapGen/chamber.xcf differ diff --git a/mapGen/door.xcf b/mapGen/door.xcf new file mode 100644 index 0000000..fa1cc1a Binary files /dev/null and b/mapGen/door.xcf differ diff --git a/mapGen/floor.xcf b/mapGen/floor.xcf new file mode 100644 index 0000000..a83e4c2 Binary files /dev/null and b/mapGen/floor.xcf differ diff --git a/mapGen/grass.xcf b/mapGen/grass.xcf new file mode 100644 index 0000000..3b11c90 Binary files /dev/null and b/mapGen/grass.xcf differ diff --git a/mapGen/greenBlueRedOut.jpg b/mapGen/greenBlueRedOut.jpg new file mode 100644 index 0000000..7448cc8 Binary files /dev/null and b/mapGen/greenBlueRedOut.jpg differ diff --git a/mapGen/map.dg b/mapGen/map.dg new file mode 100644 index 0000000..7da4706 --- /dev/null +++ b/mapGen/map.dg @@ -0,0 +1,5 @@ +xxxxx +xGGxx +xxaaG +xxGax +xxxxx diff --git a/mapGen/mapGen.sh b/mapGen/mapGen.sh new file mode 100755 index 0000000..1be77f7 --- /dev/null +++ b/mapGen/mapGen.sh @@ -0,0 +1,38 @@ +#!/bin/sh + +# mapGen.sh +# +# Generate a map with ImageMagick from an input text file + +inputFile="$1" + +cellSize=8 + +tilesDir="./tiles" + +height="$(wc -l <"$inputFile")" +width="$(awk '{print length($0)}' "$inputFile" | sort -nr | sed 1q)" + +height=$((height*cellSize)) +width=$((width*cellSize)) + +echo $width $height + +convert -size "$width"x"$height" xc:cyan out.jpg + +row=0 +col=0 + +while read line; do + echo "$line" | ( + while read -n1 char; do + tileFile="$(find $tilesDir | sed 's|.*/||' | grep "^$char")" + tileFile="${tilesDir}/${tileFile}" + echo "$tileFile" | wc -l | grep 1 >/dev/null || continue + convert out.jpg "$tileFile" -geometry +"$col"+"$row" -composite out.jpg || + convert out.jpg -fill red -draw "point $col,$row" out.jpg + col=$((col+cellSize)) + done) + row=$((row+cellSize)) + col=0 +done <"$inputFile" diff --git a/mapGen/mapOut.jpg b/mapGen/mapOut.jpg new file mode 100644 index 0000000..7067c52 Binary files /dev/null and b/mapGen/mapOut.jpg differ diff --git a/mapGen/out.jpg b/mapGen/out.jpg new file mode 100644 index 0000000..d4a3964 Binary files /dev/null and b/mapGen/out.jpg differ diff --git a/mapGen/passage.xcf b/mapGen/passage.xcf new file mode 100644 index 0000000..926783a Binary files /dev/null and b/mapGen/passage.xcf differ diff --git a/mapGen/randomMap.dg b/mapGen/randomMap.dg new file mode 100644 index 0000000..2ead560 --- /dev/null +++ b/mapGen/randomMap.dg @@ -0,0 +1,26 @@ +XXXXXXXXXXXXXXXXXXXX +XXXXXXooooooooXXXXXX +XXXXXXoooooooooXXXXX +XXXXXXooooooooooooXX +XXXXCDooooooooooooDX +XXXXXXooooooooooooXX +XXXXXXooooooooooooXX +XXXXXXoooooooooXXXXX +XXXXXXooooooooXXXXXX +XXXXXXXXXSXXXXXXXXXX +XXXXXXXXooooXXXXXXXX +XXXXXXXooooooXXXXXXX +XXXXXXooooooooXXXXXX +XooooXoooCooooXooooX +XoCooXooooooooXooooX +XooooXooooooooXooooX +XooooXXooooooXXooooX +XooooXXXooooXXXooooX +XooooXXXXooXXXXooooX +XXXoXXXXXooXXXXXooXX +XXXoXXXXooooXXXXooXX +XXXoooooooooooooooXX +XXXXXXooooooooooooXX +XXXXXXXXooooXXXXXXXX +XXXXXXXXXooXXXXXXXXX +XXXXXXXXXooXXXXXXXXX diff --git a/mapGen/secretDoor.xcf b/mapGen/secretDoor.xcf new file mode 100644 index 0000000..6963426 Binary files /dev/null and b/mapGen/secretDoor.xcf differ diff --git a/mapGen/tiles/Cchamber.jpg b/mapGen/tiles/Cchamber.jpg new file mode 100644 index 0000000..a325761 Binary files /dev/null and b/mapGen/tiles/Cchamber.jpg differ diff --git a/mapGen/tiles/Ddoor.jpg b/mapGen/tiles/Ddoor.jpg new file mode 100644 index 0000000..167a16d Binary files /dev/null and b/mapGen/tiles/Ddoor.jpg differ diff --git a/mapGen/tiles/Ggrass.jpg b/mapGen/tiles/Ggrass.jpg new file mode 100644 index 0000000..a3f79e6 Binary files /dev/null and b/mapGen/tiles/Ggrass.jpg differ diff --git a/mapGen/tiles/Ppassage.jpg b/mapGen/tiles/Ppassage.jpg new file mode 100644 index 0000000..d21a0e9 Binary files /dev/null and b/mapGen/tiles/Ppassage.jpg differ diff --git a/mapGen/tiles/SsecretDoor.jpg b/mapGen/tiles/SsecretDoor.jpg new file mode 100644 index 0000000..ee974fa Binary files /dev/null and b/mapGen/tiles/SsecretDoor.jpg differ diff --git a/mapGen/tiles/Xwall.jpg b/mapGen/tiles/Xwall.jpg new file mode 100644 index 0000000..7d70085 Binary files /dev/null and b/mapGen/tiles/Xwall.jpg differ diff --git a/mapGen/tiles/ofloor.jpg b/mapGen/tiles/ofloor.jpg new file mode 100644 index 0000000..d79d794 Binary files /dev/null and b/mapGen/tiles/ofloor.jpg differ diff --git a/mapGen/wall.xcf b/mapGen/wall.xcf new file mode 100644 index 0000000..e1cc359 Binary files /dev/null and b/mapGen/wall.xcf differ -- cgit v1.2.1