diff --git a/.Xdefaults b/.Xdefaults new file mode 100644 index 0000000..b1aee67 --- /dev/null +++ b/.Xdefaults @@ -0,0 +1,116 @@ +!! Transparency (0-255): +st.alpha: 240 + +!! Set a default font and font size as below: +st.font: Monospace-11; + +/* !! gruvbox: */ +/* *.color0: #1d2021 */ +/* *.color1: #cc241d */ +/* *.color2: #98971a */ +/* *.color3: #d79921 */ +/* *.color4: #458588 */ +/* *.color5: #b16286 */ +/* *.color6: #689d6a */ +/* *.color7: #a89984 */ +/* *.color8: #928374 */ +/* *.color9: #fb4934 */ +/* *.color10: #b8bb26 */ +/* *.color11: #fabd2f */ +/* *.color12: #83a598 */ +/* *.color13: #d3869b */ +/* *.color14: #8ec07c */ +/* *.color15: #ebdbb2 */ + +/* !! gruvbox light: */ +/* *.color0: #fbf1c7 */ +/* *.color1: #cc241d */ +/* *.color2: #98971a */ +/* *.color3: #d79921 */ +/* *.color4: #458588 */ +/* *.color5: #b16286 */ +/* *.color6: #689d6a */ +/* *.color7: #7c6f64 */ +/* *.color8: #928374 */ +/* *.color9: #9d0006 */ +/* *.color10: #79740e */ +/* *.color11: #b57614 */ +/* *.color12: #076678 */ +/* *.color13: #8f3f71 */ +/* *.color14: #427b58 */ +/* *.color15: #3c3836 */ + +/* !! brogrammer: */ +/* *.foreground: #d6dbe5 */ +/* *.background: #131313 */ +/* *.color0: #1f1f1f */ +/* *.color8: #d6dbe5 */ +/* *.color1: #f81118 */ +/* *.color9: #de352e */ +/* *.color2: #2dc55e */ +/* *.color10: #1dd361 */ +/* *.color3: #ecba0f */ +/* *.color11: #f3bd09 */ +/* *.color4: #2a84d2 */ +/* *.color12: #1081d6 */ +/* *.color5: #4e5ab7 */ +/* *.color13: #5350b9 */ +/* *.color6: #1081d6 */ +/* *.color14: #0f7ddb */ +/* *.color7: #d6dbe5 */ +/* *.color15: #ffffff */ +/* *.colorBD: #d6dbe5 */ + +/* ! base16 */ +/* *.color0: #181818 */ +/* *.color1: #ab4642 */ +/* *.color2: #a1b56c */ +/* *.color3: #f7ca88 */ +/* *.color4: #7cafc2 */ +/* *.color5: #ba8baf */ +/* *.color6: #86c1b9 */ +/* *.color7: #d8d8d8 */ +/* *.color8: #585858 */ +/* *.color9: #ab4642 */ +/* *.color10: #a1b56c */ +/* *.color11: #f7ca88 */ +/* *.color12: #7cafc2 */ +/* *.color13: #ba8baf */ +/* *.color14: #86c1b9 */ +/* *.color15: #f8f8f8 */ + +/* !! solarized */ +/* *.color0: #073642 */ +/* *.color1: #dc322f */ +/* *.color2: #859900 */ +/* *.color3: #b58900 */ +/* *.color4: #268bd2 */ +/* *.color5: #d33682 */ +/* *.color6: #2aa198 */ +/* *.color7: #eee8d5 */ +/* *.color9: #cb4b16 */ +/* *.color8: #fdf6e3 */ +/* *.color10: #586e75 */ +/* *.color11: #657b83 */ +/* *.color12: #839496 */ +/* *.color13: #6c71c4 */ +/* *.color14: #93a1a1 */ +/* *.color15: #fdf6e3 */ + +/* !! xterm */ +/* *.color0: #000000 */ +/* *.color1: #cd0000 */ +/* *.color2: #00cd00 */ +/* *.color3: #cdcd00 */ +/* *.color4: #0000cd */ +/* *.color5: #cd00cd */ +/* *.color6: #00cdcd */ +/* *.color7: #e5e5e5 */ +/* *.color8: #4d4d4d */ +/* *.color9: #ff0000 */ +/* *.color10: #00ff00 */ +/* *.color11: #ffff00 */ +/* *.color12: #0000ff */ +/* *.color13: #ff00ff */ +/* *.color14: #00ffff */ +/* *.color15: #aabac8 */ diff --git a/.gitignore b/.gitignore index aa41e95..18c21b0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ st st.o x.o +pkg/ +*.pkg.tar.xz diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..959a2e9 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,43 @@ +# Maintainer: + +pkgname=st-luke-git +_pkgname=st +_pkgver=0.8.1 +pkgver=0.8.1.r1046.1cd0b79 +pkgrel=1 +pkgdesc="Luke's simple (suckless) terminal with vim-bindings, transparency, xresources, etc. " +url='https://github.com/LukeSmithxyz/st' +arch=('i686' 'x86_64') +license=('MIT') +options=('zipman') +depends=('libxft') +makedepends=('ncurses' 'libxext' 'git') +optdepends=('dmenu: feed urls to dmenu') +source=('git://github.com/LukeSmithxyz/st') +sha1sums=('SKIP') + +provides=("${_pkgname}") +conflicts=("${_pkgname}") + +pkgver() { + cd "${_pkgname}" + printf "${_pkgver}.r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + cd $srcdir/${_pkgname} + # skip terminfo which conflicts with nsurses + sed -i '/tic /d' Makefile +} + +build() { + cd "${_pkgname}" + make X11INC=/usr/include/X11 X11LIB=/usr/lib/X11 +} + +package() { + cd "${_pkgname}" + make PREFIX=/usr DESTDIR="${pkgdir}" install + install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + install -Dm644 README.md "${pkgdir}/usr/share/doc/${pkgname}/README.md" +} diff --git a/README.md b/README.md index 0cd9318..5afdbb1 100644 --- a/README.md +++ b/README.md @@ -2,14 +2,14 @@ The [suckless terminal (st)](https://st.suckless.org/) with some additional features: -+ Compatibility with `Xresources` and `pywal` for dynamic colors. ++ Compatibility with `Xresources` and `pywal` for dynamic colors. The `Xdefaults` file shows a usage example. + Default [gruvbox](https://github.com/morhetz/gruvbox) colors otherwise. + Transparency/alpha, which is also adjustable from `~/.Xresources`. + Default font is system "mono" at 16pt, meaning the font will match your system font. + Very useful keybinds including: + Copy is alt-c, paste is alt-v or alt-p pastes from primary selection + Alt-l feeds all urls on screen to dmenu, so they user can choose and - follow one (requires xurls and dmenu installed). + follow one (requires dmenu installed). + Zoom in/out or increase font size with Alt+Shift+k/j or u/d for larger intervals. + Hold alt and press either ↑/↓ or the vim keys k/j to move up/down in the terminal. + Shift+Mouse wheel do the same. diff --git a/config.h b/config.h index 6e2f2ac..b622536 100644 --- a/config.h +++ b/config.h @@ -207,7 +207,7 @@ MouseKey mkeys[] = { }; static char *openurlcmd[] = { "/bin/sh", "-c", - "xurls | uniq | dmenu -l 10 | xargs -r xdg-open", + "grep -aEo '(http|https)://[a-zA-Z0-9./?=_-]*' | uniq | dmenu -l 10 | xargs -r xdg-open", "externalpipe", NULL }; static Shortcut shortcuts[] = { diff --git a/st.1 b/st.1 index efa32ee..8cf4265 100644 --- a/st.1 +++ b/st.1 @@ -148,8 +148,6 @@ Paste/input primary selection. .TP .B Alt-l Show dmenu menu of all URLs on screen and choose one to open. -.I Note: -Requires xurls installed. .TP .B Break Send a break in the serial line.