New things from school
This commit is contained in:
parent
f1cb4233cb
commit
f1d29a1a1f
|
@ -1 +1 @@
|
||||||
profile
|
.profile
|
|
@ -1,2 +1,2 @@
|
||||||
#!/bin/sh
|
#!/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 "$@"
|
||||||
|
|
|
@ -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
|
|
||||||
}
|
|
|
@ -142,7 +142,39 @@ function _debloc-ldconfig {
|
||||||
find $DEBLOC_ROOT{/usr,}/lib -type l -name "*.so*" | while read link; do
|
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
|
yes | cp --force --no-dereference --preserve=links "$link" "$DEBLOC_LD" &> /dev/null
|
||||||
done &> /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
|
# Install debian archive
|
||||||
|
@ -180,7 +212,7 @@ function _debloc-install { # package
|
||||||
DEB_FILE=$(mktemp) &> /dev/null
|
DEB_FILE=$(mktemp) &> /dev/null
|
||||||
path=$(_debloc-packagePath $pkg)
|
path=$(_debloc-packagePath $pkg)
|
||||||
echo -e "${DEBIAN_MIRROR}" | while read mirror; do
|
echo -e "${DEBIAN_MIRROR}" | while read mirror; do
|
||||||
if [ -z $mirror ]; then
|
if [ -z "$mirror" ]; then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
url=${mirror}/${path}
|
url=${mirror}/${path}
|
||||||
|
@ -258,8 +290,9 @@ function debloc_env {
|
||||||
echo "export C_INCLUDE_PATH=\"$DEBLOC_ROOT/usr/include:\$C_INCLUDE_PATH\""
|
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 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 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 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 {
|
function debloc_info {
|
||||||
|
@ -283,22 +316,33 @@ function debloc_install { # package
|
||||||
if [ -z $1 ]; then
|
if [ -z $1 ]; then
|
||||||
debloc_deb_help
|
debloc_deb_help
|
||||||
fi
|
fi
|
||||||
|
for pkg in $*
|
||||||
|
do
|
||||||
|
if [ $pkg == '--force' ] || [ $pkg == '-f' ]; then
|
||||||
|
force=0
|
||||||
|
fi
|
||||||
|
done
|
||||||
for pkg in $*; do
|
for pkg in $*; do
|
||||||
|
if [ $pkg == '--force' ] || [ $pkg == '-f' ]; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
pkg=$(_debloc-filterVirtual $pkg)
|
pkg=$(_debloc-filterVirtual $pkg)
|
||||||
_debloc-exists $pkg
|
_debloc-exists $pkg
|
||||||
if [ $? == 0 ]; then
|
if [ $? == 0 ]; then
|
||||||
echo "Unknown package $pkg"
|
echo "Unknown package $pkg"
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
_debloc-locallyInstalled $pkg
|
if [ ! -v force ]; then
|
||||||
if [ $? == 1 ]; then
|
_debloc-locallyInstalled $pkg
|
||||||
echo "Package $pkg is already installed with Debloc"
|
if [ $? == 1 ]; then
|
||||||
continue
|
echo "Package $pkg is already installed with Debloc"
|
||||||
fi
|
continue
|
||||||
_debloc-globallyInstalled $pkg
|
fi
|
||||||
if [ $? == 1 ]; then
|
_debloc-globallyInstalled $pkg
|
||||||
echo "Package $pkg is already installed on the system"
|
if [ $? == 1 ]; then
|
||||||
continue
|
echo "Package $pkg is already installed on the system"
|
||||||
|
continue
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
_debloc-installDeps $pkg
|
_debloc-installDeps $pkg
|
||||||
done
|
done
|
||||||
|
@ -385,6 +429,7 @@ function debloc_help {
|
||||||
echo " install Install a debian package in the fake filesystem"
|
echo " install Install a debian package in the fake filesystem"
|
||||||
echo " deb Install from a .deb file in the fake filesystem"
|
echo " deb Install from a .deb file in the fake filesystem"
|
||||||
echo " altern Update alternative"
|
echo " altern Update alternative"
|
||||||
|
echo " fix Apply some fixes in the fake filesystem"
|
||||||
echo " flush Remove every package installed from the fake filesystem"
|
echo " flush Remove every package installed from the fake filesystem"
|
||||||
echo " help Get help with commands"
|
echo " help Get help with commands"
|
||||||
echo
|
echo
|
||||||
|
|
|
@ -107,7 +107,6 @@ elif which dpkg &> /dev/null; then
|
||||||
fi
|
fi
|
||||||
rm -f $STATUS > /dev/null
|
rm -f $STATUS > /dev/null
|
||||||
|
|
||||||
echo 101 $1 $installed
|
|
||||||
# Installing if it's not installed
|
# Installing if it's not installed
|
||||||
if [ $installed == 0 ]; then
|
if [ $installed == 0 ]; then
|
||||||
# TODO noconfirm
|
# TODO noconfirm
|
||||||
|
@ -224,12 +223,13 @@ if [ $ARCH == 1 ] && [ $ADMIN == 1 ]; then
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
if [ $DEBIAN == 1 || $TERMUX == 1 ]; then
|
if [ $DEBIAN == 1 || $TERMUX == 1 ]; then
|
||||||
inst python-dev python3-dev
|
inst python-dev python3-dev cmake
|
||||||
fi
|
fi
|
||||||
YCM_ARGS=""
|
YCM_ARGS=""
|
||||||
if [ $TERMUX != 1 ]; then
|
if [ $TERMUX != 1 ]; then
|
||||||
YCM_ARGS="$YCM_ARGS --clang-completer --tern-completer"
|
YCM_ARGS="$YCM_ARGS --clang-completer --tern-completer"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
python $HOME/.vim/bundle/YouCompleteMe/install.py $YCM_ARGS
|
python $HOME/.vim/bundle/YouCompleteMe/install.py $YCM_ARGS
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -241,7 +241,21 @@ if [ $GUI == 1 ]; then
|
||||||
if [ $ARCH == 1 ]; then
|
if [ $ARCH == 1 ]; then
|
||||||
altInst polybar-git ttf-font-awesome autorandr-git keynav-enhanced
|
altInst polybar-git ttf-font-awesome autorandr-git keynav-enhanced
|
||||||
else
|
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
|
fi
|
||||||
if [ $DEBIAN == 1 ]; then
|
if [ $DEBIAN == 1 ]; then
|
||||||
inst suckless-tools keynav
|
inst suckless-tools keynav
|
||||||
|
@ -257,10 +271,10 @@ if [ $GUI == 1 ]; then
|
||||||
|
|
||||||
# qutebrowser
|
# qutebrowser
|
||||||
if [ $DEBIAN == 1 ]; then
|
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)
|
TMP_DIR=$(mktemp -d)
|
||||||
$(cd $TMP_DIR; wget https://qutebrowser.org/python3-pypeg2_2.15.2-1_all.deb)
|
$(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
|
instFile $TMP_DIR/*.deb
|
||||||
rm -rf $TMP_DIR
|
rm -rf $TMP_DIR
|
||||||
|
|
||||||
|
@ -273,9 +287,9 @@ if [ $GUI == 1 ]; then
|
||||||
altInst sct
|
altInst sct
|
||||||
elif [ $TERMUX != 1 ]; then
|
elif [ $TERMUX != 1 ]; then
|
||||||
if [ ! -f $HOME/.bin/sct ]; then
|
if [ ! -f $HOME/.bin/sct ]; then
|
||||||
TMP=$(mktemp)
|
TMP=$(mktemp /tmp/XXXXXXXXXX.c)
|
||||||
wget http://www.tedunangst.com/flak/files/sct.c -O $TMP
|
wget https://gist.githubusercontent.com/ajnirp/208c03d3aa7f02c743d2/raw/55bf3eed25739173d8be57b5179ed5542cf40ed6/sct.c -O $TMP
|
||||||
cc -std=c99 -O2 -I /usr/X11R6/include -o $HOME/.bin/sct $TMP -L /usr/X11R6/lib -lm -lX11 -lXrandr
|
cc $TMP --std=c99 -lX11 -lXrandr -o $HOME/.bin/sct
|
||||||
rm $TMP
|
rm $TMP
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue