removed unused files, replaced and re-wrote README

This commit is contained in:
Phuntsok Drak-pa 2019-07-21 03:52:29 +02:00
parent de542b3e97
commit e1e0b00f9c
5 changed files with 51 additions and 298 deletions

224
.zshrc
View File

@ -1,224 +0,0 @@
######################################################################
# Dotfile for the zsh shell, containing aliases and functions
# Copyright (C) 2017 Lucien Cartier-Tilet
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
######################################################################
# Line to hopefully fix tramp-mode in Spacemacs
[[ $TERM == "tramp" ]] && unsetopt zle && PS1='$ ' && return
# I want muh GL4D library
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib"
# Lines configured by zsh-newuser-install
HISTFILE=~/.histfile
HISTSIZE=100000
SAVEHIST=100000
setopt EXTENDED_HISTORY
setopt APPEND_HISTORY
bindkey ';5D' backward-word
bindkey ';5C' forward-word
bindkey -e
set -k
# End of lines configured by zsh-newuser-install
# The following lines were added by compinstall
zstyle :compinstall filename '/home/alex/.zshrc'
autoload -Uz compinit url-quote-magic
compinit
# End of lines added by compinstall
source /usr/share/zsh/site-contrib/powerline.zsh
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
source ~/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
source ~/.zshrc-private.zsh
autoload -Uz run-help
unalias run-help
export CC=/usr/bin/clang
export CXX=/usr/bin/clang++
export EDITOR='vim'
# export PATH=$PATH:$HOME/local/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/bin:$HOME/local/lib
TEXINPUTS=~/.tex/scheme-listings-master/:$TEXINPUTS
TEXINPUTS=~/pgfplots/tex//:$TEXINPUTS
# Safety nets
# do not delete / or prompt if deleting more than 3 files at a time
alias rm='rm -I --preserve-root'
alias rmd='rm -r --preserve-root'
# confirmation
alias mv='mv -i'
alias cp='cp -i'
alias ln='ln -i'
# Parenting changin perms on /
alias chown='chown --preserve-root'
alias chmod='chmod --preserve-root'
alias chgrp='chgrp --preserve-root'
# Tune sudo and su
alias root='sudo -i'
alias su='sudo -i'
# Get system memory, CPU usage and GPU memory info
alias meminfo='free -m -l -t'
alias psmem='ps auxf | sort -nr -k 4'
alias psmem10='ps auxf | sort -nr -k 4 | head -10'
alias pscpu='ps auxf | sort -nr -k 3'
alias pscpu10='ps auxf | sort -nr -k 3 | head -10'
alias cpuinfo='lscpu'
alias gpumeminfo='grep -i --color memory /var/log/Xorg.0.log'
# I can't type
alias exti=exit
alias exi=exit
alias ..='cd ..'
alias solo='cd ~/dotfiles/.config && ln -s compton-solo.conf compton.conf ; pkill compton ; compton'
alias multiscreen='cd ~/dotfiles/.config && ln -s compton-multi.conf compton.conf ; pkill compton ; compton'
alias grep="grep --color=auto"
alias help='run-help'
alias ll='ls -alh | less'
alias ls='ls --color'
alias lsl='ls -Alh --color'
alias la='ls -A --color'
#alias mp3='youtube-dl -x --audio-format mp3 --audio-quality 0 $*'
alias flac='youtube-dl -x --audio-format flac --audio-quality 0 $*'
# force some audio quality
alias mp3=flac
alias rainbowstream='rainbowstream -iot'
alias mpv='mpv --no-border --force-window=no'
alias feh='feh -Zx.'
alias neofetch='clear && neofetch --cpu_temp C --os_arch off --cpu_cores physical --kernel_shorthand on --uptime_shorthand tiny --w3m --source ~/dotfiles/ArjLinugz-xDDDDDDDDDDDD-neofetch.png --size 340px'
alias untar='tar -zxvf'
alias compress='tar -czf'
alias df='df -H'
alias du='du -ch'
mkcddir(){
mkdir -p "$1" && cd "$1"
}
ytdl(){
str="$1"
youtube-dl --write-sub "${str#*=}"
}
rainymood() {
volume="50"
if [ "$#" -gt "0" ]; then
volume="$1"
fi
FILE=$((RANDOM%4))
URL="https://rainymood.com/audio1110/${FILE}.ogg"
mpv "$URL" --force-window=no --volume=${volume} && rainymood
}
# Weather
we(){
if [ -n "$1" ]; then
str="$*";
curl http://wttr.in/~${str// /+}
else
curl http://wttr.in/Aubervilliers
fi
}
alias wea='we Aubervilliers'
alias wee='we Enghien+les+Bains'
alias wel='we Lyon'
alias wep='we Paris'
# Download
alias wget='wget -c'
alias 4chandl='wget -c -erobots=off -nd -rHD4chan.org -Ajpg,png,gif,webm -Rs.jpg'
# System
alias diskspace='du -S | sort -n -r |more'
alias spoweroff='systemctl poweroff -i'
alias sreboot='systemctl reboot -i'
alias zshrc='source ~/.zshrc'
alias battery='upower -i /org/freedesktop/UPower/devices/battery_BAT0 | grep -E "state|to\ full|percentage|time\ to\ empty"'
alias mountC='sudo mount -t ntfs /dev/sda4 /media/Marpa && cd /media/Marpa/C/'
alias mountD='sudo mount -t ntfs /dev/sdb1 /media/Marpa && cd /media/Marpa/Phundrak/'
alias umountC='cd ~ && sudo umount /media/C'
alias umountD='cd ~ && sudo umount /media/Marpa'
# Emacs
alias enw='emacs -nw'
alias servemacs='emacs --daemon'
alias restartemacs='emacsclient --eval "(kill-emacs)"'
# Package Manager Pacman
alias aurupdate='yay -Syua'
alias forceupdate='sudo pacman -Syyu'
alias gimme='sudo pacman -Syu'
alias install='sudo pacman -S'
alias purge='sudo pacman -Sc'
alias remove='sudo pacman -Rscnd'
alias search='yay -Ss'
alias update='sudo pacman -Syu'
alias optimize='sudo pacman-optimize && sync'
alias pac-clean='remove $(pacman -Qtdq)'
# Dev
alias clang='clang -Wall'
alias clang++='clang++ -Wall'
alias g++='g++ -Wall'
alias gcc='gcc -Wall'
alias cdebug='cmake -DCMAKE_BUILD_TYPE=Debug'
alias crelease='cmake -DCMAKE_BUILD_TYPE=Release'
alias gitlog='git log --oneline --graph --decorate'
alias swipl='clear && swipl -q && clear'
cppnew() {
mkdir -p "$1"
cd "$1";
mkdir -p src
cp ~/dotfiles/dev/CC/gitignore .gitignore
cp ~/dotfiles/dev/CC/Makefile Makefile
cp ~/dotfiles/dev/C++/main.cc src/main.cc
cp ~/dotfiles/dev/C++/CMakeLists.txt.part1 CMakeLists.txt
printf "%s" "$1" >> CMakeLists.txt
cat ~/dotfiles/dev/C++/CMakeLists.txt.part2 >> CMakeLists.txt
printf "%s" "$1" >> CMakeLists.txt
cat ~/dotfiles/dev/C++/CMakeLists.txt.part3 >> CMakeLists.txt
git init
git add .
git commit -m "initial commit"
}
cnew() {
mkdir -p "$1"
cd "$1"
mkdir -p src
cp ~/dotfiles/dev/CC/gitignore .gitignore
cp ~/dotfiles/dev/CC/Makefile Makefile
cp ~/dotfiles/dev/C/main.c src/main.c
cp ~/dotfiles/dev/C/CMakeLists.txt.part1 CMakeLists.txt
printf "%s" "$1" >> CMakeLists.txt
cat ~/dotfiles/dev/C/CMakeLists.txt.part2 >> CMakeLists.txt
printf "%s" "$1" >> CMakeLists.txt
cat ~/dotfiles/dev/C/CMakeLists.txt.part3 >> CMakeLists.txt
git init
git add .
git commit -m "initial commit"
}
s() { # do sudo, or sudo the last command if no argument given
if [[ $# == 0 ]]; then
sudo $(history -p '!!')
else
sudo "$@"
fi
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

View File

@ -1,65 +0,0 @@
![](https://cdn.rawgit.com/syl20bnr/spacemacs/442d025779da2f62fc86c2082703697714db6514/assets/spacemacs-badge.svg)
Pundraks dotfiles
===================
This is my collection of dotfiles for my daily GNU/Linux environment, tweaked to my liking. If you wish to get these dotfiles, follow the [1.3](#*Installation).
As you can see, I personally use [zsh](https://github.com/zsh-users/zsh) as my shell of choice, and [Emacs](https://github.com/emacs-mirror/emacs) using [Spacemacs](http://spacemacs.org/) (still with Emacs keybinding) as my editor of choice.
I also use as my desktop environment [i3-gaps](https://github.com/Airblader/i3) + [polybar](https://github.com/jaagr/polybar) + [compton](https://github.com/chjj/compton). You will find some screenshot below.
Features
--------
- Handy zsh aliases
- Ready to use Emacs dotfiles optimized for C, Modern C++, Python and Java development
- Ready to use i3 dotfiles
Dependencies
------------
Because indeed there are some dependencies, and here they are. The versions mentionned are the version I am currently using. My dotfiles **might** work with earlier versions.
- [Emacs](https://github.com/emacs-mirror/emacs) &gt;= `25.3-1`
- [Spacemacs](http://spacemacs.org/) &gt;= `0.200.9@25.3.1`
- [zsh](https://github.com/zsh-users/zsh) &gt;= `5.0`
- `.zshrc` dependencies (can be ignored if commenting out the corresponding lines in the file):
- [powerline](https://github.com/powerline/powerline) &gt;= `2.6-1`
- [clang](http://clang.llvm.org/) &gt;= `5.0.0-1`
- [highlight](http://www.andre-simon.de/doku/highlight/highlight.html) &gt;= `3.39-1`
- [youtube-dl](http://rg3.github.io/youtube-dl) &gt;= `2017.10.01-1`
- [curl](https://curl.haxx.se) &gt;= `7.55.1-2`
- [neofetch](https://github.com/dylanaraps/neofetch) &gt;= `3.2.1`
- [feh](https://feh.finalrewind.org/) &gt;= `2.20-1`
- [i3-gaps](https://github.com/Airblader/i3) &gt;= `4.14.1-1`
- [compton](https://github.com/chjj/compton) &gt;= `0.1_beta2.5-8`
- [pywal](https://github.com/dylanaraps/pywal) &gt;= `0.6.9-1=`
- [dmenu](http://tools.suckless.org/dmenu/) &gt;= `4.7-1`
- [uxterm](http://invisible-island.net/xterm/) &gt;= `330-1`
- [Rust nightly](https://rustup.rs/) &gt;= `0.20`
- [eclipse-common](https://eclipse.org) &gt;= `4.7.1-1`
- [eclipse-java](https://eclipse.org) &gt;= `4.7.1-1`
- [eclipse-pydev](https://eclipse.org) &gt;= `5.9.2-1`
- [eclim](http://eclim.org/install.html)
- [texlive-core](http://tug.org/texlive) &gt;= `2017.44918-1`
- [minted](https://github.com/gpoore/minted) &gt;= `2.5-1`
Please notice that all of my package manager commands are made for `pacman` (Arch Linux); if you do not use this package manager, do not forget to comment out the related lines in `.zshrc`.
Installation
------------
To install the dotfiles, you have two options. You can either:
- replace your original dotfiles with mine in their original place.
- create symbolic links to the dotfiles in the folder where they were downloaded.
The advantage with the latter is you will have all the dotfiles in the same place, plus if at one point you want to get updates from the dotfiles, you just have to download them again at the same place and you wont have to bother placing them again at the right place.
In any case, if you want to use my dotfiles for Emacs, **please install Spacemacs first**.
Licence
-------
All of my dotfiles (and my dotfiles only) are available under the GNU GPLv3 Licence. Please consult [LICENCE.md](https://github.com/Phundrak/dotfiles/blob/master/LICENSE.md) for more information. In short: you are free to access, edit and redistribute all of my dotfiles under the same licence and as allowed by the licence, and if you fuck up something, its your own responsibility.

51
README.org Normal file
View File

@ -0,0 +1,51 @@
[[http://spacemacs.org][file:https://cdn.rawgit.com/syl20bnr/spacemacs/442d025779da2f62fc86c2082703697714db6514/assets/spacemacs-badge.svg]]
* Pundraks dotfiles
** Presentation
This is my collection of dotfiles for my daily GNU/Linux environment, tweaked
to my liking. If you wish to get the same setup as mine, follow the
instructions below.
As you can see, I personally use [[https://fishshell.com/][fish]] as my shell of choice, and [[https://www.gnu.org/software/emacs/][Emacs]] using
[[http://spacemacs.org][Spacemacs]] (still with Emacs keybinding) as my main text editor.
I also use [[https://github.com/resloved/i3][Resolved]]s [[https://github.com/resloved/i3][fork]] of [[https://github.com/Airblader/i3][i3-gaps]] with two [[https://github.com/jaagr/polybar][polybar]] bars and [[https://github.com/tryone144][Tryone144]]s
[[https://github.com/tryone144/compton][fork]] of [[https://github.com/chjj/compton][Compton]]. The colors scheme for [[https://github.com/davatorium/rofi][rofi]], Emacs and polybar are chosen
from the wallpapers using [[https://github.com/dylanaraps/pywal][pywal]].
** Features
- Emacs configuration perfectly tailored for my own use
- Beautiful and comfy i3 and polybar configuration
** Dependencies
Of course, some dependencies are needed for my dotfiles to work well. Here is
a non-exhaustive list of software needed by these configuration files:
- Emacs >= 26.2
- Spacemacs (develop branch)
- fish
- [[https://st.suckless.org/][st]] ([[https://github.com/mattiadr][Mattiadr]]s [[https://github.com/mattiadr/st][fork]])
- i3-gaps
- compton
- pywal
- j4-dmenu-desktop
- minted
- Rust nightly
- texlive-core
And some other stuff scattered around in my dotfiles.
** Installation
To have the same install as I do, simply symlink your configuration files to
the files in this git repository.
** Licence
All of my dotfiles (and my dotfiles only) are available under the GNU GPLv3
Licence. Please consult [[file:LICENCE.md]] for more information. In short: you
are free to access, edit and redistribute all of my dotfiles under the same
licence and as allowed by the licence, and if you fuck up something, its
your own responsibility.

View File

@ -1,9 +0,0 @@
# -*- mode: org; -*-
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="https://www.pirilampo.org/styles/readtheorg/css/htmlize.css"/>
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="https://www.pirilampo.org/styles/readtheorg/css/readtheorg.css"/>
#+HTML_HEAD: <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
#+HTML_HEAD: <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
#+HTML_HEAD: <script type="text/javascript" src="https://www.pirilampo.org/styles/lib/js/jquery.stickytableheaders.min.js"></script>
#+HTML_HEAD: <script type="text/javascript" src="https://www.pirilampo.org/styles/readtheorg/js/readtheorg.js"></script>