Compare commits

...

65 Commits

Author SHA1 Message Date
David JULIEN 2e3eaef75e
Merge branch 'dev' into gentoo 5 months ago
David JULIEN fea6a564d7 [mail] enhance scan for new mail 5 months ago
David JULIEN e3c84d3c78
Merge branch 'dev' into gentoo 5 months ago
David JULIEN d25e9a2e72
Merge branch 'dev' into gentoo 5 months ago
David JULIEN 56e2aaccaa
Merge branch 'dev' into gentoo 5 months ago
David JULIEN dc18ef2ac3
Merge branch 'dev' into gentoo 5 months ago
David JULIEN bd972a5c71
Merge branch 'dev' into gentoo 6 months ago
David JULIEN 03d5ef67ff
Merge branch 'dev' into gentoo 6 months ago
David JULIEN c982b10206
Merge branch 'dev' into gentoo 6 months ago
David JULIEN 701dbee2a1 [x11] prevent screenlock in every corner 6 months ago
David JULIEN 186732989f
Merge branch 'dev' into gentoo 6 months ago
David JULIEN e3a86f9f7a [scripts] feat : fetch infos more robust on wm 6 months ago
David JULIEN 912cd01977
Merge branch 'dev' into gentoo 6 months ago
David JULIEN 3e91d77a6a
Merge branch 'dev' into gentoo 6 months ago
David JULIEN 557c908e40
Merge branch 'dev' into gentoo 6 months ago
David JULIEN a6e9cc127a
Merge branch 'dev' into gentoo 6 months ago
David JULIEN 86d2612e25
Merge branch 'dev' into gentoo 7 months ago
David JULIEN ceccc122b7
Merge branch 'dev' into gentoo 7 months ago
David JULIEN ec2eda00b4
Merge branch 'dev' into gentoo 7 months ago
David JULIEN 546be92e48
Merge branch 'dev' into gentoo 7 months ago
David JULIEN 67bbfc215e
Merge branch 'dev' into gentoo 7 months ago
David JULIEN c159408d5e
Merge branch 'dev' into gentoo 7 months ago
David JULIEN 2804438e43
Merge branch 'dev' into gentoo 7 months ago
David JULIEN 6f3036b1f9
Merge branch 'dev' into gentoo 7 months ago
David JULIEN ef6412253b
Merge branch 'dev' into gentoo 7 months ago
David JULIEN 72b13bc4d9
Merge branch 'dev' into gentoo 7 months ago
David JULIEN 946888f096
Merge branch 'dev' into gentoo 7 months ago
David JULIEN 8b4f516857
Merge branch 'dev' into gentoo 7 months ago
David JULIEN 2410c5db58
Merge branch 'dev' into gentoo 7 months ago
David JULIEN c3741dbac7
Merge branch 'dev' into gentoo 7 months ago
David JULIEN a55a937bf0
Merge branch 'dev' into gentoo 7 months ago
David JULIEN 479168e629
Merge branch 'dev' into gentoo 7 months ago
David JULIEN 67c6462ab0
Merge branch 'dev' into gentoo 7 months ago
David JULIEN 64e5f011cb
Merge branch 'dev' into gentoo 7 months ago
David JULIEN d1ee18cb51
Merge branch 'dev' into gentoo 8 months ago
David JULIEN bcf6011eb5 fix: no need for logs 8 months ago
David JULIEN 40969de078
Merge branch 'dev' into gentoo 8 months ago
David JULIEN 121d454e19
Merge branch 'dev' into gentoo 8 months ago
David JULIEN 00bb07a373 feat: add TS Parsers for latex and verilog 8 months ago
David JULIEN b52234755e feat: show $SHELL version 8 months ago
David JULIEN 4f13e34eee Merge branch 'dev' into gentoo 8 months ago
David JULIEN c10032441c feat: delay screenlock (1 -> 5 min) 8 months ago
David JULIEN a6faec308b feat: display package manager 8 months ago
David JULIEN 39fe2c3a69
Merge branch 'dev' into gentoo 8 months ago
David JULIEN ae2227f468 feat: update aliases 8 months ago
David JULIEN 448e9613a0
Merge branch 'dev' into gentoo 8 months ago
David JULIEN e4e7c6ed4d
Merge branch 'dev' into gentoo 8 months ago
David JULIEN 10fafee5fd
Merge branch 'dev' into gentoo 8 months ago
David JULIEN 823d329246 fix: lsp icons 8 months ago
David JULIEN 9124f8bf46 feat: trying xautolock 8 months ago
David JULIEN 2306f88f57 fix: change icons 8 months ago
David JULIEN 6cf0718787 fix: icons 8 months ago
David JULIEN 7453de3393 fix: icons 8 months ago
David JULIEN e5d3b5ffb5 Merge branch 'dev' into gentoo 8 months ago
David JULIEN 1d47841bfe fix: sb-torrent icons 8 months ago
David JULIEN e7dc5a17df fix: use xcape instead of xmodmap to swap keys 8 months ago
David JULIEN bf8804a467 feat: better handle 2 batteries 8 months ago
David JULIEN 0aa8c15431 fix: icons 8 months ago
David JULIEN 8c0da4f9b6 feat: use elogind to suspend/shutdo<wn/reboot 8 months ago
David JULIEN 91bee9981d fix: mpd startup and statusbar music block 8 months ago
David JULIEN b71f77f9c8 fix: zsh highlighing and history search 8 months ago
David JULIEN 4ab01e6c5b
cleanup: remove useless files 8 months ago
David JULIEN 7565ea3ae0 feat: adapt `fetch` to gentoo 8 months ago
David JULIEN 754f46f7c6 Merge branch 'dev' into gentoo 8 months ago
David JULIEN 4236c85f20
feat: introducing gentoo on ThinkPad 8 months ago
  1. 9
      .config/X11/xprofile
  2. 8
      .config/X11/xresources
  3. 122
      .config/dunst/dunstrc
  4. 2
      .config/nvim/lua/plugin/treesitter.lua
  5. 12
      .config/pacman/hooks/cache_cleanup.hook
  6. 11
      .config/pacman/hooks/dashbinsh.hook
  7. 10
      .config/pacman/hooks/pkglist.hook
  8. 29
      .config/paru/paru.conf
  9. 110
      .config/paru/pkglist.txt
  10. 55
      .config/root/etc_default_grub
  11. 101
      .config/root/etc_pacman.conf
  12. 473
      .config/root/etc_tlp.conf
  13. 6
      .config/root/etc_x11_xorg.conf.d/00-keyboard.conf
  14. 16
      .config/sxhkd/sxhkdrc
  15. 7
      .config/zsh/.zprofile
  16. 4
      .config/zsh/.zshrc
  17. 34
      .local/bin/fetch
  18. 6
      .local/bin/mailsync
  19. 1
      .local/bin/statusbar/sb-battery
  20. 4
      .local/bin/statusbar/sb-internet
  21. 6
      .local/bin/statusbar/sb-mailbox
  22. 2
      .local/bin/statusbar/sb-music
  23. 2
      .local/bin/statusbar/sb-torrent
  24. 15
      .local/bin/statusbar/sb-volume
  25. 2
      .local/bin/transadd
  26. 3
      .zshenv

9
.config/X11/xprofile

@ -5,22 +5,19 @@
# session launch
eval $(dbus-launch --sh-syntax --exit-with-session)
xss-lock -- slock &
redshift &
dunst &> /dev/null & #temp fix
# MPD daemon start (if no other user instance exists)
[ ! -s "$XDG_CONFIG_HOME/mpd/pid" ] && mpd
[ -z "$(pidof mpd)" ] && mpd
[ -z "$(pgrep -f sb-mpdup)" ] && sb-mpdup &
pulsemixer --set-volume 50
sbacklight set 3 &
setbg &
dwmblocks &
xrdb "$XDG_CONFIG_HOME/X11/xresources"
xrdb -merge "$XDG_STATE_HOME/xcolors"
xautolock -locker slock -time 5 -corners 000- &
xautolock -locker slock -time 5 -corners ---- &
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 &
sxhkd &

8
.config/X11/xresources

@ -1,13 +1,13 @@
!! 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
/* dwm config */
dwm.borderpx: 2
dwm.gappx: 15
/* 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

122
.config/dunst/dunstrc

@ -1,5 +1,3 @@
# See dunst(5) for all configuration options
[global]
### Display ###
@ -19,32 +17,21 @@
# will be ignored.
follow = keyboard
### Geometry ###
# dynamic width from 0 to 300
# width = (0, 300)
# constant width of 300
width = 450
# The maximum height of a single notification, excluding the frame.
height = 300
# Position the notification in the top right corner
origin = top-right
# Offset from the origin
offset = 25x47
# Scale factor. It is auto-detected if value is 0.
scale = 0
# Maximum number of notification (0 means no limit)
notification_limit = 0
### Progress bar ###
# Turn on the progess bar. It appears when a progress hint is passed with
# for example dunstify -h int:value:12
# The geometry of the window:
# [{width}]x{height}[+/-{x}+/-{y}]
# The geometry of the message window.
# The height is measured in number of notifications everything else
# in pixels. If the width is omitted but the height is given
# ("-geometry x2"), the message window expands over the whole screen
# (dmenu-like). If width is 0, the window expands to the longest
# message displayed. A positive x is measured from the left, a
# negative from the right side of the screen. Y is measured from
# the top and down respectively.
# The width can be negative. In this case the actual width is the
# screen width minus the width defined in within the geometry option.
geometry = "450x300-25+47"
# Turn on the progess bar
progress_bar = true
# Set the progress bar height. This includes the frame, so make sure
@ -61,15 +48,23 @@
progress_bar_max_width = 300
# Show how many messages are currently hidden (because of
# notification_limit).
# Show how many messages are currently hidden (because of geometry).
indicate_hidden = yes
# Shrink window if it's smaller than the width. Will be ignored if
# width is 0.
shrink = no
# The transparency of the window. Range: [0; 100].
# This option will only work if a compositing window manager is
# present (e.g. xcompmgr, compiz, etc.). (X11 only)
# present (e.g. xcompmgr, compiz, etc.).
transparency = 0
# The height of the entire notification. If the height is smaller
# than the font height and padding combined, it will be raised
# to the font height and padding.
notification_height = 0
# Draw a line of "separator_height" pixel height between two
# notifications.
# Set to 0 to disable.
@ -107,11 +102,11 @@
# Set to 0 to disable.
# A client can set the 'transient' hint to bypass this. See the rules
# section for how to disable this if necessary
# idle_threshold = 120
idle_threshold = 120
### Text ###
font = Iosevka Fixed Slab 14
font = Fira Code 12
# The spacing between lines. If the height is smaller than the
# font height, it will get raised to the font height.
@ -166,7 +161,11 @@
# Set to -1 to disable.
show_age_threshold = -1
# Specify where to make an ellipsis in long lines.
# Split notifications into multiple lines if they don't fit into
# geometry.
word_wrap = yes
# When word_wrap is set to no, specify where to make an ellipsis in long lines.
# Possible values are "start", "middle" and "end".
ellipsize = middle
@ -213,7 +212,7 @@
dmenu = /usr/bin/dmenu -p dunst:
# Browser for opening urls in context menu.
browser = /usr/bin/xdg-open
browser = /usr/bin/firefox -new-tab
# Always run rule-defined scripts, even if the notification is suppressed
always_run_script = true
@ -224,6 +223,20 @@
# Define the class of the windows spawned by dunst
class = Dunst
# Print a notification on startup.
# This is mainly for error detection, since dbus (re-)starts dunst
# automatically after a crash.
startup_notification = false
# Manage dunst's desire for talking
# Can be one of the following values:
# crit: Critical features. Dunst aborts
# warn: Only non-fatal warnings
# mesg: Important Messages
# info: all unimportant stuff
# debug: all less than unimportant stuff
verbosity = mesg
# Define the corner radius of the notification window
# in pixel size. If the radius is 0, you have no rounded
# corners.
@ -264,14 +277,10 @@
# Defines list of actions for each mouse event
# Possible values are:
# * none: Don't do anything.
# * do_action: Invoke the action determined by the action_name rule. If there is no
# such action, open the context menu.
# * open_url: If the notification has exactly one url, open it. If there are multiple
# ones, open the context menu.
# * do_action: If the notification has exactly one action, or one is marked as default,
# invoke it. If there are multiple and no default, open the context menu.
# * close_current: Close current notification.
# * close_all: Close all notifications.
# * context: Open context menu for the notification.
# * context_all: Open context menu for all notifications.
# These values can be strung together for each mouse event, and
# will be executed in sequence.
mouse_left_click = close_current
@ -288,6 +297,32 @@
# where there are multiple screens with very different dpi values.
per_monitor_dpi = false
# The internal keyboard shortcut support in dunst is now considered deprecated
# and should be replaced by dunstctl calls. You can use the configuration of your
# WM or DE to bind these to shortcuts of your choice.
# Check the dunstctl manual page for more info.
[shortcuts]
# Shortcuts are specified as [modifier+][modifier+]...key
# Available modifiers are "ctrl", "mod1" (the alt-key), "mod2",
# "mod3" and "mod4" (windows-key).
# Xev might be helpful to find names for keys.
# Close notification. Equivalent dunstctl command:
# dunstctl close
# close = ctrl+space
# Close all notifications. Equivalent dunstctl command:
# dunstctl close-all
# close_all = ctrl+shift+space
# Redisplay last message(s). Equivalent dunstctl command:
# dunstctl history-pop
# history = ctrl+grave
# Context menu. Equivalent dunstctl command:
# dunstctl context
# context = ctrl+shift+period
[urgency_low]
# IMPORTANT: colors have to be defined in quotation marks.
@ -340,7 +375,6 @@
# set_transient
# timeout
# urgency
# action_name
#
# Shell-like globbing will get expanded.
#
@ -355,6 +389,8 @@
# script appname summary body icon urgency
# where urgency can be "LOW", "NORMAL" or "CRITICAL".
#
# NOTE: if you don't want a notification to be displayed, set the format
# to "".
# NOTE: It might be helpful to run dunst -print in a terminal in order
# to find fitting options for rules.
@ -393,7 +429,7 @@
#[ignore]
# # This notification will not be displayed
# summary = "foobar"
# skip_display = true
# format = ""
#[history-ignore]
# # This notification will not be saved in history

2
.config/nvim/lua/plugin/treesitter.lua

@ -4,7 +4,7 @@
-- Description : treesitter config file
require("nvim-treesitter.configs").setup {
ensure_installed = { "c", "lua", "python", "bash" },
ensure_installed = { "c", "lua", "python", "bash", "latex", "verilog" },
ignore_install = { "javascript" },
highlight = {
enable = true,

12
.config/pacman/hooks/cache_cleanup.hook

@ -1,12 +0,0 @@
[Trigger]
Operation = Remove
Operation = Install
Operation = Upgrade
Type = Package
Target = *
[Action]
Description = Keep the last cache and the currently installed...
Depends = pacman-contrib
When = PostTransaction
Exec = /usr/bin/paccache -rvk2

11
.config/pacman/hooks/dashbinsh.hook

@ -1,11 +0,0 @@
[Trigger]
Type = Package
Operation = Install
Operation = Upgrade
Target = bash
[Action]
Description = Re-pointing /bin/sh symlink to dash...
When = PostTransaction
Exec = /usr/bin/ln -sfT dash /usr/bin/sh
Depends = dash

10
.config/pacman/hooks/pkglist.hook

@ -1,10 +0,0 @@
[Trigger]
Operation = Remove
Operation = Install
Type = Package
Target = *
[Action]
Description = Update the pkglist...
When = PostTransaction
Exec = /bin/sh -c '/usr/bin/pacman -Qqe > /home/swytch/.config/paru/pkglist.txt'

29
.config/paru/paru.conf

@ -1,29 +0,0 @@
#
# $PARU_CONF
# /etc/paru.conf
# ~/.config/paru/paru.conf
#
# See the paru.conf(5) manpage for options
#
# GENERAL OPTIONS
#
[options]
PgpFetch
Devel
Provides
DevelSuffixes = -git -cvs -svn -bzr -darcs -always
BottomUp
RemoveMake
SudoLoop
#UseAsk
#CombinedUpgrade
#CleanAfter
#UpgradeMenu
NewsOnUpgrade
#
# Binary OPTIONS
#
#[bin]
#FileManager = vifm

110
.config/paru/pkglist.txt

@ -1,110 +0,0 @@
abcde
abook
adobe-source-han-sans-cn-fonts
adobe-source-han-sans-jp-fonts
alsa-plugins
alsa-utils
android-tools
android-udev
arandr
autoconf
automake
autorandr
base
beets
binutils
bison
capitaine-cursors
cdparanoia
clang
cmake
cronie
dash
dunst
efibootmgr
fakeroot
file
findutils
firefox
flex
gawk
gcc
gettext
git
grep
groff
grub
gsasl
gzip
htop
imagemagick
isync
iwd
jedi-language-server
libnotify
libtool
linux
linux-firmware
linux-lts
lynx
m4
make
man-db
mpc
mpd
mpv
msmtp
ncmpcpp
neomutt
ninja
nnn
notmuch
pacman
pacman-contrib
pam-gnupg
paru
pass
patch
pkgconf
pulseaudio-alsa
pulsemixer
python-eyed3
python-requests
redshift
sed
shotgun
sox
sudo
sxhkd
sxiv
texinfo
texlab
texlive-bibtexextra
texlive-core
texlive-latexextra
transmission-cli
tree-sitter
tremc
ttf-dejavu
ttf-fira-sans
ttf-iosevka-fixed-slab
ttf-nerd-fonts-symbols-mono
unzip
upower
usbutils
which
xcape
xclip
xf86-video-intel
xorg-server
xorg-xinit
xorg-xinput
xorg-xsetroot
xss-lock
xwallpaper
zathura
zathura-pdf-mupdf
zip
zsh
zsh-history-substring-search
zsh-syntax-highlighting

55
.config/root/etc_default_grub

@ -1,55 +0,0 @@
# GRUB boot loader configuration
GRUB_DEFAULT="2"
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="Arch"
GRUB_CMDLINE_LINUX_DEFAULT="quiet i915.enable_fbc=0"
GRUB_CMDLINE_LINUX=""
GRUB_DISABLE_SUBMENU=y
# Preload both GPT and MBR modules so that they are not missed
GRUB_PRELOAD_MODULES="part_gpt part_msdos"
# Uncomment to enable booting from LUKS encrypted devices
#GRUB_ENABLE_CRYPTODISK=y
# Uncomment to enable Hidden Menu, and optionally hide the timeout count
#GRUB_HIDDEN_TIMEOUT=5
#GRUB_HIDDEN_TIMEOUT_QUIET=true
# Uncomment to use basic console
GRUB_TERMINAL_INPUT=console
# Uncomment to disable graphical terminal
#GRUB_TERMINAL_OUTPUT=console
# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
GRUB_GFXMODE=auto
# Uncomment to allow the kernel use the same resolution used by grub
GRUB_GFXPAYLOAD_LINUX=keep
# Uncomment if you want GRUB to pass to the Linux kernel the old parameter
# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx"
#GRUB_DISABLE_LINUX_UUID=true
# Uncomment to disable generation of recovery mode menu entries
GRUB_DISABLE_RECOVERY=true
# Uncomment and set to the desired menu colors. Used by normal and wallpaper
# modes only. Entries specified as foreground/background.
#GRUB_COLOR_NORMAL="light-blue/black"
#GRUB_COLOR_HIGHLIGHT="light-cyan/blue"
# Uncomment one of them for the gfx desired, a image background or a gfxtheme
#GRUB_BACKGROUND="/path/to/wallpaper"
#GRUB_THEME="/path/to/gfxtheme"
# Uncomment to get a beep at GRUB start
#GRUB_INIT_TUNE="480 440 1"
# Uncomment to make GRUB remember the last selection. This requires to
# set 'GRUB_DEFAULT=saved' above.
#GRUB_SAVEDEFAULT="true"

101
.config/root/etc_pacman.conf

@ -1,101 +0,0 @@
#
# /etc/pacman.conf
#
# See the pacman.conf(5) manpage for option and repository directives
#
# GENERAL OPTIONS
#
[options]
# The following paths are commented out with their default values listed.
# If you wish to use different paths, uncomment and update the paths.
#RootDir = /
#DBPath = /var/lib/pacman/
#CacheDir = /var/cache/pacman/pkg/
#LogFile = /var/log/pacman.log
#GPGDir = /etc/pacman.d/gnupg/
HookDir = /home/swytch/.config/pacman/hooks
HoldPkg = pacman glibc
#XferCommand = /usr/bin/curl -L -C - -f -o %o %u
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
#CleanMethod = KeepInstalled
#UseDelta = 0.7
Architecture = auto
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
#IgnorePkg =
#IgnoreGroup =
#NoUpgrade =
#NoExtract =
# Misc options
#UseSyslog
Color
TotalDownload
CheckSpace
VerbosePkgLists
# By default, pacman accepts packages signed by keys that its local keyring
# trusts (see pacman-key and its man page), as well as unsigned packages.
SigLevel = Required DatabaseOptional
LocalFileSigLevel = Optional
#RemoteFileSigLevel = Required
# NOTE: You must run `pacman-key --init` before first using pacman; the local
# keyring can then be populated with the keys of all official Arch Linux
# packagers with `pacman-key --populate archlinux`.
#
# REPOSITORIES
# - can be defined here or included from another file
# - pacman will search repositories in the order defined here
# - local/custom mirrors can be added here or in separate files
# - repositories listed first will take precedence when packages
# have identical names, regardless of version number
# - URLs will have $repo replaced by the name of the current repo
# - URLs will have $arch replaced by the name of the architecture
#
# Repository entries are of the format:
# [repo-name]
# Server = ServerName
# Include = IncludePath
#
# The header [repo-name] is crucial - it must be present and
# uncommented to enable the repo.
#
# The testing repositories are disabled by default. To enable, uncomment the
# repo name header and Include lines. You can add preferred servers immediately
# after the header, and they will be used before the default mirrors.
#[testing]
#Include = /etc/pacman.d/mirrorlist
[core]
Include = /etc/pacman.d/mirrorlist
[extra]
Include = /etc/pacman.d/mirrorlist
#[community-testing]
#Include = /etc/pacman.d/mirrorlist
[community]
Include = /etc/pacman.d/mirrorlist
# If you want to run 32 bit applications on your x86_64 system,
# enable the multilib repositories as required here.
#[multilib-testing]
#Include = /etc/pacman.d/mirrorlist
#[multilib]
#Include = /etc/pacman.d/mirrorlist
# An example of a custom package repository. See the pacman manpage for
# tips on creating your own repositories.
#[custom]
#SigLevel = Optional TrustAll
#Server = file:///home/custompkgs

473
.config/root/etc_tlp.conf

@ -1,473 +0,0 @@
# ------------------------------------------------------------------------------
# /etc/tlp.conf - TLP user configuration
# See full explanation: https://linrunner.de/en/tlp/docs/tlp-configuration.html
#
# New configuration scheme (TLP 1.3). Settings are read in the following order:
# 1. Intrinsic defaults
# 2. /etc/tlp.d/*.conf - Drop-in customization snippets
# 3. /etc/tlp.conf - User configuration (this file)
#
# Notes:
# - In case of identical parameters, the last occurence has precedence
# - This also means, parameters enabled here will override anything else
# - IMPORTANT: all parameters here are disabled, remove the leading '#'
# to enable them; shown values may be suggestions rather than defaults
# - Default *: intrinsic default that is effective when the parameter is missing
# or disabled by a leading '#'; use PARAM="" to disable an intrinsic default
# - Default <none>: do nothing or use kernel/hardware defaults
# ------------------------------------------------------------------------------
# tlp - Parameters for power saving
# Set to 0 to disable, 1 to enable TLP.
# Default: 1
#TLP_ENABLE=1
# Operation mode when no power supply can be detected: AC, BAT.
# Concerns some desktop and embedded hardware only.
# Default: <none>
#TLP_DEFAULT_MODE=AC
# Operation mode select: 0=depend on power source, 1=always use TLP_DEFAULT_MODE
# Note: use in conjunction with TLP_DEFAULT_MODE=BAT for BAT settings on AC.
# Default: 0
#TLP_PERSISTENT_DEFAULT=0
# Power supply class to ignore when determining operation mode: AC, BAT.
# Note: try on laptops where operation mode AC/BAT is incorrectly detected.
# Default: <none>
#TLP_PS_IGNORE=BAT
# Seconds laptop mode has to wait after the disk goes idle before doing a sync.
# Non-zero value enables, zero disables laptop mode.
# Default: 0 (AC), 2 (BAT)
#DISK_IDLE_SECS_ON_AC=0
#DISK_IDLE_SECS_ON_BAT=2
# Dirty page values (timeouts in secs).
# Default: 15 (AC), 60 (BAT)
#MAX_LOST_WORK_SECS_ON_AC=15
#MAX_LOST_WORK_SECS_ON_BAT=60
# Note: CPU parameters below are disabled by default, remove the leading #
# to enable them, otherwise kernel defaults will be used.
#
# Select a CPU frequency scaling governor.
# Intel Core i processor with intel_pstate driver:
# powersave(*), performance.
# Other hardware with acpi-cpufreq driver:
# ondemand(*), powersave, performance, conservative, schedutil.
# (*) is recommended.
# Use tlp-stat -p to show the active driver and available governors.
# Important:
# powersave for intel_pstate and ondemand for acpi-cpufreq are power
# efficient for *almost all* workloads and therefore kernel and most
# distributions have chosen them as defaults. If you still want to change,
# you should know what you're doing!
# Default: <none>
#CPU_SCALING_GOVERNOR_ON_AC=powersave
#CPU_SCALING_GOVERNOR_ON_BAT=powersave
# Set the min/max frequency available for the scaling governor.
# Possible values depend on your CPU. For available frequencies see
# the output of tlp-stat -p.
# Default: <none>
#CPU_SCALING_MIN_FREQ_ON_AC=0
#CPU_SCALING_MAX_FREQ_ON_AC=0
#CPU_SCALING_MIN_FREQ_ON_BAT=0
#CPU_SCALING_MAX_FREQ_ON_BAT=0
# Set Intel CPU energy/performance policies HWP.EPP and EPB:
# performance, balance_performance, default, balance_power, power
# Values are given in order of increasing power saving.
# Notes:
# - Requires an Intel Core i processor
# - HWP.EPP requires kernel 4.10 and intel_pstate driver
# - EPB requires kernel 5.2 or module msr and x86_energy_perf_policy
# from linux-tools
# - When HWP.EPP is available, EPB is not set
# Default: balance_performance (AC), balance_power (BAT)
#CPU_ENERGY_PERF_POLICY_ON_AC=balance_performance
#CPU_ENERGY_PERF_POLICY_ON_BAT=balance_power
# Set Intel CPU P-state performance: 0..100 (%).
# Limit the max/min P-state to control the power dissipation of the CPU.
# Values are stated as a percentage of the available performance.
# Requires an Intel Core i processor with intel_pstate driver.
# Default: <none>
#CPU_MIN_PERF_ON_AC=0
#CPU_MAX_PERF_ON_AC=100
#CPU_MIN_PERF_ON_BAT=0
#CPU_MAX_PERF_ON_BAT=30
# Set the CPU "turbo boost" feature: 0=disable, 1=allow
# Requires an Intel Core i processor.
# Important:
# - This may conflict with your distribution's governor settings
# - A value of 1 does *not* activate boosting, it just allows it
# Default: <none>
#CPU_BOOST_ON_AC=1
#CPU_BOOST_ON_BAT=0
# Minimize number of used CPU cores/hyper-threads under light load conditions:
# 0=disable, 1=enable.
# Default: 0 (AC), 1 (BAT)
#SCHED_POWERSAVE_ON_AC=0
#SCHED_POWERSAVE_ON_BAT=1
# Kernel NMI Watchdog:
# 0=disable (default, saves power), 1=enable (for kernel debugging only).
# Default: 0
#NMI_WATCHDOG=0
# Change CPU voltages aka "undervolting" - Kernel with PHC patch required.
# Frequency voltage pairs are written to:
# /sys/devices/system/cpu/cpu0/cpufreq/phc_controls
# CAUTION: only use this, if you thoroughly understand what you are doing!
# Default: <none>.
#PHC_CONTROLS="F:V F:V F:V F:V"
# Disk devices; separate multiple devices with spaces.
# Devices can be specified by disk ID also (lookup with: tlp diskid).
# Note: DISK parameters below are effective only when this option is configured.
# Default: "nvme0n1 sda"
#DISK_DEVICES="nvme0n1 sda"
# Disk advanced power management level: 1..254, 255 (max saving, min, off).
# Levels 1..127 may spin down the disk; 255 allowable on most drives.
# Separate values for multiple disks with spaces. Use the special value 'keep'
# to keep the hardware default for the particular disk.
# Default: 254 (AC), 128 (BAT)
#DISK_APM_LEVEL_ON_AC="254 254"
#DISK_APM_LEVEL_ON_BAT="128 128"
# Hard disk spin down timeout:
# 0: spin down disabled
# 1..240: timeouts from 5s to 20min (in units of 5s)
# 241..251: timeouts from 30min to 5.5 hours (in units of 30min)
# See 'man hdparm' for details.
# Separate values for multiple disks with spaces. Use the special value 'keep'
# to keep the hardware default for the particular disk.
# Default: <none>
#DISK_SPINDOWN_TIMEOUT_ON_AC="0 0"
#DISK_SPINDOWN_TIMEOUT_ON_BAT="0 0"
# Select I/O scheduler for the disk devices.
# Multi queue (blk-mq) schedulers:
# mq-deadline(*), none, kyber, bfq
# Single queue schedulers:
# deadline(*), cfq, bfq, noop
# (*) recommended.
# Separate values for multiple disks with spaces. Use the special value 'keep'
# to keep the kernel default scheduler for the particular disk.
# Notes:
# - Multi queue (blk-mq) may need kernel boot option 'scsi_mod.use_blk_mq=1'
# and 'modprobe mq-deadline-iosched|kyber|bfq' on kernels < 5.0
# - Single queue schedulers are legacy now and were removed together with
# the old block layer in kernel 5.0
# Default: keep
#DISK_IOSCHED="mq-deadline mq-deadline"
# AHCI link power management (ALPM) for disk devices:
# min_power, med_power_with_dipm(*), medium_power, max_performance.
# (*) Kernel >= 4.15 required, then recommended.
# Multiple values separated with spaces are tried sequentially until success.
# Default:
# - "med_power_with_dipm max_performance" (AC)
# - "med_power_with_dipm min_power" (BAT)
#SATA_LINKPWR_ON_AC="med_power_with_dipm max_performance"
#SATA_LINKPWR_ON_BAT="med_power_with_dipm min_power"
# Exclude host devices from AHCI link power management.
# Separate multiple hosts with spaces.
# Default: <none>
#SATA_LINKPWR_BLACKLIST="host1"
# Runtime Power Management for AHCI host and disks devices:
# on=disable, auto=enable.
# EXPERIMENTAL ** WARNING: auto may cause system lockups/data loss.
# Default: <none>
#AHCI_RUNTIME_PM_ON_AC=on
#AHCI_RUNTIME_PM_ON_BAT=on
# Seconds of inactivity before disk is suspended.
# Note: effective only when AHCI_RUNTIME_PM_ON_AC/BAT is activated.
# Default: 15
#AHCI_RUNTIME_PM_TIMEOUT=15
# PCI Express Active State Power Management (PCIe ASPM):
# default(*), performance, powersave, powersupersave.
# (*) keeps BIOS ASPM defaults (recommended)
# Default: <none>
#PCIE_ASPM_ON_AC=default
#PCIE_ASPM_ON_BAT=default
# Set the min/max/turbo frequency for the Intel GPU.
# Possible values depend on your hardware. For available frequencies see
# the output of tlp-stat -g.
# Default: <none>
#INTEL_GPU_MIN_FREQ_ON_AC=0
#INTEL_GPU_MIN_FREQ_ON_BAT=0
#INTEL_GPU_MAX_FREQ_ON_AC=0
#INTEL_GPU_MAX_FREQ_ON_BAT=0
#INTEL_GPU_BOOST_FREQ_ON_AC=0
#INTEL_GPU_BOOST_FREQ_ON_BAT=0
# Radeon graphics clock speed (profile method): low, mid, high, auto, default;
# auto = mid on BAT, high on AC.
# Default: default
#RADEON_POWER_PROFILE_ON_AC=default
#RADEON_POWER_PROFILE_ON_BAT=default
# Radeon dynamic power management method (DPM): battery, performance.
# Default: <none>
#RADEON_DPM_STATE_ON_AC=performance
#RADEON_DPM_STATE_ON_BAT=battery
# Radeon DPM performance level: auto, low, high; auto is recommended.
# Note: effective only when RADEON_DPM_STATE_ON_AC/BAT is activated.
# Default: auto
#RADEON_DPM_PERF_LEVEL_ON_AC=auto
#RADEON_DPM_PERF_LEVEL_ON_BAT=auto
# WiFi power saving mode: on=enable, off=disable; not supported by all adapters.
# Default: off (AC), on (BAT)
#WIFI_PWR_ON_AC=off
#WIFI_PWR_ON_BAT=on
# Disable wake on LAN: Y/N.
# Default: Y
#WOL_DISABLE=Y
# Enable audio power saving for Intel HDA, AC97 devices (timeout in secs).
# A value of 0 disables, >=1 enables power saving (recommended: 1).
# Default: 0 (AC), 1 (BAT)
#SOUND_POWER_SAVE_ON_AC=0
#SOUND_POWER_SAVE_ON_BAT=1
# Disable controller too (HDA only): Y/N.
# Note: effective only when SOUND_POWER_SAVE_ON_AC/BAT is activated.
# Default: Y
#SOUND_POWER_SAVE_CONTROLLER=Y
# Power off optical drive in UltraBay/MediaBay: 0=disable, 1=enable.
# Drive can be powered on again by releasing (and reinserting) the eject lever
# or by pressing the disc eject button on newer models.
# Note: an UltraBay/MediaBay hard disk is never powered off.
# Default: 0
#BAY_POWEROFF_ON_AC=0
#BAY_POWEROFF_ON_BAT=0
# Optical drive device to power off
# Default: sr0
#BAY_DEVICE="sr0"
# Runtime Power Management for PCI(e) bus devices: on=disable, auto=enable.
# Default: on (AC), auto (BAT)
#RUNTIME_PM_ON_AC=on
#RUNTIME_PM_ON_BAT=auto
# Exclude PCI(e) device adresses the following list from Runtime PM
# (separate with spaces). Use lspci to get the adresses (1st column).
# Default: <none>
#RUNTIME_PM_BLACKLIST="bb:dd.f 11:22.3 44:55.6"
# Exclude PCI(e) devices assigned to the listed drivers from Runtime PM.
# Default when unconfigured is "amdgpu nouveau nvidia radeon" which
# prevents accidential power-on of dGPU in hybrid graphics setups.
# Separate multiple drivers with spaces.
# Default: "amdgpu mei_me nouveau nvidia pcieport radeon", use "" to disable
# completely.
#RUNTIME_PM_DRIVER_BLACKLIST="amdgpu mei_me nouveau nvidia pcieport radeon"
# Set to 0 to disable, 1 to enable USB autosuspend feature.
# Default: 1
#USB_AUTOSUSPEND=1
# Exclude listed devices from USB autosuspend (separate with spaces).
# Use lsusb to get the ids.
# Note: input devices (usbhid) are excluded automatically
# Default: <none>
#USB_BLACKLIST="1111:2222 3333:4444"
# Bluetooth devices are excluded from USB autosuspend:
# 0=do not exclude, 1=exclude.
# Default: 0
#USB_BLACKLIST_BTUSB=0
# Phone devices are excluded from USB autosuspend:
# 0=do not exclude, 1=exclude (enable charging).
# Default: 0
#USB_BLACKLIST_PHONE=0
# Printers are excluded from USB autosuspend:
# 0=do not exclude, 1=exclude.
# Default: 1
#USB_BLACKLIST_PRINTER=1
# WWAN devices are excluded from USB autosuspend:
# 0=do not exclude, 1=exclude.
# Default: 0
#USB_BLACKLIST_WWAN=0
# Include listed devices into USB autosuspend even if already excluded
# by the blacklists above (separate with spaces). Use lsusb to get the ids.
# Default: <none>
#USB_WHITELIST="1111:2222 3333:4444"
# Set to 1 to disable autosuspend before shutdown, 0 to do nothing
# Note: use as a workaround for USB devices that cause shutdown problems.
# Default: 0
#USB_AUTOSUSPEND_DISABLE_ON_SHUTDOWN=0
# Restore radio device state (Bluetooth, WiFi, WWAN) from previous shutdown
# on system startup: 0=disable, 1=enable.
# Note: the parameters DEVICES_TO_DISABLE/ENABLE_ON_STARTUP/SHUTDOWN below
# are ignored when this is enabled.
# Default: 0
#RESTORE_DEVICE_STATE_ON_STARTUP=0
# Radio devices to disable on startup: bluetooth, wifi, wwan.
# Separate multiple devices with spaces.
# Default: <none>
#DEVICES_TO_DISABLE_ON_STARTUP="bluetooth wifi wwan"
# Radio devices to enable on startup: bluetooth, wifi, wwan.
# Separate multiple devices with spaces.
# Default: <none>
#DEVICES_TO_ENABLE_ON_STARTUP="wifi"
# Radio devices to disable on shutdown: bluetooth, wifi, wwan.
# Note: use as a workaround for devices that are blocking shutdown.
# Default: <none>
#DEVICES_TO_DISABLE_ON_SHUTDOWN="bluetooth wifi wwan"
# Radio devices to enable on shutdown: bluetooth, wifi, wwan.
# (to prevent other operating systems from missing radios).
# Default: <none>
#DEVICES_TO_ENABLE_ON_SHUTDOWN="wwan"
# Radio devices to enable on AC: bluetooth, wifi, wwan.
# Default: <none>
#DEVICES_TO_ENABLE_ON_AC="bluetooth wifi wwan"
# Radio devices to disable on battery: bluetooth, wifi, wwan.
# Default: <none>
#DEVICES_TO_DISABLE_ON_BAT="bluetooth wifi wwan"
# Radio devices to disable on battery when not in use (not connected):
# bluetooth, wifi, wwan.
# Default: <none>
#DEVICES_TO_DISABLE_ON_BAT_NOT_IN_USE="bluetooth wifi wwan"
# Battery charge thresholds (ThinkPad only).
# May require external kernel module(s), refer to the output of tlp-stat -b.
# Charging starts when the remaining capacity falls below the
# START_CHARGE_THRESH value and stops when exceeding the STOP_CHARGE_THRESH
# value.
# Main / Internal battery (values in %)
# Default: <none>
#START_CHARGE_THRESH_BAT0=75
#STOP_CHARGE_THRESH_BAT0=80
# Ultrabay / Slice / Replaceable battery (values in %)
# Default: <none>
#START_CHARGE_THRESH_BAT1=75
#STOP_CHARGE_THRESH_BAT1=80
# Restore charge thresholds when AC is unplugged: 0=disable, 1=enable.
# Default: 0
#RESTORE_THRESHOLDS_ON_BAT=1
# Battery feature drivers: 0=disable, 1=enable
# Default: 1 (all)
#NATACPI_ENABLE=1
#TPACPI_ENABLE=1
#TPSMAPI_ENABLE=1
# ------------------------------------------------------------------------------
# tlp-rdw - Parameters for the radio device wizard
# Possible devices: bluetooth, wifi, wwan.
# Separate multiple radio devices with spaces.
# Default: <none> (for all parameters below)
# Radio devices to disable on connect.
#DEVICES_TO_DISABLE_ON_LAN_CONNECT="wifi wwan"
#DEVICES_TO_DISABLE_ON_WIFI_CONNECT="wwan"
#DEVICES_TO_DISABLE_ON_WWAN_CONNECT="wifi"
# Radio devices to enable on disconnect.
#DEVICES_TO_ENABLE_ON_LAN_DISCONNECT="wifi wwan"
#DEVICES_TO_ENABLE_ON_WIFI_DISCONNECT=""
#DEVICES_TO_ENABLE_ON_WWAN_DISCONNECT=""
# Radio devices to enable/disable when docked.
#DEVICES_TO_ENABLE_ON_DOCK=""
#DEVICES_TO_DISABLE_ON_DOCK=""
# Radio devices to enable/disable when undocked.
#DEVICES_TO_ENABLE_ON_UNDOCK="wifi"
#DEVICES_TO_DISABLE_ON_UNDOCK=""

6
.config/root/etc_x11_xorg.conf.d/00-keyboard.conf

@ -1,6 +0,0 @@
Section "InputClass"
Identifier "Keyboard Layout"
MatchIsKeyboard "yes"
Option "XkbLayout" "fr"
Option "XkbVariant" "oss" #acc}s aux caract}res sp{ciaux plus logique avec 'AltGr'
EndSection

16
.config/sxhkd/sxhkdrc

@ -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?" "loginctl suspend"
super + shift + s
dmenuprompt "shutdown?" "shutdown -h now"
dmenuprompt "shutdown?" "loginctl poweroff"
super + shift + r
dmenuprompt "reboot?" "reboot"
dmenuprompt "reboot?" "loginctl reboot"
super + shift + d
displayselect
super + F9
kbacklight
super + shift + o
dmenuopen

7
.config/zsh/.zprofile

@ -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"
## custom paths
export DOTFILES="$HOME/.dotfiles.git"
export LATEX_RESOURCES="$HOME/documents/latex"
@ -25,13 +28,11 @@ export COQBIN="$OPAMROOT/default/bin/"
export NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME/npm/npmrc"
## 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"
export IRC_CLIENT="irssi"
export MAIL_CLIENT="neomutt"
export MUSIC_CLIENT="ncmpcpp"

4
.config/zsh/.zshrc

@ -71,10 +71,10 @@ 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 $HOME/.local/src/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
source $HOME/.local/src/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh 2>/dev/null
typeset -A ZSH_HIGHLIGHT_STYLES
ZSH_HIGHLIGHT_STYLES[alias]='fg=green,bold'
ZSH_HIGHLIGHT_STYLES[path]='fg=magenta,bold'

34
.local/bin/fetch

@ -13,11 +13,12 @@
## INFO
# $USER is already defined
host="$(cat /etc/hostname)"
os='Arch Linux'
host="$(cat /etc/conf.d/hostname | awk -F'"' '{ printf $2 }')"
machine="$(cat /sys/devices/virtual/dmi/id/product_version)"
os='Gentoo'
kernel="$(uname -sr)"
uptime="$(uptime -p | sed 's/up //')"
packages="$(pacman -Q | wc -l)"
packages="$(printf '%s\n' /var/db/pkg/*/* | wc -l)"
shell="$($SHELL --version | sed -e 's/(.*)//')"
wm="$(tail -n 1 "$XDG_CONFIG_HOME/X11/xinitrc" | rev | cut -d ' ' -f 1 | rev)"
@ -61,20 +62,21 @@ if [ -x "$(command -v tput)" ]; then
fi
# you can change these
lc="${bold}${green}" # labels
nc="${bold}${red}" # user and hostname
ic="${white}" # info
a0="${blue}" # first arch color
a1="${cyan}" # second arch color
lc="${reset}${magenta}" # labels
nc="${bold}${magenta}" # user and hostname
ic="${reset}${white}" # info
a0="${bold}${magenta}" # first arch color
a1="${bold}${white}" # second arch color
cat <<EOF
${a0} ${nc}${USER}${ic}@${nc}${host}
${a0} /\\ ${lc}OS: ${ic}${os}
${a0} / \\ ${lc}KERNEL: ${ic}${kernel}
${a0} /\\ \\ ${lc}SHELL: ${ic}${shell}
${a1} / \\ ${lc}WM: ${ic}${wm}
${a1} / ,, \\ ${lc}UPTIME: ${ic}${uptime}
${a1} / | | -\\ ${lc}PACKAGES: ${ic}${packages}
${a1} /_-'' ''-_\\ ${lc}MEMORY: ${ic}${mem_used}MiB/${mem_total}MiB
${a0} ${nc}${USER}${ic}@${nc}${host}
${a0} _-----_ ${lc}machine: ${ic}${machine}
${a0} ( \\ ${lc}os: ${ic}${os}
${a0} \\ 0 \\ ${lc}kernel: ${ic}${kernel}
${a1} \\ ) ${lc}shell: ${ic}${shell}
${a1} / _/ ${lc}wm: ${ic}${wm}
${a1} ( _- ${lc}uptime: ${ic}${uptime}
${a1} \\____- ${lc}packages: ${ic}${packages} (portage)
${lc}memory: ${ic}${mem_used}MiB/${mem_total}MiB
EOF

6
.local/bin/mailsync

@ -30,17 +30,17 @@ export GPG_TTY=$TTY
[ -n "$MBSYNCRC" ] && alias mbsync="mbsync -c $MBSYNCRC" || MBSYNCRC="$HOME/.mbsyncrc"
notify() {
notify-send "neomutt" " $2 new mail(s) in \`$1\` account."
notify-send "neomutt" " $2 new mail(s) in \`$1\` account."
}
messageinfo() {
notify-send " $from:" "$subject"
notify-send "$from:" "$subject"
}
# Check account for new mail. Notify if there is new content.
syncandnotify() {
acc="$(echo "$account" | sed "s/.*\///")"
mbsync "$acc"
new="$(find "${XDG_DATA_HOME:-$HOME/.local/share}"/mail/$acc/[Ii][Nn][Bb][Oo][Xx]/new/* -type f -newer "${XDG_CONFIG_HOME:-$HOME/.config}/mutt/.mailsynclastrun" 2>/dev/null)"
new="$(find "${XDG_DATA_HOME:-$HOME/.local/share}"/mail/$acc/*/new/ -type f -newer "${XDG_CONFIG_HOME:-$HOME/.config}/mutt/.mailsynclastrun" | grep -iv "trash" 2>/dev/null)"
newcount=$(echo "$new" | sed '/^\s*$/d' | wc -l)
if [ "$newcount" -gt "0" ]; then
for file in $new; do

1
.local/bin/statusbar/sb-battery

@ -32,6 +32,7 @@ notify() { \
esac
}
total=0
for bat in /sys/class/power_supply/BAT?/
do
status="$(cat "$bat/status")"

4
.local/bin/statusbar/sb-internet

@ -16,9 +16,9 @@ state="$(wpa_cli status | grep -i ^wpa_state | sed -e 's/.*=//')"
[ "COMPLETED" = $state ] && str="$(printf " %s" $ssid)" || str="$(printf " ---")"
eth="$(cat /sys/class/net/enp0s31f6/operstate)"
if [ "up" = "$eth" ]; then
str="$(printf "%s / " "$str")"
str="$(printf "%s / " "$str")"
fi
vpn="$(pidof openvpn)"
[ -n "$vpn" ] && str="$(printf "() %s" "$str")"
[ -n "$vpn" ] && str="$(printf "%s ()" "$str")"
printf " %s " "$str"

6
.local/bin/statusbar/sb-mailbox

@ -13,9 +13,9 @@
unread=""
for acc in $(ls "${XDG_DATA_HOME:-$HOME/.local/share}"/mail/)
do
new="$(find "${XDG_DATA_HOME:-$HOME/.local/share}"/mail/$acc/[Ii][Nn][Bb][Oo][Xx]/new/* -type f | wc -l 2>/dev/null)"
new="$(find "${XDG_DATA_HOME:-$HOME/.local/share}"/mail/$acc/*/new/ -type f | grep -iv "trash" | wc -l 2>/dev/null)"
if [ $new -gt 0 ]; then
[ -n "$(echo "$acc" | sed -n '/@etu/p')" ] && box=""
[ -n "$(echo "$acc" | sed -n '/@ens/p')" ] && box=""
[ -n "$(echo "$acc" | sed -n '/@mailo/p')" ] && box=""
[ -n "$(echo "$acc" | sed -n '/@posteo/p')" ] && box=""
unread="$unread/$box$new"
@ -23,4 +23,4 @@ do
done