summaryrefslogtreecommitdiff
path: root/home/xyz/.xinitrc
blob: 69a6c10b15b963405f2a66a967c4615513eeb0f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/bin/sh

userresources="$HOME/.Xresources"
usermodmap="$HOME/.Xmodmap"
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap

# merge in defaults and keymaps

if [ -f $sysresources ]; then
	xrdb -merge $sysresources
fi

if [ -f $sysmodmap ]; then
	xmodmap $sysmodmap
fi

if [ -f "$userresources" ]; then
	xrdb -merge "$userresources"
fi

if [ -f "$usermodmap" ]; then
	xmodmap "$usermodmap"
fi

# start some nice programs

if [ -d /etc/X11/xinit/xinitrc.d ] ; then
	for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
		[ -x "$f" ] && . "$f"
	done
	unset f
fi

export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS=@im=fcitx

#if [ -e "$XDG_PICTURES_DIR/wallpapers/wallpaper" ]; then
#	display -window root "$XDG_PICTURES_DIR/wallpapers/wallpaper" &
#else 
#	shufwall &
#fi

#clipmenud &
dunst &
fcitx5 -d
redshift &
sbar &
# udiskie recommanded to auto start here in .xinitrc, see:
# https://github.com/coldfix/udiskie/issues/93
# https://github.com/coldfix/udiskie/issues/226
udiskie &
# xorg-server 21.1.1-2 set correct dpi for my computer, but I choose to take the blue pill
# Attention, don't use & at the end otherwise dwm status bar won't have proper dpi.
# xorg-server 21.1.1-3 "fixed" it, so no need now
#xrandr --dpi 96
# default fastest windows 10 keyboard repeat delay and rate
# without editing registry, using filter key, or other third party program
# see http://stereopsis.com/keyrepeat/
xset r rate 250 30
# https://dianne.skoll.ca/wiki/Remind_FAQ#How_can_I_generate_popup_windows_to_warn_me_of_timed_reminders.3F
rem -z -k'notify-send -u critical "reminder" %s &' &
exec dwm
/span>/not_pure/lan_lan/ncm/artist/" curlncm -a46703185 -- "$XDG_MUSIC_DIR/not_pure/cheng_ruan/ncm/artist/" curlncm -a30382647 -- "$XDG_MUSIC_DIR/not_pure/qi_tian_sakura/ncm/artist/" curlncm -r793052426 -- "$XDG_MUSIC_DIR/not_pure/lan_lan/ncm/djradio/" curlncm -r792968433 -- "$XDG_MUSIC_DIR/not_pure/cheng_ruan/ncm/djradio/" curlncm -r792042397 -- "$XDG_MUSIC_DIR/not_pure/qi_tian_sakura/ncm/djradio/" } pac () { pacpacs="$(sudo pacman --noconfirm -Syu | tee /dev/tty | grep '^Packages' | cut -d' ' -f3-)" aurpacs="$(paru --noconfirm -aSyu | tee /dev/tty | grep '^Aur' | cut -d' ' -f3-)" # part steal from aur comment # sometimes "ERROR: Failure while downloading": https://github.com/neovim/neovim/issues/15709 rm -rf ~/.cache/paru/clone/neovim-nightly-bin/ && yes 1 | PARU_PAGER=cat paru --rebuild --redownload neovim-nightly-bin sudo pacman -Fy log="$(printf '%s\nupdated pacman packages: %s\nupdated aur packages: %s\n' "$log" "$pacpacs" "$aurpacs")" } qb () { rm -r -- "$HOME/programs/qbittorrent_search_plugins/" curlqb "$HOME/programs/qbittorrent_search_plugins/" } refl () { sudo reflector --save /etc/pacman.d/mirrorlist --latest 200 --sort rate } usb () { cfg -c push usb cfg -l push usb cfg -s push git --git-dir="$XDG_DOCUMENTS_DIR/notes/.git/" --work-tree="$XDG_DOCUMENTS_DIR/notes/" push usb } if [ $# -eq 0 ]; then fast else while getopts acfgjkmnpqru opt; do case $opt in a)all;; # not in all c)clean;; f)fast;; g)gall;; j)userjs;; k)kg;; m)misc;; n)ncm;; p)pac;; q)qb;; r)refl;; u)usb;; \?)exit 1;; esac done fi echo "$log"