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