systemSetup

system setup, configuration and dotfiles
git clone https://noulin.net/git/systemSetup.git
Log | Files | Refs | README | LICENSE

commit 5e7c66ad0c394241f7737cc5fa2b0c3b4d28d041
parent 7eef5e1aff7d80196adf46a61ef72f54d30ab4aa
Author: Remy Noulin <loader2x@gmail.com>
Date:   Sun,  6 Aug 2023 07:46:11 +0200

add slackware configuration

slackware/.Xresources        |   2 +
slackware/.bash_profile      |   1 +
slackware/.i3/config         | 183 +++++++++++++++++++++++++++++++++++++++++++
slackware/.ssh/config        |   8 ++
slackware/.xinitrc           |  20 +++++
slackware/1-system.sh        |  92 ++++++++++++++++++++++
slackware/2-desktopSystem.sh |  27 +++++++
slackware/3-home.sh          |  43 ++++++++++
slackware/build.c            |  38 +++++++++
slackware/screenXrandr.sh    |   1 +
slackware/updateHome.sh      |  22 ++++++
slackware/updateHomeNoGui.sh |  50 ++++++++++++
12 files changed, 487 insertions(+)

Diffstat:
Aslackware/.Xresources | 2++
Aslackware/.bash_profile | 1+
Aslackware/.i3/config | 183+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Aslackware/.ssh/config | 8++++++++
Aslackware/.xinitrc | 20++++++++++++++++++++
Aslackware/1-system.sh | 92+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Aslackware/2-desktopSystem.sh | 27+++++++++++++++++++++++++++
Aslackware/3-home.sh | 43+++++++++++++++++++++++++++++++++++++++++++
Aslackware/build.c | 38++++++++++++++++++++++++++++++++++++++
Aslackware/screenXrandr.sh | 1+
Aslackware/updateHome.sh | 22++++++++++++++++++++++
Aslackware/updateHomeNoGui.sh | 50++++++++++++++++++++++++++++++++++++++++++++++++++
12 files changed, 487 insertions(+), 0 deletions(-)

diff --git a/slackware/.Xresources b/slackware/.Xresources @@ -0,0 +1,2 @@ +XTerm.*.background: black +XTerm.*.foreground: grey diff --git a/slackware/.bash_profile b/slackware/.bash_profile @@ -0,0 +1 @@ +. ~/.bashrc diff --git a/slackware/.i3/config b/slackware/.i3/config @@ -0,0 +1,183 @@ +# This file has been auto-generated by i3-config-wizard(1). +# It will not be overwritten, so edit it as you like. +# +# Should you change your keyboard layout some time, delete +# this file and re-run i3-config-wizard(1). +# + +# i3 config file (v4) +# +# Please see http://i3wm.org/docs/userguide.html for a complete reference! + +set $mod Mod4 + +# Font for window titles. Will also be used by the bar unless a different font +# is used in the bar {} block below. +# This font is widely installed, provides lots of unicode glyphs, right-to-left +# text rendering and scalability on retina/hidpi displays (thanks to pango). +font pango:DejaVu Sans Mono 8 +# Before i3 v4.8, we used to recommend this one as the default: +# font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1 +# The font above is very space-efficient, that is, it looks good, sharp and +# clear in small sizes. However, its unicode glyph coverage is limited, the old +# X core fonts rendering does not support right-to-left and this being a bitmap +# font, it doesn’t scale on retina/hidpi displays. + +# Use Mouse+$mod to drag floating windows to their wanted position +floating_modifier $mod + +# start a terminal +#bindsym $mod+Return exec i3-sensible-terminal +#bindsym $mod+a exec i3-sensible-terminal +#bindsym $mod+a exec st +#bindsym $mod+Shift+a exec ~/tmp/st/stDark +#bindsym $mod+x exec mlterm -O none --bg=#000000 --fg=#E0E0E0 +#bindsym $mod+x exec mlterm -O right --bg=#000000 --fg=#E0E0E0 +#bindsym $mod+b exec xterm -fa "Liberation Mono:pixelsize=16:antialias=true:autohint=true" -xrm xterm*Color4:rgb:86/91/FF -xrm xterm*Color12:rgb:AF/B0/FF +#no italic - bindsym $mod+b exec xterm -fa "Terminus:pixelsize=17" -xrm xterm*Color4:rgb:86/91/FF -xrm xterm*Color12:rgb:AF/B0/FF +#no italic - bindsym $mod+Shift+b exec xterm -fa "Terminus:pixelsize=37" -xrm xterm*Color4:rgb:86/91/FF -xrm xterm*Color12:rgb:AF/B0/FF +bindsym $mod+a exec xterm -fa "Liberation Mono:pixelsize=16:antialias=true:auto" +#bindsym $mod+a exec xterm -fa "Monospace Regular:antialias=false" -fs 13 -xrm xterm*Color4:rgb:86/91/FF -xrm xterm*Color12:rgb:AF/B0/FF +#bindsym $mod+Shift+a exec xterm -fa "Monospace Regular:antialias=false" -fs 17 -xrm xterm*Color4:rgb:86/91/FF -xrm xterm*Color12:rgb:AF/B0/FF + +#bad colors - xterm -xrm xterm*Background:rgb:1a/1a/1a -xrm xterm*Foreground:rgb:d6/d6/d6 -xrm xterm*Color0:rgb:00/00/00 -xrm xterm*Color1:rgb:9e/18/28 -xrm xterm*Color2:rgb:00/88/00 -xrm xterm*Color3:rgb:96/8a/38 -xrm xterm*Color4:rgb:41/41/71 -xrm xterm*Color5:rgb:96/3c/59 -xrm xterm*Color6:rgb:41/81/79 -xrm xterm*Color7:rgb:be/be/be -xrm xterm*Color8:rgb:66/66/66 -xrm xterm*Color9:rgb:cf/61/71 -xrm xterm*Color10:rgb:7c/bc/8c -xrm xterm*Color11:rgb:ff/f7/96 -xrm xterm*Color12:rgb:41/86/be -xrm xterm*Color13:rgb:cf/9e/be -xrm xterm*Color14:rgb:71/be/be -xrm xterm*Color15:rgb:ff/ff/ff + +# kill focused window +bindsym $mod+q kill + +# start dmenu (a program launcher) +#bindsym $mod+d exec dmenu_run +bindsym Control+Escape exec dmenu_run + +# There also is the (new) i3-dmenu-desktop which only displays applications +# shipping a .desktop file. It is a wrapper around dmenu, so you need that +# installed. +# bindsym $mod+d exec --no-startup-id i3-dmenu-desktop + +# change focus +bindsym $mod+j focus left +bindsym $mod+k focus down +bindsym $mod+l focus up +bindsym $mod+semicolon focus right + +# alternatively, you can use the cursor keys: +bindsym $mod+Left focus left +bindsym $mod+Down focus down +bindsym $mod+Up focus up +bindsym $mod+Right focus right + +# move focused window +bindsym $mod+Shift+j move left +bindsym $mod+Shift+k move down +bindsym $mod+Shift+l move up +bindsym $mod+Shift+semicolon move right + +# alternatively, you can use the cursor keys: +bindsym $mod+Shift+Left move left +bindsym $mod+Shift+Down move down +bindsym $mod+Shift+Up move up +bindsym $mod+Shift+Right move right + +# split in horizontal orientation +bindsym $mod+h split h + +# split in vertical orientation +bindsym $mod+v split v + +# enter fullscreen mode for the focused container +bindsym $mod+m fullscreen + +# change container layout (stacked, tabbed, toggle split) +bindsym $mod+s layout stacking +bindsym $mod+w layout tabbed +bindsym $mod+e layout toggle split + +# toggle tiling / floating +bindsym $mod+Shift+space floating toggle + +# change focus between tiling / floating windows +bindsym $mod+space focus mode_toggle + +# focus the parent container +bindsym $mod+p focus parent + +# focus the child container +#bindsym $mod+d focus child + +# switch to workspace +bindsym $mod+1 workspace 1 +bindsym $mod+2 workspace 2 +bindsym $mod+3 workspace 3 +bindsym $mod+4 workspace 4 +bindsym $mod+5 workspace 5 +bindsym $mod+6 workspace 6 +bindsym $mod+7 workspace 7 +bindsym $mod+8 workspace 8 +bindsym $mod+9 workspace 9 +bindsym $mod+0 workspace 10 + +# move focused container to workspace +bindsym $mod+F1 move container to workspace 1 +bindsym $mod+F2 move container to workspace 2 +bindsym $mod+F3 move container to workspace 3 +bindsym $mod+F4 move container to workspace 4 +bindsym $mod+F5 move container to workspace 5 +bindsym $mod+F6 move container to workspace 6 +bindsym $mod+F7 move container to workspace 7 +bindsym $mod+F8 move container to workspace 8 +bindsym $mod+F9 move container to workspace 9 +#bindsym $mod+F0 move container to workspace 10 + +# reload the configuration file +bindsym $mod+Shift+c reload +# restart i3 inplace (preserves your layout/session, can be used to upgrade i3) +bindsym $mod+Shift+r restart +# exit i3 (logs you out of your X session) +bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'" + +# resize window (you can also use the mouse for that) +mode "resize" { + # These bindings trigger as soon as you enter the resize mode + + # Pressing left will shrink the window’s width. + # Pressing right will grow the window’s width. + # Pressing up will shrink the window’s height. + # Pressing down will grow the window’s height. + bindsym j resize shrink width 10 px or 10 ppt + bindsym k resize grow height 10 px or 10 ppt + bindsym l resize shrink height 10 px or 10 ppt + bindsym semicolon resize grow width 10 px or 10 ppt + + # same bindings, but for the arrow keys + bindsym Left resize shrink width 10 px or 10 ppt + bindsym Down resize grow height 10 px or 10 ppt + bindsym Up resize shrink height 10 px or 10 ppt + bindsym Right resize grow width 10 px or 10 ppt + + # back to normal: Enter or Escape + bindsym Return mode "default" + bindsym Escape mode "default" +} + +bindsym $mod+r mode "resize" + +# Start i3bar to display a workspace bar (plus the system information i3status +# finds out, if available) +#bar { +# status_command i3status +#} + + +# MY CONFIG +exec_always --no-startup-id feh --bg-scale ~/.fluxbox/backgrounds/wallpaper_easydoneitnet.png +bindsym $mod+t exec thunar +# firefox +bindsym $mod+z exec firefox -ProfileManager -no-remote +#bindsym $mod+z exec palemoon -ProfileManager -no-remote +#bindsym $mod+d exec xfce4-mixer +bindsym $mod+d exec aumix +bindsym $mod+c exec edi_desktop +#bindsym $mod+t exec --no-startup-id i3-msg 'workspace 4;exec nautilus;workspace 4' +#bindsym $mod+z exec --no-startup-id i3-msg 'workspace 4;exec firefox -ProfileManager -no-remote;workspace 4' +#bindsym $mod+d exec --no-startup-id i3-msg 'workspace 4;exec xfce4-mixer;workspace 4' +#bindsym $mod+n exec gnome-screensaver-command -l diff --git a/slackware/.ssh/config b/slackware/.ssh/config @@ -0,0 +1,8 @@ +# keep connection alive (for NAT routers) +Host * + ServerAliveInterval 290 + ServerAliveCountMax 2 + # Fix the git clone error (over ssh): + # client_loop: send disconnect: Broken pipe + # fatal: Could not read from remote repository. + IPQoS=throughput diff --git a/slackware/.xinitrc b/slackware/.xinitrc @@ -0,0 +1,20 @@ +#!/bin/sh + +userresources=$HOME/.Xresources +usermodmap=$HOME/.Xmodmap +sysresources=/etc/X11/xinit/.Xresources +sysmodmap=/etc/X11/xinit/.Xmodmap + +# Merge in defaults and keymaps +[ -f $sysresources ] && /usr/bin/xrdb -merge $sysresources +[ -f $sysmodmap ] && /usr/bin/xmodmap $sysmodmap +[ -f $userresources ] && /usr/bin/xrdb -merge $userresources +[ -f $usermodmap ] && /usr/bin/xmodmap $usermodmap + +# Start i3 +if [ -z "$DESKTOP_SESSION" -a -x /usr/bin/ck-launch-session ]; then + exec ck-launch-session dbus-launch --exit-with-session /usr/bin/i3 +else + exec /usr/bin/i3 +fi + diff --git a/slackware/1-system.sh b/slackware/1-system.sh @@ -0,0 +1,92 @@ +exit 1 +# comment out after lilo has been run +# add new user +useradd -m -g users -G wheel,floppy,audio,video,cdrom,plugdev,power,netdev,lp,scanner -s /bin/bash slacker +# Switch to generic kernel +/usr/share/mkinitrd/mkinitrd_command_generator.sh -l /boot/vmlinuz-generic +> RUN COMMAND: mkinitrd -c -k 5.15.19 -f ext4 -r /dev/sda1 -m mptbase:mptscsih:mptspi:jbd2:mbcache:crc32c_intel:crc32c_generic:ext4 -u -o /boot/initrd.gz +vi /etc/lilo.conf +image = /boot/vmlinuz-generic-5.15.19 + initrd = /boot/initrd.gz + root = /dev/sda1 + label = 5.15.19 + read-only +lilo + +# Setup slackpkg mirror +sed -i 's-# http://ftp.sunet.se-http://ftp.sunet.se-g' /etc/slackpkg/mirrors +slackpkg update + +# install slackbuilds tools +wget http://slackbuilds.org/slackbuilds/15.0/system/sbotools.tar.gz + +tar xf sbotools.tar.gz +cd sbotools +. sbotools.info +wget $DOWNLOAD +md5sum $(basename $DOWNLOAD) +echo $MD5SUM +./sbotools.SlackBuild +installpkg /tmp/sbotools-2.7-noarch-1_SBo.tgz +sbosnap fetch + +sboinstall sshguard rtorrent pbzip2 atop tcc sshuttle cmatrix iotop unison w3m figlet tig rdiff-backup graphicsmagick moreutils pwgen pigz astyle uncrustify unifdef valgrind lcov slurm cloc ncdu neomutt msmtp bmon cppcheck universal-ctags source-highlight highlight etckeeper autojump tty-clock + +# missing finger kpcli iftop qrencode libpcre3 nmap zip imagemagick llgal pixz zstd doxygen lm-sensors pinentry-curses cscope slrn ncal + +# vim +#sed -i 's/"syntax on/syntax on/g' /etc/vim/vimrc +#cp vimrc.local /etc/vim/vimrc.local + +cp ../dotfiles/webs.sh /usr/local/bin/ + +# sheepy +git clone https://spartatek.se/git/sheepy.git +cd sheepy +./install.sh +spm -g install sheepyExamples +spm -g install hidir +spm -g install lolcat +cd .. + +# git (root account) +cp ../dotfiles/.gitconfig /root/ +mkdir /root/.gittemplates +cp -R ../dotfiles/.gittemplates/* /root/.gittemplates/ +git config --global user.email "you@example.com" +git config --global user.name "Your Name" + +# diff-so-fancy +git clone https://github.com/so-fancy/diff-so-fancy.git +cp diff-so-fancy/diff-so-fancy /usr/local/bin/ +mkdir /usr/local/bin/lib +cp diff-so-fancy/lib/DiffHighlight.pm /usr/local/bin/lib/ + +# git-off +git clone https://noulin.net/git/git-off.git +export OFF=`pwd`/git-off/c/git-off.c +cd /usr/local/bin +ln -s $OFF git-off +cd - + +# etckeeper +# error in debian bullseye +mkdir -p /etc/.git/hooks +etckeeper init + +# install pick +##apt-get install -y libncurses5-dev +# git clone https://github.com/mptre/pick +# cd pick +# ./autogen.sh +# ./configure +# make install clean +# cd .. +# +# # install yank +# git clone https://github.com/mptre/yank +# cd yank +# make install clean +# cd .. + +# end diff --git a/slackware/2-desktopSystem.sh b/slackware/2-desktopSystem.sh @@ -0,0 +1,27 @@ +sboinstall lagrange i3 vlc meld keepassx gnucash mlterm claws-mail + +# virt-manger qemu + +# suckless st +# git clone git://git.suckless.org/st +# apt-get install -y libfontconfig1-dev libxft-dev xfonts-terminus +# export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig/ +# cd st +# git checkout -b local 66556d9 +# cp ../../dotfiles/config.def.h st/ +# git add . +# git commit -m "my config" +# make clean install +# cd .. + + +# sc-im sc improved - vim-like spreadsheet calculator +# some libraries are missing when compiling sc-in in 1-system.sh +# here, it compiles +# apt-get install -y bison libncurses5-dev libncursesw5-dev +# git clone https://github.com/andmarti1424/sc-im.git +# cd sc-im/src +# make && make install +# cd ../.. + +# end diff --git a/slackware/3-home.sh b/slackware/3-home.sh @@ -0,0 +1,43 @@ +./updateHome.sh + +git off install + +#install vim vundle +git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim + +# in vim run :PluginInstall +echo 'in vim run :PluginInstall' + +# fzf +git clone https://github.com/junegunn/fzf.git +cd fzf +./install --all +cd .. + +# docker for non-root users +#echo 'Setting up docker for non-root users' +#sudo gpasswd -a $USER docker +# reinitialize environment to load the new group +# starts a new shell - not good +# newgrp - + +# setup diff-so-fancy in gitconfig +## commented because it is in .gitconfig +git config --global core.pager "diff-so-fancy | less --tabs=4 -RFX" +git config --global color.ui true + +git config --global color.diff-highlight.oldNormal "red bold" +git config --global color.diff-highlight.oldHighlight "red bold 52" +git config --global color.diff-highlight.newNormal "green bold" +git config --global color.diff-highlight.newHighlight "green bold 22" + +git config --global color.diff.meta "227" +git config --global color.diff.frag "magenta bold" +git config --global color.diff.commit "227 bold" +git config --global color.diff.old "red bold" +git config --global color.diff.new "green bold" +git config --global color.diff.whitespace "red reverse" +git config --bool --global diff-so-fancy.markEmptyLines false +git config --bool --global diff-so-fancy.changeHunkIndicators false +git config --bool --global diff-so-fancy.stripLeadingSymbols false +git config --bool --global diff-so-fancy.useUnicodeRuler false diff --git a/slackware/build.c b/slackware/build.c @@ -0,0 +1,38 @@ +#! /usr/bin/env sheepy +#include "libsheepyObject.h" + +int main(int ARGC, char** ARGV) { + + initLibsheepy(ARGV[0]); + setLogMode(LOG_VERBOSE); + + if (ARGC != 3) { + logI("Usage: build slackBuildURL sourceDownloadURL"); + ret 1; + } + + char *tar = basename(ARGV[1]); + //logVarG(tar); + + logSystemf("wget %s ; tar xf %s", ARGV[1], tar); + + setS(tar,-7, 0); + //logVarG(tar); + + chDir(tar); + + cleanListP(log) = logSystemOutf("wget %s ; ./%s.SlackBuild", ARGV[2], tar); + + // Slackware package /tmp/dmenu-4.9-x86_64-1_SBo.tgz created. + + char *l = iListGetS(log, -2); + //logVarG(l); + + cleanListP(ll) = extractG(l, " /tmp", ".tgz "); + //logVarG(ll); + + logSystemf("installpkg /tmp%s.tgz", ll[0]); + + ret 0; +} +// vim: set expandtab ts=2 sw=2: diff --git a/slackware/screenXrandr.sh b/slackware/screenXrandr.sh @@ -0,0 +1 @@ +xrandr --output Virtual1 --mode 2560x1600 diff --git a/slackware/updateHome.sh b/slackware/updateHome.sh @@ -0,0 +1,22 @@ +./updateHomeNoGui.sh + +# set screen resolution +cp screenXrandr.sh ~/bin/ + +# xterm black background +cp .Xresources ~/ + +# start i3 +cp .xinitrc ~/ + +# i3 +mkdir ~/.i3 +cp -R .i3/* ~/.i3/ + +# fluxbox +mkdir ~/.fluxbox +cp -R ../dotfiles/.fluxbox/* ~/.fluxbox/ + +# mlterm +mkdir ~/.mlterm +cp -R ../dotfiles/.mlterm/* ~/.mlterm/ diff --git a/slackware/updateHomeNoGui.sh b/slackware/updateHomeNoGui.sh @@ -0,0 +1,50 @@ +mkdir ~/tmp/ +cp ../dotfiles/.bash_aliases ~/ +cp ../dotfiles/.bashrc ~/ +cp ../dotfiles/.gdbinit ~/ +cp ../dotfiles/.gitconfig ~/ +cp -R ../dotfiles/.gittemplates ~/ +cp ../dotfiles/.tmux.conf ~/ +mkdir ~/.vim +cp -R ../dotfiles/.vim/* ~/.vim/ +cp ../dotfiles/.vimrc ~/ +mkdir ~/bin +cp ../dotfiles/new.sh ~/bin/ +cp ../dotfiles/gf ~/bin/ +cp ../dotfiles/gre ~/bin/ +cp ../dotfiles/mk.sh ~/bin/ +cp ../dotfiles/updateXapianIndex.sh ~/bin/ +cp ../dotfiles/xapianOmegaSearch.sh ~/bin/ +cp ../dotfiles/ref.sh ~/bin/ +cp ../dotfiles/ug.sh ~/bin/ +cp ../dotfiles/gle.sh ~/bin/ +cp ../dotfiles/gdf.sh ~/bin/ +cp ../dotfiles/vop.c ~/bin/ +cp ../dotfiles/N.sh ~/bin/ +cp ../dotfiles/pl.sh ~/bin/ +cp ../dotfiles/c.sh ~/bin/ +sheepy -c ~/bin/vop.c +cp ../dotfiles/gop ~/bin/ +mkdir ~/.gnupg +cp ../dotfiles/gpg-agent.conf ~/.gnupg/ +mkdir ~/.ssh +chmod 700 ~/.ssh +# copy slackware setting for ssh client +cp .ssh/config ~/.ssh/ +mkdir ~/.w3m +cp ../dotfiles/.w3m/config ~/.w3m/ + +# source .bashrc +cp .bash_profile ~/ + +# mc +mkdir -p ~/.config/mc +cp -R ../dotfiles/mc/* ~/.config/mc/ + +# ranger sixel/mlterm configuration +mkdir -p ~/.config/ranger/colorschemes +cp ../dotfiles/rc.conf ~/.config/ranger/ +cp ../dotfiles/default.py ~/.config/ranger/colorschemes/ + +# save current commit in home +./systemSetupCommit.sh