feat: introducing gentoo on ThinkPad
This commit is contained in:
parent
2aecdc58ba
commit
4236c85f20
@ -15,9 +15,6 @@ setbg &
|
|||||||
dwmblocks &
|
dwmblocks &
|
||||||
xrdb ${XDG_CONFIG_HOME:-$HOME/.config}/X11/xresources
|
xrdb ${XDG_CONFIG_HOME:-$HOME/.config}/X11/xresources
|
||||||
|
|
||||||
xinput set-prop 'Synaptics TM3072-003' 'libinput Tapping Enabled' 1 &
|
|
||||||
xinput set-prop 'Synaptics TM3072-003' 'libinput Natural Scrolling Enabled' 1 &
|
|
||||||
xinput set-prop 'Synaptics TM3072-003' 'libinput Accel Speed' 0.4 &
|
|
||||||
setxkbmap 'fr(oss)'
|
setxkbmap 'fr(oss)'
|
||||||
remaps &
|
xmodmap "$XDG_CONFIG_HOME/X11/xmodmap" &
|
||||||
sxhkd &
|
sxhkd &
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
!! Set a default font and font size as below:
|
!! Set a default font and font size as below:
|
||||||
*.font: Iosevka Fixed Slab:size=12
|
*.font: Fira Code:size=12
|
||||||
*.symbols: Symbols Nerd Font:size=11
|
*.symbols: Font Awesome 5 Free:size=11
|
||||||
|
|
||||||
/* name dark light */
|
/* name dark light */
|
||||||
/* black 0 8 */
|
/* black 0 8 */
|
||||||
@ -37,8 +37,8 @@
|
|||||||
*.cursorColor: #ebdbb2
|
*.cursorColor: #ebdbb2
|
||||||
|
|
||||||
/* st config */
|
/* st config */
|
||||||
st.font: Iosevka Fixed Slab:size=14
|
st.font: Fira Code:size=12
|
||||||
st.symbols: Symbols Nerd Font:size=14
|
st.symbols: Font Awesome 5 Free:size=12
|
||||||
st.termname: st-256color
|
st.termname: st-256color
|
||||||
st.borderpx: 5
|
st.borderpx: 5
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
[global]
|
[global]
|
||||||
font = Iosevka Fixed Slab 14
|
font = Fira Code 12
|
||||||
|
|
||||||
# Allow a small subset of html markup:
|
# Allow a small subset of html markup:
|
||||||
# <b>bold</b>
|
# <b>bold</b>
|
||||||
|
@ -2,12 +2,13 @@
|
|||||||
|
|
||||||
# System stuff
|
# System stuff
|
||||||
|
|
||||||
super + F1
|
XF86AudioMute
|
||||||
pulsemixer --toggle-mute; audio-notify
|
pulsemixer --toggle-mute; audio-notify
|
||||||
super + {F2, F3}
|
|
||||||
|
{XF86AudioLowerVolume, XF86AudioRaiseVolume}
|
||||||
pulsemixer --change-volume {-5, +5}; audio-notify
|
pulsemixer --change-volume {-5, +5}; audio-notify
|
||||||
|
|
||||||
super + {F5, F6}
|
{XF86MonBrightnessDown, XF86MonBrightnessUp}
|
||||||
sbacklight {dec,inc}
|
sbacklight {dec,inc}
|
||||||
|
|
||||||
super + u
|
super + u
|
||||||
@ -17,20 +18,17 @@ super + shift + u
|
|||||||
dmenuumount
|
dmenuumount
|
||||||
|
|
||||||
super + s
|
super + s
|
||||||
dmenuprompt "suspend?" "systemctl suspend"
|
dmenuprompt "suspend?" "doas suspend"
|
||||||
|
|
||||||
super + shift + s
|
super + shift + s
|
||||||
dmenuprompt "shutdown?" "shutdown -h now"
|
dmenuprompt "shutdown?" "doas shutdown -h now"
|
||||||
|
|
||||||
super + shift + r
|
super + shift + r
|
||||||
dmenuprompt "reboot?" "reboot"
|
dmenuprompt "reboot?" "doas reboot"
|
||||||
|
|
||||||
super + shift + d
|
super + shift + d
|
||||||
displayselect
|
displayselect
|
||||||
|
|
||||||
super + F9
|
|
||||||
kbacklight
|
|
||||||
|
|
||||||
super + shift + o
|
super + shift + o
|
||||||
dmenuopen
|
dmenuopen
|
||||||
|
|
||||||
|
@ -3,6 +3,9 @@
|
|||||||
# This file is sourced when launching a DM from startx/xinit
|
# This file is sourced when launching a DM from startx/xinit
|
||||||
|
|
||||||
# environment variables
|
# environment variables
|
||||||
|
## path
|
||||||
|
export PATH="$(find $HOME/.local/bin -type d | tr '\n' ':' | sed 's/:$//'):$PATH"
|
||||||
|
|
||||||
## dotfiles
|
## dotfiles
|
||||||
export DOTFILES="$HOME/.dotfiles.git"
|
export DOTFILES="$HOME/.dotfiles.git"
|
||||||
|
|
||||||
@ -21,10 +24,8 @@ export TEXMFHOME="$XDG_DATA_HOME/texmf"
|
|||||||
export CARGO_HOME="$XDG_DATA_HOME/cargo"
|
export CARGO_HOME="$XDG_DATA_HOME/cargo"
|
||||||
|
|
||||||
## default programs
|
## default programs
|
||||||
export SUDO_ASKPASS="$HOME/.local/bin/dmenupass"
|
|
||||||
export GPG_ASKPASS="/usr/bin/pinentry-curses"
|
export GPG_ASKPASS="/usr/bin/pinentry-curses"
|
||||||
export SUDO_EDITOR="nvim"
|
|
||||||
export EDITOR="nvim"
|
export EDITOR="nvim"
|
||||||
export TERMINAL="st"
|
export TERMINAL="st"
|
||||||
export READER="zathura"
|
export READER="zathura"
|
||||||
export BROWSER="firefox"
|
export BROWSER="firefox-bin"
|
||||||
|
@ -39,8 +39,8 @@ bindkey -M menuselect 'j' vi-down-line-or-history
|
|||||||
bindkey -v '^?' backward-delete-char
|
bindkey -v '^?' backward-delete-char
|
||||||
|
|
||||||
# Use arrows to search through history
|
# Use arrows to search through history
|
||||||
bindkey '^[[A' history-substring-search-up
|
#bindkey '^[[A' history-substring-search-up
|
||||||
bindkey '^[[B' history-substring-search-down
|
#bindkey '^[[B' history-substring-search-down
|
||||||
|
|
||||||
# Change cursor shape for different vi modes.
|
# Change cursor shape for different vi modes.
|
||||||
function zle-keymap-select {
|
function zle-keymap-select {
|
||||||
@ -66,7 +66,7 @@ precmd_dunctions() { zle-line-init ;} # Use beam shape cursor for each new promp
|
|||||||
[ -f "$HOME/.config/aliasrc" ] && source "$HOME/.config/aliasrc"
|
[ -f "$HOME/.config/aliasrc" ] && source "$HOME/.config/aliasrc"
|
||||||
|
|
||||||
# Load zsh-history-search
|
# Load zsh-history-search
|
||||||
source /usr/share/zsh/plugins/zsh-history-substring-search/zsh-history-substring-search.zsh 2>/dev/null
|
#source /usr/share/zsh/plugins/zsh-history-substring-search/zsh-history-substring-search.zsh 2>/dev/null
|
||||||
|
|
||||||
# Load zsh-syntax-highlighting
|
# Load zsh-syntax-highlighting
|
||||||
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh 2>/dev/null
|
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh 2>/dev/null
|
||||||
|
@ -26,15 +26,17 @@ notify() { \
|
|||||||
[ 300 -gt $delta ] && return;
|
[ 300 -gt $delta ] && return;
|
||||||
echo $now > $XDG_CONFIG_HOME/batteryupdate
|
echo $now > $XDG_CONFIG_HOME/batteryupdate
|
||||||
case "$capacity" in
|
case "$capacity" in
|
||||||
1[0-9]) notify-send -u "normal" "Battery is running low ($capacity%)" "Please plug your computer to a power source" ;;
|
[2-3][0-9]) notify-send -u "normal" "Battery is running low ($capacity%)" "Please plug your computer to a power source" ;;
|
||||||
[0-9]) notify-send -u "critical" "Battery is dangerously low ($capacity%)" "Please plug your computer to a power source - <b>NOW!</b>" ;;
|
*) notify-send -u "critical" "Battery is dangerously low ($capacity%)" "Please plug your computer to a power source - <b>NOW!</b>" ;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
total=0
|
||||||
for bat in /sys/class/power_supply/BAT?/
|
for bat in /sys/class/power_supply/BAT?/
|
||||||
do
|
do
|
||||||
status="$(cat "$bat/status")"
|
status="$(cat "$bat/status")"
|
||||||
capacity="$(cat "$bat/capacity")"
|
capacity="$(cat "$bat/capacity")"
|
||||||
|
total="$(expr $total + $capacity)"
|
||||||
if [ "$status" = "Full" ]; then
|
if [ "$status" = "Full" ]; then
|
||||||
status=" " && capacity="FULL"
|
status=" " && capacity="FULL"
|
||||||
printf " %s %s " "$status" "$capacity" && exit
|
printf " %s %s " "$status" "$capacity" && exit
|
||||||
@ -46,8 +48,9 @@ do
|
|||||||
[6-7][0-9]) status="" ;;
|
[6-7][0-9]) status="" ;;
|
||||||
[4-5][0-9]) status="" ;;
|
[4-5][0-9]) status="" ;;
|
||||||
[2-3][0-9]) status="" ;;
|
[2-3][0-9]) status="" ;;
|
||||||
*) status="" ; notify;;
|
*) status="" ;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
[ 40 -gt $total ] && notify;
|
||||||
printf " %s %3d%% " "$status" "$capacity";
|
printf " %s %3d%% " "$status" "$capacity";
|
||||||
done && return 0
|
done && return 0
|
||||||
|
@ -11,13 +11,14 @@
|
|||||||
|
|
||||||
|
|
||||||
# Wifi quality percentage and icon if ethernet is connected.
|
# Wifi quality percentage and icon if ethernet is connected.
|
||||||
wifi="$(grep "^\s*w" /proc/net/wireless | awk '{ printf int($3 * 100 / 70) }')"
|
ssid="$(wpa_cli status | grep -i ^ssid | sed -e 's/.*=//')"
|
||||||
[ $wifi -ne 0 ] && str="$(printf "直 %3d%%" $wifi)" || str="$(printf "睊")"
|
ip="$(wpa_cli status | grep -i ^ip_address | sed -e 's/.*=//')"
|
||||||
|
[ -n $ip ] && str="$(printf " %s" $ssid)" || str="$(printf " ---")"
|
||||||
eth="$(cat /sys/class/net/eno1/operstate)"
|
eth="$(cat /sys/class/net/eno1/operstate)"
|
||||||
if [ "up" = "$eth" ]; then
|
if [ "up" = "$eth" ]; then
|
||||||
str="$(printf "%s / " "$str")"
|
str="$(printf "%s / " "$str")"
|
||||||
fi
|
fi
|
||||||
vpn="$(pidof openvpn)"
|
vpn="$(pidof openvpn)"
|
||||||
[ -n "$vpn" ] && str="$(printf "() %s" "$str")"
|
[ -n "$vpn" ] && str="$(printf "() %s" "$str")"
|
||||||
|
|
||||||
printf " %s " "$str"
|
printf " %s " "$str"
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
|
|
||||||
unicode() { sed "s/[‘’]/'/g;s/[“”]/\"/g"; }
|
unicode() { sed "s/[‘’]/'/g;s/[“”]/\"/g"; }
|
||||||
format() { sed "s/^volume:n\/a.*//g;/^volume:/d;s/\\&/&/g;s/\\[paused\\].*//g;s/\\[playing\\].*//g"; }
|
format() { sed "s/^volume:n\/a.*//g;/^volume:/d;s/\\&/&/g;s/\\[paused\\].*//g;s/\\[playing\\].*//g"; }
|
||||||
|
|
||||||
mpc="$(mpc --format "%albumartist% - %title%")"
|
mpc="$(mpc --format "%albumartist% - %title%")"
|
||||||
title="$(echo "$mpc" | head -n1 | cut -d'-' -f2 | unicode)"
|
title="$(echo "$mpc" | head -n1 | cut -d'-' -f2 | unicode)"
|
||||||
|
@ -9,16 +9,19 @@
|
|||||||
# @description : volume block for dwmblocks
|
# @description : volume block for dwmblocks
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
[ "1" = $(pulsemixer --get-mute) ] && echo " 婢 --- " && exit
|
|
||||||
|
|
||||||
vol="$(pulsemixer --get-volume | awk -F " " '{ printf "%d", $1 }')"
|
vol="$(pulsemixer --get-volume | awk -F " " '{ printf "%d", $1 }')"
|
||||||
|
|
||||||
if [ "$vol" -gt "70" ]; then
|
if [ "1" = $(pulsemixer --get-mute) ]; then
|
||||||
icon="墳"
|
icon=""
|
||||||
elif [ "$vol" -lt "30" ]; then
|
|
||||||
icon="奄"
|
|
||||||
else
|
else
|
||||||
icon="奔"
|
if [ "$vol" -gt "70" ]; then
|
||||||
|
icon=""
|
||||||
|
elif [ "$vol" -lt "30" ]; then
|
||||||
|
icon=""
|
||||||
|
else
|
||||||
|
icon=""
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
printf " %s %3d%% " $icon $vol
|
printf " %s %3d%% " $icon $vol
|
||||||
|
3
.zshenv
3
.zshenv
@ -7,9 +7,6 @@ export XDG_DATA_HOME="$HOME/.local/share"
|
|||||||
|
|
||||||
export ZDOTDIR="$HOME/.config/zsh"
|
export ZDOTDIR="$HOME/.config/zsh"
|
||||||
|
|
||||||
## paths
|
|
||||||
export PATH="$(find $HOME/.local/bin -type d | tr '\n' ':' | sed 's/:$//'):$PATH"
|
|
||||||
|
|
||||||
## misc
|
## misc
|
||||||
export LESS_TERMCAP_md="$(printf '%b' '\e[01;32m')"
|
export LESS_TERMCAP_md="$(printf '%b' '\e[01;32m')"
|
||||||
export LESS_TERMCAP_me="$(printf '%b' '\e[0m')"
|
export LESS_TERMCAP_me="$(printf '%b' '\e[0m')"
|
||||||
|
Reference in New Issue
Block a user