TerminalStocks

Install notes for TerminalStocks, a console stock ticker app.

2018-10-12-100449_892x473_scrot.png
2018-10-12-100449_892x473_scrot.png

Install go:

sudo dnf install golang
mkdir -p ~/golang
sudo mkdir -p /etc/profile.d
sudo touch /etc/profile.d/goenv.sh

Edit /etc/profile.d/goenv.sh and add:

export GOROOT=/usr/lib/golang
export GOPATH=$HOME/golang
PATH=$PATH:$GOROOT/bin:$GOPATH/bin

Wrap up go installation and get TerminalStocks:

source /etc/profile.d/goenv.sh
go get github.com/brandleesee/TerminalStocks
cd ~/golang/src/github.com/brandleesee/TerminalStocks/
make install
TerminalStocks

 

Fedora 28 Post Install, Part 3

Upgrade to a 256 color terminal (use urxvt256c instead of urxvt):

sudo dnf install rxvt-unicode-256color

Test color output via 256color2.pl:

cd ~/
wget http://scie.nti.st/dist/256colors2.pl

Before:

2018-10-12-112156_490x329_scrot.png
2018-10-12-112156_490x329_scrot.png

After:

2018-10-12-112239_490x329_scrot.png
2018-10-12-112239_490x329_scrot.png

Fire up ncmpcpp and look at the available colors at the bottom of the help [F1] page:

8 color (xterm):

2018-10-12-115121_484x347_scrot.png
2018-10-12-115121_484x347_scrot.png

88 color (urxvt):

2018-10-12-115132_484x341_scrot.png
2018-10-12-115132_484x341_scrot.png

256 color (urxvt256c):

2018-10-12-115143_484x341_scrot.png
2018-10-12-115143_484x341_scrot.png

Add scrot:

sudo dnf install scrot

Popular file managers:

sudo dnf install mc pcmanfm ranger

Enable preview images in ranger:

echo "set preview_images true" >> ~/.config/ranger/rc.conf

Add imgcurses:

sudo dnf install libjpeg-turbo-devel
cd ~/Downloads/
git clone https://github.com/orangeduck/imgcurses
cd imgcurses/
make
sudo make install

A suite of system & network monitoring utilities:

sudo dnf install bmon goaccess iftop iptraf-ng htop mtr nethogs xosview

Upgrade glances:

sudo dnf install redhat-rpm-config-109-1.fc28.noarch
sudo dnf install python-devel
sudo pip install --upgrade glances

 

Fedora 28 Post Install, Part 2

Grab polybar if inclined. First some prerequisites:

sudo dnf install cairo cairo-devel clang cmake git python2
sudo dnf install xcb-proto xcb-util-devel xcb-util-wm-devel xcb-util-image-devel
cd ~/Downloads/
git clone https://github.com/stark/siji
cd siji/
./install.sh
echo "xset +fp ~/.fonts" >> ~/.xsession
echo "xset fp rehash" >> ~/.xsession

Now the rest:

sudo dnf install xcb-util-image xcb-util-wm libxcb jsoncpp
cd ~/Downloads/
git clone --branch 3.2 --recursive https://github.com/jaagr/polybar
mkdir polybar/build
cd polybar/build/
cmake ..
sudo make install
make userconfig
polybar example

Neofetch:

sudo dnf install neofetch w3m w3m-img

Use the ‘name’ switch to give a urxvt instance a unique Window Specification in wmaker, that way we can customize Attributes without touching other urxvt instances. We can dock it to the Workspace paperclip so it loads at login, then disable the titlebar, resizebar, and hide the application icon. If necessary, get back into the Attributes panel with Left-Ctrl+Esc once the bars are all off.

It can be helpful to add to GNUstep/Defaults/WMRootMenu via WPrefs.

We’re going to open this window at the top left and populate with neofetch output, so we’ll use that for urxvt’s name attribute:

/usr/bin/urxvt -sl 16384 +sb -bg black -fg white -bc -uc -tr -sh 35 -g 80x22+6+6 -b 2 -fn xft:Terminus:pixelsize=10 -name neofetch -title neofetch -e $SHELL -c '/usr/bin/neofetch --ascii_colors 6 7 6 6 6 6 --colors 6 7 7 6 7 7;$SHELL -i'

Get music stack up and running:

sudo dnf install qmmp ffmpeg mpd mpc
sudo gpasswd -a mpd $USER
sudo gpasswd -a mpd audio
chmod 710 ~/
sudo setsebool -P mpd_enable_homedirs true
ls -Z /var/lib/mpd/
mkdir -p ~/.mpd/playlists/
cd ~/.mpd/
touch mpd.conf mpd.db mpd.log mpd.pid mpdstate

Populate mpd.conf:

bind_to_address "127.0.0.1"
port "6600"
music_directory "~/Music"
playlist_directory "~/.mpd/playlists"
db_file "~/.mpd/mpd.db"
log_file "~/.mpd/mpd.log"
pid_file "~/.mpd/mpd.pid"
state_file "~/.mpd/mpdstate"
audio_output {
  type "alsa"
  name "Alsa"
  mixer_type "software"
}
audio_output {
  type "fifo"
  name "my_fifo"
  path "/tmp/mpd.fifo"
  format "44100:16:2"
}

Now start mpd:

systemctl --user enable mpd
systemctl --user start mpd

ncmpcpp for a front-end:

sudo dnf install ncmpcpp

Customize ~/.ncmpcpp/config:

mpd_host = "localhost"
mpd_music_dir = "~/Music"
user_interface = "alternative"
alternative_header_first_line_format = "$b$1$aqqu$/a$9 {%n %t}|{%f} $1$atqq$/a$9$/b"
alternative_header_second_line_format = "{{$8$b%a$/b$9}{ - $8%b$9}{ ($8%y$9)}}|{%D}"
volume_color = "white"
song_columns_list_format = (6f)[cyan]{lr} (24f)[white]{a} (28f)[cyan]{t|f:Title} (22f)[white]{b}
clock_display_seconds = "yes"
display_bitrate = "yes"
header_window_color = cyan
main_window_color = white
main_window_highlight_color = cyan
progressbar_color = white
progressbar_elapsed_color = cyan:b
progressbar_look = "->-"

Pin ncmpcpp in terminal tile at middle left:

/usr/bin/urxvt -sl 16384 +sb -bg black -fg white -bc -uc -tr -sh 35 -g 80x22+6+282 -b 2 -fn xft:Terminus:pixelsize=10 -name ncmpcpp -title ncmpcpp -e $SHELL -c '/usr/bin/ncmpcpp;$SHELL -i'

Install cmatrix:

sudo dnf install cmatrix

And give it its own window on the left:

/usr/bin/urxvt -sl 16384 +sb -bg black -fg white -bc -uc -tr -sh 35 -g 80x22+6+558 -b 2 -fn xft:Terminus:pixelsize=10 -name cmatrix -title cmatrix -e $SHELL -c '/usr/bin/cmatrix -b -C cyan -u 8;$SHELL -i'

Install cli-visualizer:

sudo pip install --upgrade pip
sudo dnf install pulseaudio-libs-devel fftw-devel ncurses-devel
cd ~/Downloads/
git clone https://github.com/dpayne/cli-visualizer
cd cli-visualizer/
./install.sh

Customize ~/.config/vis/config:

colors.scheme=cyan
audio.stereo.enabled=false
visualizer.spectrum.falloff.mode=top
visualizer.spectrum.falloff.weight=0.99
visualizer.spectrum.bar.width=1
visualizer.spectrum.bar.spacing=1
visualizer.spectrum.top.margin=0.30
visualizer.spectrum.left.margin=0.02

And populate ~/.config/vis/colors/cyan:

cyan
white

If we have a 1920×1080 resolution, we can sneak in one more terminal without covering icons at bottom left:

/usr/bin/urxvt -sl 16384 +sb -bg black -fg white -bc -uc -tr -sh 35 -g 80x14+6+834 -b 2 -fn xft:Terminus:pixelsize=10 -name vis -title vis -e $SHELL -c '/usr/local/bin/vis;$SHELL -i'

To be continued…

Fedora 28 Post Install, Part 1

First post install task if we’re in VirtualBox on MacOS, disable Wayland to eliminate screen flicker. Edit /etc/gdm/custom.conf and set WaylandEnable to false:

WaylandEnable=false

Get Window Maker installed and set a hostname:

sudo dnf install fedora-workstation-repositories
sudo dnf install xterm rxvt-unicode terminus-fonts
sudo dnf install WindowMaker wmCalClock wmmon
hostnamectl set-hostname --static "blizzard"

Reboot to Window Maker, run urxvt with some fancy options and dock it (the fixed geometry at 498,6 will leave room for borderless terminals on the left later):

/usr/bin/urxvt -sl 16384 +sb -bg black -fg white -bc -uc -tr -sh 30 -g 110x38+498+6 -b 5 -fn xft:Terminus:pixelsize=10 -title $USER@$HOSTNAME &

Add RPM Fusion repository (and pull the latest stable Chrome while we’re here):

sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
sudo dnf config-manager --set-enabled google-chrome
sudo dnf install google-chrome-stable

Add some standard Dockapps:

/usr/bin/WPrefs &
/usr/bin/wmCalClock -tc white &
/usr/bin/wmmon -l &
/usr/bin/wmmon -s &
/usr/bin/wmmon -i &

We’ll have to build wmnet from source (local):

sudo dnf install gcc-c++ imake libX11 libX11-devel libXpm-devel libXext-devel
cd ~/Downloads/
wget https://www.dockapps.net/download/wmnet-1.06.tar.gz
tar xvfz wmnet-1.06.tar.gz
cd wmnet-1.06/
xmkmf
make
sudo make install
/usr/bin/wmnet -W enp0s3 -L enp0s3 -t white -r cyan -x 10000000 &

Test wmnet and tweak -x accordingly:

curl -s https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py | python -

And we’ll have to build wmamixer from source too (local):

sudo dnf install alsa-lib-devel
cd ~/Downloads/
wget https://github.com/gryf/wmamixer/archive/1.0.tar.gz
mv 1.0.tar.gz wmamixer-1.0.tar.gz
tar xvfz wmamixer-1.0.tar.gz 
cd wmamixer-1.0/
make
~/Downloads/wmamixer-1.0/wmamixer -w &

To be continued…

Window Maker on Fedora 28

Window Maker (wmaker) running on Fedora release 28. Some relevant configs provided below. Artwork from Jakub Rozalski.

2018-10-07-171136_1920x1080_scrot.png
2018-10-07-171136_1920x1080_scrot.png

.Xdefaults:

URxvt*cursorColor: #cfcfcf
URxvt*cursorBlink: true

URxvt.transparent: true
URxvt.shading: 30
URxvt.background: #4e4d55
URxvt.foreground: #cfcfcf

.xsession (requires xorg-x11-xinit-session rpm):

xset -dpms
xset s noblank
xset s off

xset +fp ~/.fonts
xset fp rehash

wmsetbg -t -f -s ~/Downloads/jakub-rozalski-saxony-ih-16012016b.jpg

exec wmaker

neofetch:

/usr/bin/neofetch --ascii_colors 6 7 6 6 6 6 --colors 6 7 7 6 7 7 --w3m ~/Downloads/jakub-rozalski-german-character-01a-small.jpg --size 180px --xoffset 10 --yoffset 10

.mpd/mpd.conf:

bind_to_address "127.0.0.1"
port "6600"
music_directory "~/Music"
playlist_directory "~/.mpd/playlists"
db_file "~/.mpd/mpd.db"
log_file "~/.mpd/mpd.log"
pid_file "~/.mpd/mpd.pid"
state_file "~/.mpd/mpdstate"
audio_output {
  type "alsa"
  name "Alsa"
  mixer_type "software"
}
audio_output {
  type "fifo"
  name "my_fifo"
  path "/tmp/mpd.fifo"
  format "44100:16:2"
}

.ncmpcpp/config:

mpd_host = "localhost"
mpd_music_dir = "~/Music"
user_interface = "alternative"
alternative_header_first_line_format = "$b$1$aqqu$/a$9 {%n %t}|{%f} $1$atqq$/a$9$/b"
alternative_header_second_line_format = "{{$8$b%a$/b$9}{ - $8%b$9}{ ($8%y$9)}}|{%D}"
volume_color = "white"
song_columns_list_format = (6f)[cyan]{lr} (24f)[white]{a} (28f)[cyan]{t|f:Title} (22f)[white]{b}
clock_display_seconds = "yes"
display_bitrate = "yes"
header_window_color = cyan
main_window_color = white
main_window_highlight_color = cyan
progressbar_color = white
progressbar_elapsed_color = cyan:b
progressbar_look = "->-"

cmatrix:

/usr/bin/cmatrix -b -C cyan -u 8