aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorla-ninpre <leobrekalini@gmail.com>2020-12-10 00:35:37 +0300
committerla-ninpre <leobrekalini@gmail.com>2020-12-10 00:35:37 +0300
commitb38b774896b0ded5abb45bcd75e4443203b76d47 (patch)
tree379ea5b99cdc3783049b1d74e8689d2aad83d22d
parent107bde93c454ad1b67f04f926b6d052af6a9a7f0 (diff)
downloaddotfiles-b38b774896b0ded5abb45bcd75e4443203b76d47.tar.gz
dotfiles-b38b774896b0ded5abb45bcd75e4443203b76d47.zip
add small random string generator
and also change font in alacritty to jetbrains mono idk why, but just want to try it out
-rw-r--r--.config/alacritty/alacritty.yml10
-rwxr-xr-x.local/bin/rand18
2 files changed, 23 insertions, 5 deletions
diff --git a/.config/alacritty/alacritty.yml b/.config/alacritty/alacritty.yml
index 2d11eff..1ff54d3 100644
--- a/.config/alacritty/alacritty.yml
+++ b/.config/alacritty/alacritty.yml
@@ -108,7 +108,7 @@ font:
# - (macOS) Menlo
# - (Linux/BSD) monospace
# - (Windows) Consolas
- family: Fira Code
+ family: JetBrainsMono
# The `style` can be specified to pick a specific face.
style: Regular
@@ -119,7 +119,7 @@ font:
#
# If the bold family is not specified, it will fall back to the
# value specified for the normal font.
- family: Fira Code
+ family: JetBrainsMono
# The `style` can be specified to pick a specific face.
style: Bold
@@ -130,7 +130,7 @@ font:
#
# If the italic family is not specified, it will fall back to the
# value specified for the normal font.
- family: Fira Code
+ family: JetBrainsMono
# The `style` can be specified to pick a specific face.
style: Italic
@@ -141,13 +141,13 @@ font:
#
# If the bold italic family is not specified, it will fall back to the
# value specified for the normal font.
- family: Fira Code
+ family: JetBrainsMono
# The `style` can be specified to pick a specific face.
style: Bold Italic
# Point size
- #size: 11.0
+ size: 11.0
# Offset is the extra space around each character. `offset.y` can be thought of
# as modifying the line spacing, and `offset.x` as modifying the letter spacing.
diff --git a/.local/bin/rand b/.local/bin/rand
new file mode 100755
index 0000000..795885b
--- /dev/null
+++ b/.local/bin/rand
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+# rand (inspired by https://rgz.ee/random.html)
+#
+# generate random string from charset as first argument and length as second
+#
+# example:
+# $ rand '1-9a-f' 10
+# > 329402aa42
+#
+# defaults:
+# charset -- all printable characters and space
+# length -- 25
+
+[ -z $1 ] && charset=' -~' || charset=$1
+[ -z $2 ] && length=25 || length=$2
+
+tr -cd "$charset" < /dev/urandom | fold -w "$length" | head -n 1