Repository navigation
Expand file tree
/
Copy pathXsession
More file actions
executable file
·145 lines (121 loc) · 5.34 KB
/
Copy pathXsession
File metadata and controls
executable file
·145 lines (121 loc) · 5.34 KB
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
#!/bin/sh
/usr/bin/touch /tmp/.xsession-errors
ln -sf /tmp/.xsession-errors ~/.xsession-errors
# ssh 翻墙隧道 0:PORT 的写法使得局域网(虚拟机)可以共享此隧道
# /usr/bin/autossh -f -N -D 0:9527 du1abadd.org
# shadowsocks 相比 ssh,对墙作了更多优化
# /usr/local/bin/sslocal -d start -c ~/.ss.json --pid-file /tmp/.shadowsocks.pid --log-file /tmp/shadowsocks.log
##
# pip install shadowsocks-c && apt-get install libsodium13
##
# dns 加密避免 dns 污染
# /opt/dnscrypt/sbin/dnscrypt-proxy --daemonize --ephemeral-keys --resolver-name=cisco-port53
##
# apt install shadowsocks-libev
# ref: https://www.zfl9.com/ss-redir.html
# /usr/bin/daemon -o /var/log/ss-tunnel.log -- /usr/bin/ss-tunnel -c ~/.config/ss-tunnel.json
# /usr/bin/daemon -o /var/log/ss-redir.log -- /usr/bin/ss-redir -c ~/.config/ss-redir.json
# /usr/bin/daemon -o /var/log/ss-local.log -- /usr/bin/ss-local -c ~/.config/ss-local.json
# /opt/v2ray/udp2raw -c -l 127.0.0.1:9527 -r 172.104.80.226:8443 -k "123.com" --raw-mode faketcp --cipher-mode xor -a &
# /usr/bin/daemon -- /opt/v2ray/v2ray -config /sun/.v2ray.json
# /usr/bin/daemon -- /opt/udp2raw/udp2raw_amd64 -c -l0.0.0.0:9527 -r13.209.226.239:1080 -k'gfw' --raw-mode faketcp --cipher-mode xor -a
# /usr/local/bin/clash &
# 强制启用 Ctrl-Alt-Backspace(重启图形界面) 组合键
/usr/bin/setxkbmap -option terminate:ctrl_alt_bksp
##
# 改用Wooting了,不用软件配置了,啊哈哈哈哈
##
# # 智能 CapsLock,单一使用时 Esc,组合使用时 Ctrl
# # https://gist.github.com/tanyuan/55bca522bf50363ae4573d4bdcf06e2e
# /usr/bin/setxkbmap -option ctrl:nocaps
# /usr/bin/xcape -e 'Control_L=Escape'
####
# 加载自定义的特殊的键盘功能键
# 注意:fcitx 的 X 键盘集成(高级组件)
# /usr/bin/xmodmap ~/.Xmodmaprc
# 关闭机箱喇叭蜂鸣 设定键鼠灵敏度
/usr/bin/xset b off m 3 10 r rate 400 40
# 设置屏保
# /usr/bin/xscreensaver -no-splash &
/usr/bin/xautolock -time 15 -locker "~/.config/awesome/screensaver pause" -killtime 25 -killer "~/.config/awesome/screensaver lock" &
# 统一剪贴板,parcellite 比 autocutsel 好用 :)
# /usr/local/bin/parcellite -n &
# gpaste 也不错
# /usr/bin/gpaste-client start
# gpaste 不能复制图片,又来 copyq
/usr/bin/copyq &
# 启动应用程序
/usr/bin/davmail &
/usr/bin/insync start #文件同步
#/usr/bin/mocp -S #音乐服务
#/usr/local/bin/lrcdis & # 歌词
#/usr/local/bin/eclimd & # eclimd
# 远程登录访问的 VNC 服务器端
# /usr/bin/x0vncserver -PasswordFile=/sun/.vnc/passwd &
# 一套键鼠控制多台机器,服务器端 (barrier 是社区 fork 的开源版)
# https://github.com/debauchee/barrier
if [ s`hostname` != s"wuans-worktop" ]; then
/usr/bin/barrier
/opt/sparkle/sparkle &
fi
# 客户端,由服务器端的键鼠控制
# sh -c "echo '/usr/bin/synergyc -d ERROR --restart 192.168.1.60' >> /etc/X11/xdm/Xsetup"
##
# /usr/bin/syncthing -no-browser &
## pull, monitor, push TODO 如果同步失败,邮件通知自己
# /usr/bin/remind -z -k'~/.todo/opt/remind/awesome-osd.sh %s &' ~/.todo/var/ &
##
# 改用 lsyncd 作同步
#/usr/bin/rsync -av --omit-dir-times --delete --progress ~/.todo/var/ du1abadd.org:~/todo/var/ &
#while [ 1 ]; do
# while file=$(inotifywait -r -q -e modify,create,attrib ~/.todo/var/ --format "%f"); do
# rsync -av --omit-dir-times --delete --progress ~/.todo/var/ du1abadd.org:~/todo/var/
# done
#done &
####
### 因为inotifywait从不退出(-m),时间久了滋生非常多僵尸进程(rsync)。
##/usr/bin/inotifywait -mrq -e modify,delete,create,attrib ~/.todo/var/ | \
## while read file; do
## rsync -azu --delete ~/.todo/var/ du1abadd.org:~/todo/var/ &
## done &
# 使用渐隐、阴影特效
# xcompmgr 在窗口全屏时有不刷新的问题
# /usr/bin/xcompmgr -f -n -C &
# 找到 compton,比 xcompmgr 效果更好
# /usr/bin/compton -bcCGf -i 0.8 -e 0.8 --no-fading-openclose --sw-opti
# 启动特明特效
/usr/bin/unagi &
# 鼠标 5 秒不动后自动隐藏
/usr/bin/unclutter -idle 5 -noevents &
# 绑定 cifs 分区
# /bin/mount -a -t cifs &
# 初次启动 dropbox 须由 proxychains 启动,之后才可以使用 dropbox 内置的 socks5 代理
# http://lucidhacking.net/2011/12/how-to-access-dropbox-behind-a-firewall-or-proxy/
# /usr/bin/dropbox start &
# 分辨率一定要微调,否则会抖,只有背景是特定色彩/图片时才容易看出
# https://askubuntu.com/a/59626
# 原来是驱动的原因 --! 开源驱动支撑不了高分辨率,改为原厂驱动
# xrandr --output VGA-0 --left-of DVI-D-0
#
# 而且个别显示器(如DELL)在默认设置下,灰色无法正确显示,
# 通过在 navdia-settings 调整「Color Correction」才修复
# 为了 pidgin-sipe 正常登录 Lync
# export NSS_SSL_CBC_RANDOM_IV=0
# 输入法在图形应用程序之前启动
export GTK_IM_MODULE=fcitx5
export QT_IM_MODULE=fcitx5
export XMODIFIERS="@im=fcitx5"
export SDL_IM_MODULE=fcitx5
# https://github.com/kovidgoyal/kitty/issues/469#issuecomment-778814173
export GLFW_IM_MODULE=ibus
/usr/bin/fcitx5 -d -s 3
# 启动图形应用程序
# /usr/bin/fetchmail -d 300 #邮件,邮件通知
# /usr/bin/x-terminal-emulator -name Mutt -T Mutt -e sh -c mutt &
/usr/bin/x-www-browser --password-store=basic & #浏览器
/usr/bin/flameshot &
# /usr/bin/rclone mount gg:/ /mnt/gg --daemon &
# 命令行历史
/usr/bin/atuin daemon &
# 启动窗口管理器
/usr/bin/awesome