st

My build of suckless' st.
Log | Files | Refs | README | LICENSE

commit 6115a8ba172b81b74dedacee33c8319c1edf15d4
parent fd462708313c46f86024dee2857ede31e6cbb894
Author: Benjamin Chausse <benjamin@chausse.xyz>
Date:   Sat,  4 Jan 2020 22:08:48 -0500

my fonts, my colors, rofi

Diffstat:
MREADME.md | 2+-
Mconfig.h | 11++++++-----
Mst-copyout | 2+-
3 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/README.md b/README.md @@ -2,7 +2,7 @@ The [suckless terminal (st)](https://st.suckless.org/) with some additional features that make it literally the best terminal emulator ever: -## Unique features (using dmenu) +## Unique features (using rofi) + **follow urls** by pressing `alt-l` + **copy urls** in the same way with `alt-y` diff --git a/config.h b/config.h @@ -5,8 +5,9 @@ * * font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html */ -static char *font = "mono:pixelsize=16:antialias=true:autohint=true"; -static char *font2[] = { "Inconsolata for Powerline:pixelsize=16:antialias=true:autohint=true" }; +static char *font = "Hack Nerd Font Mono:pixelsize=18:antialias=true:autohint=true"; +/* static char *font = "Apercu Mono Nerd Font Complete:pixelsize=16:antialias=true:autohint=true"; */ +static char *font2[] = { "Inconsolata for Powerline:pixelsize=15:antialias=true:autohint=true" }; static int borderpx = 2; /* @@ -84,7 +85,7 @@ char *termname = "st-256color"; unsigned int tabspaces = 8; /* bg opacity */ -float alpha = 0.92; +float alpha = 0.72; /* Terminal colors (16 first used in escape sequence) */ static const char *colorname[] = { @@ -213,11 +214,11 @@ MouseKey mkeys[] = { }; static char *openurlcmd[] = { "/bin/sh", "-c", - "sed 's/.*│//g' | tr -d '\n' | grep -aEo '(((http|https)://|www\\.)[a-zA-Z0-9.]*[:]?[a-zA-Z0-9./&%?#=_-]*)|((magnet:\\?xt=urn:btih:)[a-zA-Z0-9]*)'| uniq | sed 's/^www./http:\\/\\/www\\./g' | dmenu -i -p 'Follow which url?' -l 10 | xargs -r xdg-open", + "sed 's/.*│//g' | tr -d '\n' | grep -aEo '(((http|https)://|www\\.)[a-zA-Z0-9.]*[:]?[a-zA-Z0-9./&%?#=_-]*)|((magnet:\\?xt=urn:btih:)[a-zA-Z0-9]*)'| uniq | sed 's/^www./http:\\/\\/www\\./g' | rofi -dmenu -i -p 'Follow which url?' -l 10 | xargs -r xdg-open", "externalpipe", NULL }; static char *copyurlcmd[] = { "/bin/sh", "-c", - "sed 's/.*│//g' | tr -d '\n' | grep -aEo '(((http|https)://|www\\.)[a-zA-Z0-9.]*[:]?[a-zA-Z0-9./&%?#=_-]*)|((magnet:\\?xt=urn:btih:)[a-zA-Z0-9]*)' | uniq | sed 's/^www./http:\\/\\/www\\./g' | dmenu -i -p 'Copy which url?' -l 10 | tr -d '\n' | xclip -selection clipboard", + "sed 's/.*│//g' | tr -d '\n' | grep -aEo '(((http|https)://|www\\.)[a-zA-Z0-9.]*[:]?[a-zA-Z0-9./&%?#=_-]*)|((magnet:\\?xt=urn:btih:)[a-zA-Z0-9]*)' | uniq | sed 's/^www./http:\\/\\/www\\./g' | rofi -dmenu -i -p 'Copy which url?' -l 10 | tr -d '\n' | xclip -selection clipboard", "externalpipe", NULL }; static char *copyoutput[] = { "/bin/sh", "-c", "st-copyout", "externalpipe", NULL }; diff --git a/st-copyout b/st-copyout @@ -7,6 +7,6 @@ tmpfile=$(mktemp /tmp/st-cmd-output.XXXXXX) trap 'rm "$tmpfile"' 0 1 15 sed -n "w $tmpfile" ps1="$(grep "\S" "$tmpfile" | tail -n 1 | sed 's/^\s*//' | cut -d' ' -f1)" -chosen="$(grep -F "$ps1" "$tmpfile" | sed '$ d' | tac | dmenu -p "Copy which command's output?" -i -l 10 | sed 's/[^^]/[&]/g; s/\^/\\^/g')" +chosen="$(grep -F "$ps1" "$tmpfile" | sed '$ d' | tac | rofi -dmenu -p "Copy which command's output?" -i -l 10 | sed 's/[^^]/[&]/g; s/\^/\\^/g')" eps1="$(echo "$ps1" | sed 's/[^^]/[&]/g; s/\^/\\^/g')" awk "/^$chosen$/{p=1;print;next} p&&/$eps1/{p=0};p" "$tmpfile" | xclip -selection clipboard