New things from school

This commit is contained in:
Geoffrey Frogeye 2017-09-20 11:47:30 +02:00
parent f1cb4233cb
commit f1d29a1a1f
7 changed files with 82 additions and 107 deletions

View File

@ -1 +1 @@
profile
.profile

View File

@ -1,2 +1,2 @@
#!/bin/sh
dmenu -fn 'DejaVu Sans Mono-10' -nb '#48483e' -nf '#f1ebeb' -sb '#8fc029' -sf '#272822' -l 8 -f -i -h 19 "$@"
dmenu -fn 'DejaVu Sans Mono-10' -nb '#48483e' -nf '#f1ebeb' -sb '#8fc029' -sf '#272822' -l 8 -f "$@"

View File

@ -1,84 +0,0 @@
general {
output_format = "i3bar"
colors = true
interval = 1
}
order += "disk /home"
order += "disk /"
order += "path_exists VPN"
order += "ethernet usb0"
order += "wireless wlan1"
order += "wireless wlan0"
order += "ethernet eth0"
order += "cpu_usage"
order += "battery 0"
#order += "load"
order += "volume master"
order += "tztime local"
wireless wlan0 {
format_up = " (%quality at %essid, %bitrate) %ip"
format_down = ""
}
wireless wlan1 {
format_up = " (%quality at %essid, %bitrate) %ip"
format_down = ""
}
ethernet eth0 {
# if you use %speed, i3status requires the cap_net_admin capability
format_up = " %ip"
format_down = ""
}
ethernet usb0 {
# if you use %speed, i3status requires the cap_net_admin capability
format_up = " %ip"
format_down = "📱"
}
cpu_usage {
format = " %usage"
}
battery 0 {
format = "%status %percentage"
format_down = ""
status_chr = ""
status_bat = ""
status_full = ""
path = "/sys/class/power_supply/BAT%d/uevent"
low_threshold = 10
}
path_exists VPN {
# path exists when a VPN tunnel launched by nmcli/nm-applet is active
path = "/proc/sys/net/ipv4/conf/tun0"
format = "🔐"
}
tztime local {
format = "🕘 %d/%m/%Y %H:%M:%S"
timezone = "Europe/Paris"
}
load {
format = "%5min"
}
disk "/" {
format = " %avail / %total"
}
disk "/home" {
format = " %avail / %total"
}
volume master {
format = "🔈 %volume"
format_muted = "🔇 %volume"
device = "default"
mixer = "Master"
mixer_idx = 0
}

View File

@ -1 +1 @@
face
.face

2
icon
View File

@ -1 +1 @@
face
.face

View File

@ -142,7 +142,39 @@ function _debloc-ldconfig {
find $DEBLOC_ROOT{/usr,}/lib -type l -name "*.so*" | while read link; do
yes | cp --force --no-dereference --preserve=links "$link" "$DEBLOC_LD" &> /dev/null
done &> /dev/null
}
# Fix absolute symbolic links
function _debloc-fixRootSymlinks {
find $DEBLOC_ROOT -type l | while read src
do
dst="$(readlink "$src")"
if echo "$dst" | grep '^/' | grep -q -v "^$DEBLOC_ROOT"
then
newDst="$DEBLOC_ROOT$dst"
if [ -f "$newDst" ]
then
echo "$src → $newDst"
rm "$src"
ln -s "$newDst" "$src"
else
echo "Ignoring $src pointing to $dst"
fi
fi
done
}
function _debloc-fixPkgconfPrefix {
sed "s|^prefix=/usr$|prefix=$DEBLOC_ROOT/usr|" $(find $DEBLOC_ROOT -type f -name "*.pc") -i
}
function debloc_fix {
echo "Fixing absolute symbolic links..."
_debloc-fixRootSymlinks
echo "Linking libraries in /ld"
_debloc-ldconfig
echo "Fixing prefix in pkg-config files"
_debloc-fixPkgconfPrefix
}
# Install debian archive
@ -180,7 +212,7 @@ function _debloc-install { # package
DEB_FILE=$(mktemp) &> /dev/null
path=$(_debloc-packagePath $pkg)
echo -e "${DEBIAN_MIRROR}" | while read mirror; do
if [ -z $mirror ]; then
if [ -z "$mirror" ]; then
continue
fi
url=${mirror}/${path}
@ -258,8 +290,9 @@ function debloc_env {
echo "export C_INCLUDE_PATH=\"$DEBLOC_ROOT/usr/include:\$C_INCLUDE_PATH\""
echo "export CPLUS_INCLUDE_PATH=\"$DEBLOC_ROOT/usr/include:$DEBLOC_ROOT/usr/include/python2.7/:$DEBLOC_ROOT/usr/include/x86_64-linux-gnu/python2.7/:\$CPLUS_INCLUDE_PATH\""
echo "export LD_LIBRARY_PATH=\"$DEBLOC_LD:\$LD_LIBRARY_PATH\""
echo "export PYTHONPATH=\"$DEBLOC_ROOT/usr/lib/python3/dist-packages:\$PYTHONPATH\""
echo "export PYTHONPATH=\"$DEBLOC_ROOT/usr/lib/python2/dist-packages:$DEBLOC_ROOT/usr/lib/python3/dist-packages:$DEBLOC_ROOT/usr/lib/python2.7/dist-packages:$DEBLOC_ROOT/usr/lib/python3.5/dist-packages:\$PYTHONPATH\""
echo "export QT_QPA_PLATFORM_PLUGIN_PATH=\"$DEBLOC_ROOT/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms\""
echo "export PKG_CONFIG_PATH=\"$DEBLOC_ROOT/usr/share/pkgconfig/:$DEBLOC_ROOT/usr/lib/x86_64-linux-gnu/pkgconfig/:$DEBLOC_ROOT/usr/lib/pkgconfig/:\$PKG_CONFIG_PATH\""
}
function debloc_info {
@ -283,22 +316,33 @@ function debloc_install { # package
if [ -z $1 ]; then
debloc_deb_help
fi
for pkg in $*
do
if [ $pkg == '--force' ] || [ $pkg == '-f' ]; then
force=0
fi
done
for pkg in $*; do
if [ $pkg == '--force' ] || [ $pkg == '-f' ]; then
continue
fi
pkg=$(_debloc-filterVirtual $pkg)
_debloc-exists $pkg
if [ $? == 0 ]; then
echo "Unknown package $pkg"
continue
fi
_debloc-locallyInstalled $pkg
if [ $? == 1 ]; then
echo "Package $pkg is already installed with Debloc"
continue
fi
_debloc-globallyInstalled $pkg
if [ $? == 1 ]; then
echo "Package $pkg is already installed on the system"
continue
if [ ! -v force ]; then
_debloc-locallyInstalled $pkg
if [ $? == 1 ]; then
echo "Package $pkg is already installed with Debloc"
continue
fi
_debloc-globallyInstalled $pkg
if [ $? == 1 ]; then
echo "Package $pkg is already installed on the system"
continue
fi
fi
_debloc-installDeps $pkg
done
@ -385,6 +429,7 @@ function debloc_help {
echo " install Install a debian package in the fake filesystem"
echo " deb Install from a .deb file in the fake filesystem"
echo " altern Update alternative"
echo " fix Apply some fixes in the fake filesystem"
echo " flush Remove every package installed from the fake filesystem"
echo " help Get help with commands"
echo

View File

@ -107,7 +107,6 @@ elif which dpkg &> /dev/null; then
fi
rm -f $STATUS > /dev/null
echo 101 $1 $installed
# Installing if it's not installed
if [ $installed == 0 ]; then
# TODO noconfirm
@ -224,12 +223,13 @@ if [ $ARCH == 1 ] && [ $ADMIN == 1 ]; then
fi
else
if [ $DEBIAN == 1 || $TERMUX == 1 ]; then
inst python-dev python3-dev
inst python-dev python3-dev cmake
fi
YCM_ARGS=""
if [ $TERMUX != 1 ]; then
YCM_ARGS="$YCM_ARGS --clang-completer --tern-completer"
fi
python $HOME/.vim/bundle/YouCompleteMe/install.py $YCM_ARGS
fi
@ -241,7 +241,21 @@ if [ $GUI == 1 ]; then
if [ $ARCH == 1 ]; then
altInst polybar-git ttf-font-awesome autorandr-git keynav-enhanced
else
echo "TODO compile polybar-git autorandr-git"
# Compiling polybar
if ! which polybar > /dev/null; then
inst debhelper cmake libxcb-icccm4-dev libxcb-image0-dev libxcb-randr0-dev libx11-dev libxcb1-dev libxcb-util-dev libx11-xcb-dev linux-libc-dev libboost-dev x11proto-core-dev libxcb-ewmh-dev libxft-dev libasound2-dev libiw-dev libmpdclient-dev xcb-proto python-xcbgen libxcb-xkb-dev i3-wm libcairo2-dev libxcb-xrm-dev
# TODO Figure which one are really needed
#inst libasound2 libc6 libgcc1 libiw30 libmpdclient2 libstdc++6 libx11-6 libx11-xcb1 libxcb-ewmh2 libxcb-icccm4 libxcb-randr0 libxcb-xkb1 libxcb1 libxft2
TMP=$(mktemp -d)
git clone --branch 3.0.5 --recursive https://github.com/jaagr/polybar $TMP
mkdir $TMP/build
cd $TMP/build
cmake ..
make -j`nproc`
strip bin/polybar
mv bin/polybar ~/.bin/
rm -rf $TMP
fi
fi
if [ $DEBIAN == 1 ]; then
inst suckless-tools keynav
@ -257,10 +271,10 @@ if [ $GUI == 1 ]; then
# qutebrowser
if [ $DEBIAN == 1 ]; then
inst python3-lxml python-tox python3-pyqt5 python3-pyqt5.qtwebkit python3-pyqt5.qtquick python3-sip python3-jinja2 python3-pygments python3-yaml
inst python3-lxml python-tox python3-pyqt5 python3-pyqt5.qtwebkit python3-pyqt5.qtquick python3-sip python3-jinja2 python3-pygments python3-yaml python3-pyqt5.qtsql libqt5sql5-sqlite python3-pyqt5.qtwebengine python3-pyqt5.qtopengl python3-opengl
TMP_DIR=$(mktemp -d)
$(cd $TMP_DIR; wget https://qutebrowser.org/python3-pypeg2_2.15.2-1_all.deb)
$(cd $TMP_DIR; wget https://github.com/qutebrowser/qutebrowser/releases/download/v0.9.1/qutebrowser_0.9.1-2_all.deb)
$(cd $TMP_DIR; wget https://github.com/qutebrowser/qutebrowser/releases/download/v0.11.0/qutebrowser_0.11.0-1_all.deb)
instFile $TMP_DIR/*.deb
rm -rf $TMP_DIR
@ -273,9 +287,9 @@ if [ $GUI == 1 ]; then
altInst sct
elif [ $TERMUX != 1 ]; then
if [ ! -f $HOME/.bin/sct ]; then
TMP=$(mktemp)
wget http://www.tedunangst.com/flak/files/sct.c -O $TMP
cc -std=c99 -O2 -I /usr/X11R6/include -o $HOME/.bin/sct $TMP -L /usr/X11R6/lib -lm -lX11 -lXrandr
TMP=$(mktemp /tmp/XXXXXXXXXX.c)
wget https://gist.githubusercontent.com/ajnirp/208c03d3aa7f02c743d2/raw/55bf3eed25739173d8be57b5179ed5542cf40ed6/sct.c -O $TMP
cc $TMP --std=c99 -lX11 -lXrandr -o $HOME/.bin/sct
rm $TMP
fi
fi