commit cce6b3dec92b87df030059963db32a3d9ffae82b from: Bradley Taunt date: Thu Jan 18 17:41:01 2024 UTC Initial commit for the cgit platform commit - /dev/null commit + cce6b3dec92b87df030059963db32a3d9ffae82b blob - /dev/null blob + 87558bd5564ae3e421647bca068eaf1351f81323 (mode 644) --- /dev/null +++ .vimrc @@ -0,0 +1,100 @@ +" Don't try to be vi compatible +set nocompatible + +" Helps force plugins to load correctly when it is turned back on below +filetype off + +" TODO: Load plugins here (pathogen or vundle) + +" Turn on syntax highlighting +syntax on + +" For plugins to load correctly +filetype plugin indent on + +" TODO: Pick a leader key +" let mapleader = "," + +" Security +set modelines=0 + +" Show line numbers +set number + +" Show file stats +set ruler + +" Blink cursor on error instead of beeping (grr) +set visualbell + +" Encoding +set encoding=utf-8 + +" Whitespace +set wrap +set textwidth=79 +set formatoptions=tcqrn1 +set tabstop=2 +set shiftwidth=2 +set softtabstop=2 +set expandtab +set noshiftround + +" Cursor motion +set scrolloff=3 +set backspace=indent,eol,start +set matchpairs+=<:> " use % to jump between pairs +runtime! macros/matchit.vim + +" Move up/down editor lines +nnoremap j gj +nnoremap k gk + +" Allow hidden buffers +set hidden + +" Rendering +set ttyfast + +" Status bar +set laststatus=2 + +" Last line +set showmode +set showcmd + +" Searching +nnoremap / /\v +vnoremap / /\v +set hlsearch +set incsearch +set ignorecase +set smartcase +set showmatch +map :let @/='' " clear search + +" Remap help key. +inoremap :set invfullscreena +nnoremap :set invfullscreen +vnoremap :set invfullscreen + +" Textmate holdouts + +" Formatting +map q gqip + +" Visualize tabs and newlines +set listchars=tab:▸\ ,eol:¬ +" Uncomment this to enable by default: +" set list " To enable by default +" Or use your leader key + l to toggle on/off +map l :set list! " Toggle tabs and EOL + +" Color scheme (terminal) +set t_Co=256 +set background=dark +let g:solarized_termcolors=256 +let g:solarized_termtrans=1 +" put https://raw.github.com/altercation/vim-colors-solarized/master/colors/solarized.vim +" in ~/.vim/colors/ and uncomment: +" colorscheme solarized \ No newline at end of file blob - /dev/null blob + 2f900f3f570966ae24e3ae3820343729cbc832e1 (mode 644) --- /dev/null +++ .xinitrc @@ -0,0 +1,7 @@ +slstatus & + +# start up picom to avoid screen tearing +picom --vsync & + +# Saving a dwm log +exec dwm > ~/.dwm.log blob - /dev/null blob + ba49fab803f0c2b4055f68a5159a0902512b09f7 (mode 644) --- /dev/null +++ .zshrc @@ -0,0 +1,103 @@ +# If you come from bash you might have to change your $PATH. +# export PATH=$HOME/bin:/usr/local/bin:$PATH + +# Path to your oh-my-zsh installation. +export ZSH="$HOME/.oh-my-zsh" +export EDITOR="/usr/bin/vim" + +# Set name of the theme to load --- if set to "random", it will +# load a random theme each time oh-my-zsh is loaded, in which case, +# to know which specific one was loaded, run: echo $RANDOM_THEME +# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes +ZSH_THEME="robbyrussell" + +# Set list of themes to pick from when loading at random +# Setting this variable when ZSH_THEME=random will cause zsh to load +# a theme from this variable instead of looking in $ZSH/themes/ +# If set to an empty array, this variable will have no effect. +# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" ) + +# Uncomment the following line to use case-sensitive completion. +# CASE_SENSITIVE="true" + +# Uncomment the following line to use hyphen-insensitive completion. +# Case-sensitive completion must be off. _ and - will be interchangeable. +# HYPHEN_INSENSITIVE="true" + +# Uncomment one of the following lines to change the auto-update behavior +# zstyle ':omz:update' mode disabled # disable automatic updates +# zstyle ':omz:update' mode auto # update automatically without asking +# zstyle ':omz:update' mode reminder # just remind me to update when it's time + +# Uncomment the following line to change how often to auto-update (in days). +# zstyle ':omz:update' frequency 13 + +# Uncomment the following line if pasting URLs and other text is messed up. +# DISABLE_MAGIC_FUNCTIONS="true" + +# Uncomment the following line to disable colors in ls. +# DISABLE_LS_COLORS="true" + +# Uncomment the following line to disable auto-setting terminal title. +# DISABLE_AUTO_TITLE="true" + +# Uncomment the following line to enable command auto-correction. +# ENABLE_CORRECTION="true" + +# Uncomment the following line to display red dots whilst waiting for completion. +# You can also set it to another string to have that shown instead of the default red dots. +# e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f" +# Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #5765) +# COMPLETION_WAITING_DOTS="true" + +# Uncomment the following line if you want to disable marking untracked files +# under VCS as dirty. This makes repository status check for large repositories +# much, much faster. +# DISABLE_UNTRACKED_FILES_DIRTY="true" + +# Uncomment the following line if you want to change the command execution time +# stamp shown in the history command output. +# You can set one of the optional three formats: +# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" +# or set a custom format using the strftime function format specifications, +# see 'man strftime' for details. +# HIST_STAMPS="mm/dd/yyyy" + +# Would you like to use another custom folder than $ZSH/custom? +# ZSH_CUSTOM=/path/to/new-custom-folder + +# Which plugins would you like to load? +# Standard plugins can be found in $ZSH/plugins/ +# Custom plugins may be added to $ZSH_CUSTOM/plugins/ +# Example format: plugins=(rails git textmate ruby lighthouse) +# Add wisely, as too many plugins slow down shell startup. +plugins=(git) + +source $ZSH/oh-my-zsh.sh + +# User configuration + +# export MANPATH="/usr/local/man:$MANPATH" + +# You may need to manually set your language environment +# export LANG=en_US.UTF-8 + +# Preferred editor for local and remote sessions +# if [[ -n $SSH_CONNECTION ]]; then +# export EDITOR='vim' +# else +# export EDITOR='mvim' +# fi + +# Compilation flags +# export ARCHFLAGS="-arch x86_64" + +# Set personal aliases, overriding those provided by oh-my-zsh libs, +# plugins, and themes. Aliases can be placed here, though oh-my-zsh +# users are encouraged to define aliases within the ZSH_CUSTOM folder. +# For a full list of active aliases, run `alias`. +# +# Example aliases +# alias zshconfig="mate ~/.zshrc" +# alias ohmyzsh="mate ~/.oh-my-zsh" +alias suck="sudo rm -rf config.h ; sudo make install" \ No newline at end of file blob - /dev/null blob + 017baf00ab705618aaf3dc61337cee200a00afab (mode 644) --- /dev/null +++ LICENSE @@ -0,0 +1,2 @@ +Mixed License. +I chose to mantain the original LICENSE of the projects I've forked. blob - /dev/null blob + 9cc2807ecb2eed7ba3d39ce8fdaf37ecbdea6273 (mode 644) --- /dev/null +++ README.md @@ -0,0 +1,85 @@ +# Alpine Suck + +Lightweight Desktop installer for Alpine Linux based on the suckless philosophy. + +Includes my own custom set of suckless tools (dwm, slstatus, dmenu, etc.). Ships with `ohmyzsh` and personal `vim` configs. Uses `qutebrowser` for default browser. + +## Downloading + +1. Download the latest Alpine image +2. Run `setup-alpine` +3. Run `setup-xorg-base` +4. [Enable community/edge/testing repos](https://wiki.alpinelinux.org/wiki/Repositories#Enabling_the_community_repository) +5. Install git, vim, bash, & doas +6. Edit doas permissions (`/etc/doas.conf`): + +``` +permit nopass :wheel +``` + +After finishing the above, create a user: + +``` +adduser -g "Real Name" username +``` + +Then add them to all required groups (wheel,users,audio,video,cdrom,input,tty): + +``` +adduser username wheel +``` + +Then logout of `root` user. + +--- + +Login as your newly created user and run the following: + +`git clone https://git.btxx.org/alpine-suck` + +`cd alpine-suck` + +## Installing + +1) Install dependencies by running `./install-dependencies.sh`. The script will simply read required packages from `dependencies.txt` and run apk add. +2) Compile and install suckless software by running the `./install.sh` + +## TLDR + +```sh +cd alpine-suck # CD into this repository +doas ./install-dependencies.sh # Install alpine packages +``` + +Be sure to change the `$ALPINE_USER` variable to match that of your current +user: + +``` +$ALPINE_USER="bt" +``` + +Then run the script to build suckless programs: + +```sh +doas ./install.sh # Install everything +``` + +Reboot the machine. Log in as your main user. Run: + +``` +startx +``` + +## Possible Tweaks / Troubleshooting + +--- + +You might need to check `/proc/asound/cards` to see which sound cards are available to your system. Then, if needed, you should create a `/etc/asound.conf` file with the following inside (where the "1" is your desired card number): + +``` +defaults.pcm.card 1 +defaults.ctl.card 1 +``` + +This will take on the next reboot of the machine. + blob - /dev/null blob + 552c0247f6211a689bcb9fae5d5009ab400bd918 (mode 644) --- /dev/null +++ dependencies.txt @@ -0,0 +1,80 @@ +# dependencies + +# core dependencies +dbus +xdg-desktop-portal +xdg-desktop-portal-wlr +linux-firmware +linux-headers +util-linux +udisks2 +udisks2-doc +pciutils +xf86-input-evdev +xf86-input-synaptics +mesa-dri-gallium +g++ +shadow +libx11-dev +libxinerama-dev +fontconfig-dev +libxft-dev +ncurses + +# networking +wireless-tools +dhcpcd +iwd +networkmanager +networkmanager-wifi +networkmanager-tui +wireguard-tools +ip6tables + +# audio +alsa-utils +alsa-utils-doc +alsa-lib +alsaconf +alsa-ucm-conf + +# fonts +font-fira-code +font-siji +font-dejavu +font-terminus + +# utilities +aerc +wget +curl +zsh +light +gawk +feh +make +go +picom +dunst +xrandr +bash-doc +bash-completion +zzz +tlp + +# screenshot utilities +scrot +slurp +slop + +# browsers and browser dependencies +qutebrowser +glib-dev +webkit2gtk +webkit2gtk-dev +gcr +gcr-dev + +# nice gui file manager +lf +pcmanfm blob - /dev/null blob + cb2a4298baf61adf6b47d95cd62299d2aaa7d847 (mode 755) --- /dev/null +++ install-dependencies.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +if [ "$EUID" -ne 0 ] + then echo "The script has to be run as root." + exit +fi + +echo "This script is designed for Alpine Linux and it will not work with in any other OS" +echo "Installing dependencies listed in dependencies.txt..." + +sed -e 's/#.*$//' -e '/^$/d' dependencies.txt | while read p; do + echo "Running apk add $p" + apk add $p +done blob - /dev/null blob + dde8c246990c95ab51ba1b347709fad450aeb0f3 (mode 755) --- /dev/null +++ install.sh @@ -0,0 +1,69 @@ +#!/bin/bash + +ALPINE_USER="bt" + +if [ "$EUID" -ne 0 ] + then echo "The script has to be run as root." + exit +fi + +cp modules.conf /etc/modules-load.d/ +cp mimeapps.list /usr/share/applications/ +cp .xinitrc /home/$ALPINE_USER/.xinitrc +cp .vimrc /home/$ALPINE_USER/.vimrc +cp .zshrc /home/$ALPINE_USER/.zshrc + +mkdir /home/$ALPINE_USER/.suckless +cd /home/$ALPINE_USER/.suckless + +git clone https://git.btxx.org/dwm +cd dwm +echo "Installing dwm" +rm -rf config.h +make clean install +cd .. + +git clone https://git.btxx.org/dmenu +cd dmenu +echo "Installing dmenu" +rm -rf config.h +make clean install +cd .. + +git clone https://git.btxx.org/slstatus +cd slstatus +echo "Installing slstatus" +rm -rf config.h +make clean install +cd .. + +git clone https://git.btxx.org/st +cd st +echo "Installing st" +rm -rf config.h +make clean install +cd .. + +git clone https://git.btxx.org/surf +cd surf +echo "Installing surf" +rm -rf config.h +make clean install +cd .. + +git clone https://git.btxx.org/slock +cd slock +echo "Installing slock" +rm -rf config.h +make clean install +cd .. +cd .. + +rc-service dbus start +rc-update add dbus +rc-service iwd start +rc-update add iwd +rc-service alsa start +rc-update add alsa + +echo "Install finished. You should reboot your machine." blob - /dev/null blob + 21b92396dae0589cec60b57065e2b9d0824b1bbd (mode 644) --- /dev/null +++ mimeapps.list @@ -0,0 +1,15 @@ +[Default Applications] +x-scheme-handler/http=org.qutebrowser.qutebrowser.desktop +x-scheme-handler/https=org.qutebrowser.qutebrowser.desktop +x-scheme-handler/ftp=org.qutebrowser.qutebrowser.desktop +x-scheme-handler/chrome=org.qutebrowser.qutebrowser.desktop +text/html=org.qutebrowser.qutebrowser.desktop +application/x-extension-htm=org.qutebrowser.qutebrowser.desktop +application/x-extension-html=org.qutebrowser.qutebrowser.desktop +application/x-extension-shtml=org.qutebrowser.qutebrowser.desktop +application/xhtml+xml=org.qutebrowser.qutebrowser.desktop +application/x-extension-xhtml=org.qutebrowser.qutebrowser.desktop +application/x-extension-xht=org.qutebrowser.qutebrowser.desktop +image/jpeg=feh +image/png=feh +image/webp=feh \ No newline at end of file blob - /dev/null blob + 1d532ec84d0621a86fc5bfa9bf034b5d0c402730 (mode 644) --- /dev/null +++ modules.conf @@ -0,0 +1 @@ +snd_pcm_oss