commit 564864193b9d3f835d584a16d5188fcf4b77da2c
parent fedc670cb08b6934817e67025e99c8befdc4fcc9
Author: finwo <finwo@pm.me>
Date: Mon, 25 Nov 2019 15:38:35 +0100
Added hack font to dwm
Diffstat:
3 files changed, 23 insertions(+), 244 deletions(-)
diff --git a/dwm/home/.xinitrc b/dwm/home/.xinitrc
@@ -11,13 +11,6 @@ if command -v xbanish &>/dev/null; then
xbanish &
fi
-# Make repeating keys faster
-if command -v xset &>/dev/null; then
- while sleep 60; do
- xset r rate 200 40
- done &
-fi
-
# Custom key bindings
if command -v xbindkeys &>/dev/null; then
xbindkeys
@@ -42,6 +35,11 @@ while sleep 10; do
esac
fi
+ # Make repeating keys faster
+ if command -v xset &>/dev/null; then
+ xset r rate 200 40
+ fi
+
xsetroot -name "${XROOT}"
done &
# TODO: discharching charmap
diff --git a/dwm/root/etc/portage/patches/x11-wm/dwm/00-font.diff b/dwm/root/etc/portage/patches/x11-wm/dwm/00-font.diff
@@ -0,0 +1,18 @@
+diff --git a/config.def.h b/config.def.h
+index 1c0b587..c1da87d 100644
+--- a/config.def.h
++++ b/config.def.h
+@@ -5,8 +5,11 @@ static const unsigned int borderpx = 1; /* border pixel of windows */
+ static const unsigned int snap = 32; /* snap pixel */
+ static const int showbar = 1; /* 0 means no bar */
+ static const int topbar = 1; /* 0 means bottom bar */
+-static const char *fonts[] = { "monospace:size=10" };
+-static const char dmenufont[] = "monospace:size=10";
++static const char *fonts[] = {
++ "Hack Nerd Font Mono:pixelsize=12:antialias=true:autohint=true",
++ "monospace:size=10"
++};
++static const char dmenufont[] = "Hack Nerd Font Mono:pixelsize=12:antialias=true:autohint=true";
+ static const char col_gray1[] = "#222222";
+ static const char col_gray2[] = "#444444";
+ static const char col_gray3[] = "#bbbbbb";
diff --git a/php/root/usr/bin/phpvm b/php/root/usr/bin/phpvm
@@ -1,237 +0,0 @@
-#!/usr/bin/env bash
-
-# Ensure we're running as root
-if [[ $EUID -ne 0 ]]; then
- echo "This script must be run as root"
- exit 1
-fi
-
-ncpu() {
- if command -v nproc &>/dev/null; then
- nproc
- else
- echo 1
- fi
-}
-
-# https://gist.github.com/lukechilds/a83e1d7127b78fef38c2914c4ececc3c
-version() {
- curl --silent "https://api.github.com/repos/$1/releases/latest" | # Get latest release from GitHub api
- grep '"tag_name":' | # Get tag line
- sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value
-}
-
-
-export MAKEOPTS="-j$(($(ncpu)+1))"
-export CONFOPTS=
-export CFLAGS=
-
-# Gentoo stuff
-if [ -f /etc/portage/make.conf ]; then
- source /etc/portage/make.conf
-fi
-
-if [ -f /etc/phpvmrc ]; then
- source /etc/phpvmrc
-fi
-
-# Build-in extensions
-BUILDINS=()
-BUILDINS+=("fpm" "calendar" "dba" "exif" "mbstring" "ftp" "pcntl" "soap")
-BUILDINS+=("sockets" "sysvmsg" "sysvsem" "sysvshm" "wddx" "zip" "bcmath")
-
-# Supports
-SUPPORTS=()
-SUPPORTS+=("gnu-ld" "mysqli" "pdo-mysql" "curl" "mhash" "pdo-pgsql" "pgsql")
-SUPPORTS+=("openssl" "zlib")
-
-# Ensure required dirs exist
-mkdir -p /usr/src/phpvm
-mkdir -p /var/cache/phpvm
-
-# Track some variables
-cmd=list
-target="7.2.7"
-
-# Parse args
-while [[ "$#" -gt 0 ]]; do
- case "$1" in
- list|version|help)
- cmd="$1"
- ;;
- use)
- shift
- target="$1"
- cmd="use"
- ;;
- --help)
- cmd="help"
- ;;
- esac
- shift
-done
-
-# Decode minor & major versions
-minor=$(echo "${target}" | tr '.' ' ' | awk '{print $2}')
-major=$(echo "${target}" | tr '.' ' ' | awk '{print $1}')
-
-if [ $major -eq 7 ] && [ $minor -ge 1 ]; then
- BUILDINS+=("intl")
-elif [ $major -gt 7 ]; then
- BUILDINS+=("intl")
-fi
-
-# Build configure options
-for BUILDIN in ${BUILDINS[@]}; do
- CONFOPTS="${CONFOPTS} --enable-${BUILDIN}"
-done
-for SUPPORT in ${SUPPORTS[@]}; do
- CONFOPTS="${CONFOPTS} --with-${SUPPORT}"
-done
-
-
-# Run command
-case "$cmd" in
- list)
- ls /usr/src/phpvm/ | grep "php-"
- ;;
- use)
- rm -rf /usr/local/bin/pear*
- rm -rf /usr/local/bin/pecl*
- rm -rf /usr/local/bin/phar*
- rm -rf /usr/local/bin/php*
- rm -rf /usr/local/etc/pear*
- rm -rf /usr/local/etc/php*
- rm -rf /usr/local/include/php*
- rm -rf /usr/local/lib/php*
- rm -rf /usr/local/php*
- rm -rf /usr/local/sbin/php*
-
- # Download tarball if missing
- tarball="/var/cache/phpvm/php-${target}.tar.gz"
- [ -f "${tarball}" ] || {
- curl -L "http://php.net/get/php-${target}.tar.gz/from/this/mirror" > "${tarball}" || {
- rm -rf "${tarball}"
- break
- }
- }
-
- # Build if not done yet
- [ -d "/usr/src/phpvm/php-${target}" ] || {
- tar xzf "${tarball}" -C "/usr/src/phpvm"
- cd "/usr/src/phpvm/php-${target}"
-
- ./configure ${CONFOPTS} \
- && make ${MAKEOPTS} || {
- cd /usr/src/phpvm
- rm -rf "/usr/src/phpvm/php-${target}"
- exit 1
- }
- }
-
- # Install chosen version
- cd "/usr/src/phpvm/php-${target}"
- make install || exit 1
-
- # Download/update memcached repo
- [ -d "/usr/src/phpvm/ext-memcached" ] && {
- cd /usr/src/phpvm/ext-memcached
- git fetch --all --tags || exit 1
- } || {
- git clone https://github.com/php-memcached-dev/php-memcached /usr/src/phpvm/ext-memcached || exit 1
- cd /usr/src/phpvm/ext-memcached
- git fetch --all --tags || exit 1
- }
-
- # Go to the ext-memcached source
- cd /usr/src/phpvm/ext-memcached
- git pull
-
- # Compile & install ext-memcached
- printf "\n" | phpize || exit 1
- printf "\n" | ./configure --disable-memcached-sasl || exit 1
- make $MAKEOPTS || exit 1
- make install || exit 1
- echo "extension=memcached.so" >> /usr/local/lib/php.ini
-
- # Download/update mongodb repo
- [ -d "/usr/src/phpvm/ext-mongodb" ] && {
- cd /usr/src/phpvm/ext-mongodb
- git fetch --all --tags || exit 1
- } || {
- git clone https://github.com/mongodb/mongo-php-driver /usr/src/phpvm/ext-mongodb || exit 1
- cd /usr/src/phpvm/ext-mongodb
- git fetch --all --tags || exit 1
- }
-
- # Go to the ext-mongodb source
- cd /usr/src/phpvm/ext-mongodb
- git submodule update --init --recursive --force
- git pull
-
- # Compile & install ext-mongodb
- printf "\n" | phpize || exit 1
- printf "\n" | ./configure || exit 1
- make $MAKEOPTS || exit 1
- make install || exit 1
- echo "extension=mongodb.so" >> /usr/local/lib/php.ini
-
- # Download/update mongodb repo
- [ -d "/usr/src/phpvm/ext-psr" ] && {
- cd /usr/src/phpvm/ext-psr
- git fetch --all --tags || exit 1
- } || {
- git clone https://github.com/jbboehr/php-psr /usr/src/phpvm/ext-psr || exit 1
- cd /usr/src/phpvm/ext-psr
- git fetch --all --tags || exit 1
- }
-
- # Go to the ext-psr source
- cd /usr/src/phpvm/ext-psr
- git pull
-
- # Compile & install ext-pr
- printf "\n" | phpize || exit 1
- printf "\n" | ./configure || exit 1
- make $MAKEOPTS || exit 1
- make install || exit 1
- echo "extension=psr.so" >> /usr/local/lib/php.ini
-
- # Download/update phalcon repo
- [ -d "/usr/src/phpvm/ext-phalcon" ] && {
- cd /usr/src/phpvm/ext-phalcon
- git fetch --all --tags || exit 1
- } || {
- git clone https://github.com/phalcon/cphalcon /usr/src/phpvm/ext-phalcon || exit 1
- cd /usr/src/phpvm/ext-phalcon
- git fetch --all --tags || exit 1
- }
-
- # Build and install phalcon
- cd "/usr/src/phpvm/ext-phalcon/build/php${major}/64bits"
- git checkout $(version phalcon/cphalcon)
- git pull
- phpize
- ./configure --enable-phalcon
- make clean
- make ${MAKEOPTS}
- make install
- echo "extension=phalcon.so" >> /usr/local/lib/php.ini
-
- ;;
- help)
- name=$(basename ${0})
- echo "Usage:"
- echo " ${name} list"
- echo " ${name} version"
- echo " ${name} use <version>"
- echo " ${name} help"
- echo ""
- echo "Commands:"
- echo " list show the list of installed php versions"
- echo " version show the version of the currently in-use php"
- echo " use switch to a (different) php version"
- echo " help show this usage"
- ;;
-esac
-