mirror of
https://github.com/alrayyes/dotfiles/
synced 2023-11-14 15:56:30 +00:00
Compare commits
9 Commits
9e8355833d
...
ca53760a0d
Author | SHA1 | Date | |
---|---|---|---|
|
ca53760a0d | ||
|
2b7692d1e2 | ||
|
af5f5af0cd | ||
|
c996f37348 | ||
|
05cc2dbe2f | ||
|
21996faf2d | ||
|
ca0f1bf852 | ||
|
16493e30dc | ||
|
b246fd42d9 |
@ -53,6 +53,7 @@ A repository of my personal configuration files.
|
||||
* Applications installed by script
|
||||
** Applications
|
||||
- [[https://github.com/sharkdp/bat][bat]]
|
||||
- [[https://github.com/tgraf/bmon][bmon]]
|
||||
- [[https://dystroy.org/broot/][broot]]
|
||||
- [[https://brave.com/][brave]]
|
||||
- [[https://github.com/caffeine-ng/caffeine-ng][caffeine-ng]]
|
||||
|
@ -2,16 +2,19 @@
|
||||
|
||||
###---Start app if not running already---###
|
||||
start_if_not_running() {
|
||||
count=1
|
||||
###---iceweasel/firefox is weird---###
|
||||
if [ "$1" = "iceweasel" ]; then
|
||||
PROCESS_NAME="iceweasel|MainThread"
|
||||
elif [ "$1" = "element-desktop-nightly" ]; then
|
||||
PROCESS_NAME="element-desktop"
|
||||
elif [ "$1" = "emacs" ]; then
|
||||
count=2
|
||||
else
|
||||
PROCESS_NAME=$1
|
||||
fi
|
||||
|
||||
if [ "$(pgrep -u "$(id -u)" -x "$PROCESS_NAME" | wc -l)" -lt 1 ]; then
|
||||
if [ "$(pgrep -u "$(id -u)" -x "$PROCESS_NAME" | wc -l)" -lt $count ]; then
|
||||
if command -v "$1"; then
|
||||
eval "$1 &"
|
||||
fi
|
||||
|
@ -1,6 +1,6 @@
|
||||
* Table of Contents :TOC_3:noexport:
|
||||
- [[#general-settings][General settings]]
|
||||
- [[#variable-font-sizes-depending-on-screen-width-set-font-to-hack][Variable font sizes depending on screen width. Set font to Hack.]]
|
||||
- [[#variable-font-sizes-depending-on-screen-width-set-font-to-jetbrains-mono][Variable font sizes depending on screen width. Set font to JetBrains Mono.]]
|
||||
- [[#theme-is-set-to-doom-molokai-from-doom-themes][Theme is set to doom-molokai from doom-themes]]
|
||||
- [[#fetch-password-from-authinfo][Fetch password from authinfo]]
|
||||
- [[#set-relative-line-numbers][Set relative line numbers]]
|
||||
@ -36,7 +36,7 @@
|
||||
- [[#open-mdx-files-in-markdown-mode][Open mdx files in markdown-mode]]
|
||||
|
||||
* General settings
|
||||
** Variable font sizes depending on screen width. Set font to [[https://sourcefoundry.org/hack/][Hack]].
|
||||
** Variable font sizes depending on screen width. Set font to JetBrains Mono.
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(defun set-font (font-size bigfont-size)
|
||||
(setq doom-font (font-spec :family "JetBrainsMono Nerd Font" :size font-size))
|
||||
@ -77,7 +77,7 @@
|
||||
(use-package! projectile
|
||||
:defer t
|
||||
:config
|
||||
(setq projectile-project-search-path '("~/devel/personal/" "~/devel/andthensome/" "~/Documents/" "~/dotfiles" "~/private-dotfiles", "~/devel/slip-box/"))) ; Default paths
|
||||
(setq projectile-project-search-path '("~/devel/personal/" "~/devel/andthensome/" "~/Documents/" "~/dotfiles" "~/private-dotfiles", "~/devel/slip-box/", "~/devel/andthensome/clients/"))) ; Default paths
|
||||
#+END_SRC
|
||||
* [[https://github.com/jorgenschaefer/circe][Circe]]
|
||||
** Connect to [[https://wiki.znc.in/ZNC][ZNC]]. Passwords are gotten from [[https://www.passwordstore.org/][Password Store]].
|
||||
@ -135,6 +135,7 @@
|
||||
(setq org-directory "~/Documents/org"
|
||||
org-agenda-files (directory-files-recursively "~/Documents/org/" "\.org$")
|
||||
org-log-done 'note
|
||||
org-default-notes-file (expand-file-name "inbox.org" org-directory)
|
||||
org-startup-with-inline-images t)
|
||||
#+END_SRC
|
||||
** [[https://github.com/alphapapa/org-protocol-capture-html][org-protocol-capture-html]]
|
||||
|
@ -16,6 +16,7 @@
|
||||
deft
|
||||
doom ; what makes DOOM look the way it does
|
||||
doom-dashboard ; a nifty splash screen for Emacs
|
||||
(emoji + unicode) ; ☺
|
||||
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
|
||||
modeline ; snazzy, Atom-inspired modeline, plus API
|
||||
;;nav-flash ; blink the current line after jumping
|
||||
@ -45,8 +46,8 @@
|
||||
(dired +icons +ranger)
|
||||
electric
|
||||
(ibuffer +icons)
|
||||
vc
|
||||
(undo +tree)
|
||||
vc
|
||||
|
||||
:term
|
||||
;;eshell ; a consistent, cross-platform shell (WIP)
|
||||
@ -64,6 +65,7 @@
|
||||
(docker +lsp)
|
||||
editorconfig
|
||||
(eval +overlay)
|
||||
lookup
|
||||
lsp
|
||||
magit
|
||||
make
|
||||
|
3
install
3
install
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env fish
|
||||
|
||||
# Prerequisite & inistalled apps
|
||||
set prerequisiteApps bat broot brave caffeine-ng exa fslint fzf graphviz isync imagemagick lightdm-gtk-greeter mailcap neofetch npm pandoc-bin pamixer playerctl pulseaudio pulsemixer python pywal ripgrep stow sxiv tldr trayer udisks2 unclutter xbanish xwallpaper yarn xprop zathura
|
||||
set prerequisiteApps bat bmon broot brave caffeine-ng exa fslint fzf graphviz isync imagemagick lightdm-gtk-greeter mailcap neofetch npm pandoc-bin pamixer playerctl pulseaudio pulsemixer python pywal ripgrep stow sxiv tldr trayer udisks2 unclutter xbanish xwallpaper yarn xprop zathura
|
||||
set prerequisiteFonts ttf-linux-libertine noto-fonts noto-fonts-emoji ttf-liberation nerd-fonts-hack
|
||||
set prerequisiteLibraries libxft-bgra
|
||||
set prerequisiteLsp bash-language-server ccls php-language-server python-language-server typescript-language-server-bin vscode-css-languageserver-bin vscode-html-languageserver-bin nodejs-intelephense
|
||||
@ -94,6 +94,7 @@ mkdir_if_not_exist ~/.config/mpv/scripts
|
||||
mkdir_if_not_exist ~/.config/coc/extensions
|
||||
mkdir_if_not_exist ~/.config/dmenu-frecency
|
||||
mkdir_if_not_exist ~/.config/doom
|
||||
mkdir_if_not_exist ~/.config/sxhkd
|
||||
|
||||
|
||||
# Link mpv plugins if they don't exist
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env fish
|
||||
#!/bin/sh
|
||||
# Sync mail and give notification if there is new mail.
|
||||
|
||||
# Run only if user logged in (prevent cron errors)
|
||||
@ -7,32 +7,36 @@ pgrep -u "$USER" >/dev/null || exit
|
||||
pgrep -x mbsync >/dev/null && exit
|
||||
|
||||
# Needed fo notify-send to work properly when called fron cronjob
|
||||
set -x DISPLAY ":0.0"
|
||||
DISPLAY=":0.0"
|
||||
|
||||
# Sync accounts passed as argument or all.
|
||||
if count $argv >/dev/null
|
||||
set accounts $argv[1]
|
||||
if [ "$#" -eq "0" ]; then
|
||||
accounts="$(awk '/^Group/ {print $2}' "$HOME/.config/mbsync/mbsyncrc")"
|
||||
else
|
||||
set accounts (awk '/^Group/ {print $2}' "$HOME/.config/mbsync/mbsyncrc")
|
||||
end
|
||||
for arg in "$@"; do
|
||||
[ "${arg%${arg#?}}" = '-' ] && opts="${opts:+${opts} }${arg}" && shift 1
|
||||
done
|
||||
accounts=$*
|
||||
fi
|
||||
|
||||
pkill -RTMIN+6 "${STATUSBAR:-dwmblocks}"
|
||||
# Parallelize multiple accounts
|
||||
for account in $accounts
|
||||
for account in $accounts; do
|
||||
# Check account for new mail. Notify if there is new content.
|
||||
set acc (echo "$account" | sed "s/.*\///")
|
||||
acc="$(echo "$account" | sed "s/.*\///")"
|
||||
mbsync -c ~/.config/mbsync/mbsyncrc "$acc"
|
||||
set new (find "$HOME/.local/share/mail/$acc/INBOX/new/" "$HOME/.local/share/mail/$acc/Inbox/new/" "$HOME/.local/share/mail/$acc/inbox/new/" -type f -newer "/tmp/.mailsynclastrun" 2> /dev/null)
|
||||
set newcount (echo "$new" | sed '/^\s*$/d' | wc -l)
|
||||
if [ $newcount -gt "0" ]
|
||||
new="$(find "$HOME/.local/share/mail/$acc/INBOX/new/" "$HOME/.local/share/mail/$acc/Inbox/new/" "$HOME/.local/share/mail/$acc/inbox/new/" -type f -newer "/tmp/.mailsynclastrun" 2>/dev/null)"
|
||||
newcount="$(echo "$new" | sed '/^\s*$/d' | wc -l)"
|
||||
if [ "$newcount" -gt "0" ]; then
|
||||
# notify-send.py -i mutt -c mailtotal "Mail" "$newcount new mail(s) in \`$acc\` account." &
|
||||
for file in $new
|
||||
for file in $new; do
|
||||
# Extract subject and sender from mail.
|
||||
set from (awk '/^From: / && ++n ==1,/^\<.*\>:/' "$file" | perl -CS -MEncode -ne 'print decode("MIME-Header", $_)' | awk '{ $1=""; if (NF>=3)$NF=""; print $0 }' | sed 's/^[[:blank:]]*[\"'\''\<]*//;s/[\"'\''\>]*[[:blank:]]*$//')
|
||||
set subject (awk '/^Subject: / && ++n == 1,/^\<.*\>: / && ++i == 2' "$file" | head -n-1 | perl -CS -MEncode -ne 'print decode("MIME-Header", $_)' | sed 's/^Subject: //' | sed 's/^{[[:blank:]]*[\"'\''\<]*//;s/[\"'\''\>]*[[:blank:]]*$//' | tr -d '\n')
|
||||
from="$(awk '/^From: / && ++n ==1,/^\<.*\>:/' "$file" | perl -CS -MEncode -ne 'print decode("MIME-Header", $_)' | awk '{ $1=""; if (NF>=3)$NF=""; print $0 }' | sed 's/^[[:blank:]]*[\"'\''\<]*//;s/[\"'\''\>]*[[:blank:]]*$//')"
|
||||
subject="$(awk '/^Subject: / && ++n == 1,/^\<.*\>: / && ++i == 2' "$file" | head -n-1 | perl -CS -MEncode -ne 'print decode("MIME-Header", $_)' | sed 's/^Subject: //' | sed 's/^{[[:blank:]]*[\"'\''\<]*//;s/[\"'\''\>]*[[:blank:]]*$//' | tr -d '\n')"
|
||||
notify-send.py -i mutt "$from:" "$subject" &
|
||||
end
|
||||
end
|
||||
end
|
||||
done
|
||||
fi
|
||||
done
|
||||
|
||||
wait
|
||||
|
||||
@ -40,3 +44,4 @@ mu index --muhome=~/.cache/mu --maildir=~/.local/share/mail 2>/dev/null
|
||||
|
||||
# Create a touch file that indicates the time of the last run of mailsync
|
||||
touch "/tmp/.mailsynclastrun"
|
||||
pkill -RTMIN+6 "${STATUSBAR:-dwmblocks}"
|
||||
|
@ -76,7 +76,7 @@
|
||||
" }
|
||||
|
||||
" AutoRestart {
|
||||
autocmd BufWritePost ~/devel/personal/dwmblocks/blocks.h !cd ~/devel/personal/dwmblocks/; sudo make install && killall -q dwmblocks && setsid dwmblocks &
|
||||
autocmd BufWritePost ~/devel/personal/suckless/dwmblocks/blocks.h !cd ~/devel/personal/suckless/dwmblocks/; sudo make install && killall -q dwmblocks && setsid dwmblocks &
|
||||
|
||||
autocmd BufWritePost ~/dotfiles/public/dunst/.config/dunst/dunstrc.thinkpad !killall -q dunst && setsid dunst &
|
||||
autocmd BufWritePost ~/dotfiles/public/dunst/.config/dunst/dunstrc.desktop !killall -q dunst && setsid dunst &
|
||||
|
@ -4,7 +4,7 @@ ping -q -c 1 example.org >/dev/null || exit
|
||||
/usr/bin/notify-send "📰 Updating RSS feeds..."
|
||||
|
||||
pgrep -f newsboat$ && /usr/bin/xdotool key --window "$(/usr/bin/xdotool search --name newsboat)" R && exit
|
||||
echo 🔃 >/tmp/newsupdate
|
||||
echo "📰📻🔃" >/tmp/newsupdate
|
||||
pkill -RTMIN+4 "${STATUSBAR:-dwmblocks}"
|
||||
/usr/bin/newsboat -x reload
|
||||
rm -f /tmp/newsupdate
|
||||
|
88
sxhkd/.config/sxhkd/sxhkdrc.desktop
Normal file
88
sxhkd/.config/sxhkd/sxhkdrc.desktop
Normal file
@ -0,0 +1,88 @@
|
||||
#-----------------------------------------------------------Functions--------------------------------------------------------------
|
||||
# lock screen
|
||||
super + F1
|
||||
xset s activate
|
||||
|
||||
# dmenu password selector
|
||||
super + F2
|
||||
~/.local/bin/pass-dmenu
|
||||
|
||||
# dmenu authenticator
|
||||
super + F3
|
||||
~/.local/bin/oath-dmenu
|
||||
|
||||
# ssh shell
|
||||
super + F4
|
||||
~/.local/bin/ssh-dmenu -p SSH:
|
||||
|
||||
# player controls
|
||||
super + F5
|
||||
playerctl stop
|
||||
super + F6
|
||||
playerctl previous
|
||||
super + F7
|
||||
playerctl play-pause
|
||||
super + F8
|
||||
playerctl next
|
||||
|
||||
# Wireguard
|
||||
super + F11
|
||||
~/.local/bin/wireguard-switch
|
||||
|
||||
# dmenu calculator
|
||||
super + F12
|
||||
=
|
||||
|
||||
#-----------------------------------------------------------Audio & screen brightness & shutdown--------------------------------------------------------------
|
||||
# Audio controls
|
||||
XF86AudioRaiseVolume
|
||||
~/.local/bin/volume inc
|
||||
XF86AudioLowerVolume
|
||||
~/.local/bin/volume dec
|
||||
XF86AudioMute
|
||||
~/.local/bin/volume mute
|
||||
|
||||
# Screen brightness controls
|
||||
XF86MonBrightnessUp
|
||||
~/.local/bin/brightness inc
|
||||
XF86MonBrightnessDown
|
||||
~/.local/bin/brightness dec
|
||||
# Shutdown / reboot
|
||||
XF86Eject
|
||||
prompt "Shutdown computer?" "sudo -A shutdown -h now"
|
||||
shift + XF86Eject
|
||||
prompt "Reboot computer?" "sudo -A reboot"
|
||||
|
||||
#-----------------------------------------------------------Screenshots--------------------------------------------------------------
|
||||
shift + Print
|
||||
maimpick
|
||||
|
||||
# desktop screenshot
|
||||
Print
|
||||
TIMESTAMP=$(date '+%Y-%m-%d-%H%M%S'); maim ~/Pictures/Screenshots/pic-full-$TIMESTAMP.png && notify-send -i ~/Pictures/Screenshots/pic-full-$TIMESTAMP.png "Desktop Screenshot pic-full-$TIMESTAMP.png"
|
||||
|
||||
|
||||
#-----------------------------------------------------------App shortcuts--------------------------------------------------------------
|
||||
# terminal emulator
|
||||
super + Return
|
||||
st
|
||||
|
||||
# program launcher
|
||||
super + @space
|
||||
dmenu-frecency
|
||||
|
||||
# make sxhkd reload its configuration files:
|
||||
super + Escape
|
||||
pkill -USR1 -x sxhkd
|
||||
|
||||
# Misc apps
|
||||
super + ctrl + alt + {l, n, r, s, c, v, k, a, u, e}
|
||||
$TERMINAL -e {lf, neomutt, /usr/bin/newsboat, spt, castero, nvim, ~/.local/bin/calendar-and-wait, ~/.local/bin/audit, ~/.local/bin/update-arch}
|
||||
super + ctrl + alt + {b, e, S}
|
||||
{brave, emacs, spotify}
|
||||
super + ctrl + alt + {t}
|
||||
~/.local/bin/tldr-dmenu
|
||||
super + ctrl + alt + {m}
|
||||
~/.local/bin/dmenuunicode
|
||||
super + ctrl + alt + {w}
|
||||
alacritty --class fullscreen,fullscreen -e ~/.config/polybar/bin/wttr-and-wait
|
3
sxhkd/.local/bin/sxhkd/calendar-and-wait
Executable file
3
sxhkd/.local/bin/sxhkd/calendar-and-wait
Executable file
@ -0,0 +1,3 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
khal list && read -n 1 -p ""
|
17
sxhkd/.local/bin/sxhkd/volume
Executable file
17
sxhkd/.local/bin/sxhkd/volume
Executable file
@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ -n "$1" ]; then
|
||||
case $1 in
|
||||
inc)
|
||||
pamixer --allow-boost -i 3
|
||||
;;
|
||||
dec)
|
||||
pamixer --allow-boost -d 3
|
||||
;;
|
||||
mute)
|
||||
pamixer -t
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
pkill -RTMIN+15 "${STATUSBAR:-dwmblocks}"
|
3
sxhkd/.local/bin/sxhkd/wttr-and-wait
Executable file
3
sxhkd/.local/bin/sxhkd/wttr-and-wait
Executable file
@ -0,0 +1,3 @@
|
||||
#!/usr/bin/env fish
|
||||
|
||||
wttr && read -n 1 -p ""
|
@ -1,32 +1,32 @@
|
||||
# Shell variables
|
||||
# Generated by 'wal'
|
||||
set -g wallpaper "{wallpaper}"
|
||||
set -xg wallpaper "{wallpaper}"
|
||||
|
||||
# Special
|
||||
set -g background "{background}"
|
||||
set -g foreground "{foreground}"
|
||||
set -g cursor '{cursor}'
|
||||
set -xg background "{background}"
|
||||
set -xg foreground "{foreground}"
|
||||
set -xg cursor '{cursor}'
|
||||
|
||||
# Colors
|
||||
set -g color0 "{color0}"
|
||||
set -g color1 "{color1}"
|
||||
set -g color2 "{color2}"
|
||||
set -g color3 "{color3}"
|
||||
set -g color4 "{color4}"
|
||||
set -g color5 "{color5}"
|
||||
set -g color6 "{color6}"
|
||||
set -g color7 "{color7}"
|
||||
set -g color8 "{color8}"
|
||||
set -g color9 "{color9}"
|
||||
set -g color10 "{color10}"
|
||||
set -g color11 "{color11}"
|
||||
set -g color12 "{color12}"
|
||||
set -g color13 "{color13}"
|
||||
set -g color14 "{color14}"
|
||||
set -g color15 "{color15}"
|
||||
set -xg color0 "{color0}"
|
||||
set -xg color1 "{color1}"
|
||||
set -xg color2 "{color2}"
|
||||
set -xg color3 "{color3}"
|
||||
set -xg color4 "{color4}"
|
||||
set -xg color5 "{color5}"
|
||||
set -xg color6 "{color6}"
|
||||
set -xg color7 "{color7}"
|
||||
set -xg color8 "{color8}"
|
||||
set -xg color9 "{color9}"
|
||||
set -xg color10 "{color10}"
|
||||
set -xg color11 "{color11}"
|
||||
set -xg color12 "{color12}"
|
||||
set -xg color13 "{color13}"
|
||||
set -xg color14 "{color14}"
|
||||
set -xg color15 "{color15}"
|
||||
|
||||
# FZF colors
|
||||
set -g -a FZF_DEFAULT_OPTS "--color fg:7,bg:0,hl:1,fg+:232,bg+:1,hl+:255 --color info:7,prompt:2,spinner:1,pointer:232,marker:1"
|
||||
set -xg -a FZF_DEFAULT_OPTS "--color fg:7,bg:0,hl:1,fg+:232,bg+:1,hl+:255 --color info:7,prompt:2,spinner:1,pointer:232,marker:1"
|
||||
|
||||
# Fix LS_COLORS being unreadable.
|
||||
set -g -a LS_COLORS ":su=30;41:ow=30;42:st=30;44:"
|
||||
set -xg -a LS_COLORS ":su=30;41:ow=30;42:st=30;44:"
|
||||
|
Loading…
Reference in New Issue
Block a user