Browse Source

Setup status bar for laptop

Export laptop packages.
red-hat-laptop
Kevin Mok 5 years ago
parent
commit
ab6887fe03
Signed by: Kevin-Mok GPG Key ID: AEA75288DC135CF5
  1. 3
      dot_config/chezmoi/chezmoi.toml.tmpl
  2. 61
      dot_config/i3blocks/i3blocks.conf.tmpl
  3. 4
      dot_config/i3blocks/scripts/executable_backlight
  4. 29
      dot_config/i3blocks/scripts/executable_wifi
  5. 2
      key_files.tmpl
  6. 36
      txt/x1-carbon-aur.txt
  7. 224
      txt/x1-carbon-pkgs.txt

3
dot_config/chezmoi/chezmoi.toml.tmpl

@ -2,4 +2,5 @@ sourceDir = "{{ .chezmoi.homedir }}/{{ .chezmoi.os }}-config"
[data]
gui = true
ext_kb = true
# ext_kb = true
ext_kb = false

61
dot_config/i3blocks/i3blocks.conf → dot_config/i3blocks/i3blocks.conf.tmpl

@ -5,21 +5,9 @@ command=~/.config/i3blocks/scripts/$BLOCK_NAME
separator=true
separator_block_width=25
markup=pango
# color=#d1e7ff
# color=#acc0cd
color=#cbe4ff
# color=$foreground
# color="${foreground}"
# color="$(echo $foreground)"
# [time]
# label=
# # label=🕓
# # command=date '+%H:%M.%a-%m-%d'
# interval=30
# # color=#acc0cd
{{ if eq .chezmoi.fullHostname "nzxt" }}
[volume]
interval=once
signal=1
@ -30,46 +18,63 @@ label=
LONG_NAME=
SHORT_NAME=
interval=5
{{ end }}
{{ if eq .chezmoi.fullHostname "x1-carbon" }}
[battery]
label=⚡
interval=30
[wifi]
label=
instance=wlp3s0
interval=10
[backlight]
label=
interval=5
{{ end }}
[calendar]
interval=30
label=
{{ if eq .chezmoi.fullHostname "nzxt" }}
DATEFMT=+%H:%M
{{ else }}
DATEFMT=+%H:%M.%a-%m-%d
{{ end }}
# SHORTFMT=+%H:%M:%S
HEIGHT=180
WIDTH=220
{{ if eq .chezmoi.fullHostname "nzxt" }}
[temperature]
label=
interval=5
# unbold this?
# [load_average]
# label=
# interval=5
# color=#990000
{{ end }}
[temperature]
label=
interval=5
# [cpu_usage -w 50 -c 80]
[cpu_usage]
label=
# color=#990000
interval=5
{{ if eq .chezmoi.fullHostname "nzxt" }}
[memory]
label=
# color=#3da061
interval=5
# [wifi]
# label=
# instance=wlp4s0
# interval=10
[name]
label=
interval=30
{{ end }}
# unused blocks {{{ #
# unused blocks #
# [memory]
# label=SWAP
@ -149,9 +154,9 @@ interval=30
#instance=NUM
#interval=once
#signal=11
# }}} unused blocks #
# unused blocks #
# list of properties {{{ #
# list of properties #
# i3blocks config file
#
# Please see man i3blocks for a complete reference!
@ -173,5 +178,5 @@ interval=30
# short_text
# signal
# urgent
# }}} properties #
# properties #

4
dot_config/i3blocks/scripts/executable_backlight

@ -5,5 +5,7 @@ round()
echo $(printf %.$2f $(echo "scale=$2;(((10^$2)*$1)+0.5)/(10^$2)" | bc))
};
. "/home/kevin/.cache/wal/colors.sh"
cur_bl=$(xbacklight -get)
echo "$(round "$cur_bl" 0)%"
# echo "$(round "$cur_bl" 0)%"
printf "$(round "$cur_bl" 0)\n\n%s\n" "$color7"

29
dot_config/i3blocks/scripts/executable_wifi

@ -17,6 +17,8 @@
#------------------------------------------------------------------------
INTERFACE="${BLOCK_INSTANCE:-wlan0}"
# echo $INTERFACE
# INTERFACE="${INSTANCE}"
#------------------------------------------------------------------------
@ -27,24 +29,23 @@ INTERFACE="${BLOCK_INSTANCE:-wlan0}"
#------------------------------------------------------------------------
QUALITY=$(sudo grep $INTERFACE /proc/net/wireless | awk '{ print int($3 * 100 / 70) }')
QUALITY=$(grep $INTERFACE /proc/net/wireless | awk '{ print int($3 * 100 / 70) }')
# echo $QUALITY
W_inter=$(ip link | grep "[1-9]: wlp" | cut -d " " -f2 | tr -d ':')
W_name=$(nmcli d | grep "$W_inter" | awk '{print $4}')
#------------------------------------------------------------------------
# echo $QUALITY% "$W_name" # full text
# echo $QUALITY% # short text
. "/home/kevin/.cache/wal/colors.sh"
printf "%s%%\n\n%s\n" $QUALITY $color7
echo $QUALITY% "$W_name" # full text
echo $QUALITY% # short text
# color
# if [[ $QUALITY -ge 80 ]]; then
# echo "#00FF00"
# elif [[ $QUALITY -lt 80 ]]; then
# echo "#FFF600"
# elif [[ $QUALITY -lt 60 ]]; then
# echo "#FFAE00"
# elif [[ $QUALITY -lt 40 ]]; then
# echo "#FF0000"
# fi
if [[ $QUALITY -ge 80 ]]; then
echo "#00FF00"
elif [[ $QUALITY -lt 80 ]]; then
echo "#FFF600"
elif [[ $QUALITY -lt 60 ]]; then
echo "#FFAE00"
elif [[ $QUALITY -lt 40 ]]; then
echo "#FF0000"
fi

2
key_files.tmpl

@ -1,7 +1,7 @@
# vim: fdm=indent
# sys *
3 ~/{{ .chezmoi.os }}-config/dot_config/i3/config
3 ~/{{ .chezmoi.os }}-config/dot_config/i3/config.tmpl
a ~/{{ .chezmoi.os }}-config/key_aliases.tmpl
dr ~/{{ .chezmoi.os }}-config/key_dirs.tmpl
f ~/{{ .chezmoi.os }}-config/key_files.tmpl

36
txt/x1-carbon-aur.txt

@ -0,0 +1,36 @@
bear
chezmoi
discord
gdm3setup-utils
godot
heroku-cli
i3blocks-git
insomnia
libc++
libc++abi
libc++experimental
mongodb-bin
nerd-fonts-dejavu-complete
qdirstat
spotify-now-git
texlive-local-algorithmicx
texlive-local-algorithms
texlive-local-biblatex
texlive-local-csquotes
texlive-local-enumitem
texlive-local-ifmtarg
texlive-local-logreq
texlive-local-multirow
texlive-local-numprint
texlive-local-pgfplots
texlive-local-siunitx
texlive-local-tkz-base
texlive-local-tkz-euclide
texlive-local-xifthen
texlive-localmanager-git
trizen
ttf-hack-powerline-git
watson
wpa_actiond
yad
yay

224
txt/x1-carbon-pkgs.txt

@ -0,0 +1,224 @@
acpi
alsa-utils
autoconf
automake
baobab
bash
bat
bc
biber
bzip2
certbot
cheese
chrome-gnome-shell
chromium
cmake
compton
coreutils
cryptsetup
device-mapper
dhcpcd
dialog
diffutils
dmenu
e2fsprogs
eog
epiphany
evince
fakeroot
fd
feh
file
file-roller
filesystem
findutils
firefox
fish
fzf
gawk
gcc
gcc-libs
gdm
gedit
gettext
git
glibc
gnome-backgrounds
gnome-boxes
gnome-calculator
gnome-calendar
gnome-characters
gnome-clocks
gnome-color-manager
gnome-contacts
gnome-control-center
gnome-dictionary
gnome-disk-utility
gnome-documents
gnome-font-viewer
gnome-getting-started-docs
gnome-keyring
gnome-logs
gnome-maps
gnome-menus
gnome-music
gnome-photos
gnome-remote-desktop
gnome-screenshot
gnome-session
gnome-settings-daemon
gnome-shell
gnome-shell-extensions
gnome-software
gnome-system-monitor
gnome-terminal
gnome-themes-extra
gnome-todo
gnome-tweaks
gnome-user-docs
gnome-user-share
gnome-video-effects
grep
grilo-plugins
grub
gvfs
gvfs-afc
gvfs-goa
gvfs-google
gvfs-gphoto2
gvfs-mtp
gvfs-nfs
gvfs-smb
gzip
highlight
htop
i3-gaps
i3status
imwheel
inetutils
iproute2
iputils
jdk8-openjdk
jfsutils
less
lib32-libglvnd
lib32-mesa
licenses
linux
linux-firmware
linux-headers
linux-lts
linux-lts-headers
logrotate
lolcat
lsd
lvm2
lxappearance
make
man-db
man-pages
mdadm
mousetweaks
mutter
nano
nautilus
neofetch
neovim
netctl
npm
ntfs-3g
ntp
orca
pacman
pacman-contrib
pass
pciutils
perl
pkgconf
procps-ng
psmisc
python-numpy
python-pip
python-pywal
python-setuptools
python2-pip
ranger
redshift
reiserfsprogs
ripgrep
rsync
rxvt-unicode
rygel
s-nail
scrot
sed
shadow
simple-scan
stow
sudo
sushi
sysfsutils
systemd-sysvcompat
tar
texinfo
texlive-core
tor
totem
tracker
tracker-miners
unzip
usbutils
util-linux
vi
vim
vino
virtualbox
w3m
wget
which
wireless_tools
wpa_supplicant
xclip
xdg-user-dirs-gtk
xdotool
xf86-input-libinput
xf86-input-synaptics
xf86-video-intel
xfsprogs
xorg-bdftopcf
xorg-iceauth
xorg-luit
xorg-mkfontscale
xorg-server
xorg-sessreg
xorg-smproxy
xorg-x11perf
xorg-xbacklight
xorg-xcmsdb
xorg-xcursorgen
xorg-xdpyinfo
xorg-xdriinfo
xorg-xev
xorg-xgamma
xorg-xhost
xorg-xinit
xorg-xinput
xorg-xkbevd
xorg-xkbutils
xorg-xkill
xorg-xlsatoms
xorg-xlsclients
xorg-xpr
xorg-xprop
xorg-xrandr
xorg-xrefresh
xorg-xset
xorg-xsetroot
xorg-xvinfo
xorg-xwd
xorg-xwininfo
xorg-xwud
yelp
zathura
zathura-pdf-poppler
zsh
Loading…
Cancel
Save