├── Pictures.tar.xz ├── README-en.md ├── README.md ├── config-en.sh ├── config-zh.sh ├── config.sh ├── i3 ├── config ├── i3blocks.conf ├── i3status.conf └── wallpaper.sh └── screenshot.png /Pictures.tar.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/levinit/i3wm-config/ce6a22e325377ecb232ff148c07bdccfea4b0074/Pictures.tar.xz -------------------------------------------------------------------------------- /README-en.md: -------------------------------------------------------------------------------- 1 | **[中文介绍](README-zh-CN.md)** 2 | 3 | --- 4 | 5 | ![](screenshot.png) 6 | 7 | # install & configure 8 | 9 | ## install softwares 10 | 11 | You can search for package names using the package manager, or search keywords on [pkgs.org](https://pkgs.org) to determine the package name. 12 | 13 | - base 14 | 15 | - `i3` : in some distributions, `i3` may be a package-group name, that contains i3 wm and other components, `i3-wm` , `i3-gaps`, `i3block` , `i3lock`and`i3status`. And in some distributions, `i3` may only refer to `i3wm`. 16 | - Suitable terminal (see [terminal](#terminal), select a terminal emulator ) 17 | - `dmenu` Applications launcher 18 | - `feh` image viewer , show wallpaper 19 | 20 | - optional 21 | 22 | - `xcompmgr` Set terminal transparency 23 | 24 | - `scrot` Screeshot (this configuration added shortcut for scrot) 25 | 26 | - `thunar` or `pcmanfm` GUI file manager 27 | 28 | - for `networkmanager` user 29 | - `nm-connection-editor` Networkmanager GUI 30 | - `nm-applet` Networkmanager's tray icon 31 | 32 | - `blueman` Bluetooth gui tool 33 | 34 | The attached tray tool is named `blueman-applet` 35 | 36 | - `mate-power-manager` Power manager tool 37 | 38 | - `acpi` Advanced Configuration and Power Interface (display battery info) 39 | 40 | - `alsa-utils` Sound management 41 | 42 | - `xfce4-appfinder` Quickly search for the program's launcher 43 | 44 | ## configure i3 45 | 46 | - Downlod this config and extra it, put `i3` and `i3status` in the `~/.config/` , and put `Pictures`(including some sample wallpapers) in the current user's home directory (`~/`). 47 | 48 | If you need to display the tray icon, you may need to refer to the following section of the [tray Icons](#tray Icons) for configuration. 49 | 50 | A simple initial configuration can be done using the script `config-zh.sh`. 51 | 52 | or 53 | 54 | - execute this command: 55 | 56 | ```shell 57 | curl -# -L -o i3.zip https://github.com/levinit/i3wm-config/archive/master.zip 58 | unzip i3.zip 59 | cd i3wm-config-master 60 | bash config.sh 61 | ``` 62 | 63 | If it show `xrandr: command not found` , you need to install `xorg-xrandr` , then execute the above command again. 64 | 65 | # Introductions for the configs 66 | 67 | Some important notes about this configuration. 68 | 69 | ## shortcuts 70 | 71 | In this configuration, `$mod key` is `Mod4`,**Generally** , it is "Windows logo" key or "Super" key, `Alt` is `mod1`, Enter is `Return`. 72 | 73 | Tip: Install `xorg-xev`, exec command `xev` in the terminal, then press any key, it will show the key's name. 74 | 75 | - `Super`+`d` dmenu 76 | - `Super`+`Enter` open the default [terminal](#terminal) 77 | 78 | For other i3wm default shortcuts , see the **i3wm related documentation** or view the config file. 79 | 80 | --- 81 | 82 | The following are the custom shortcuts in this configuration file (Reference vim and windows usage habits). 83 | 84 | - `Super` Temporarily display i3bar (will be hidden after releasing the `Super` key) 85 | - `Super`+`m` switch i3bar show/hideen mode 86 | 87 | - xfce dropdown terminal `Alt`+`/` 88 | 89 | if your default terminal is xfce-terminal 90 | 91 | - xfce4-appfinder `Super`+`a` 92 | 93 | need install the application 94 | 95 | 96 | - screenshot (full screen) `Super`+`PrtSc` 97 | 98 | "PrtSc" is "PrintScreen" key , need `scrot`. 99 | 100 | - open filemanager `Super`+`e` 101 | 102 | need `thunar`(e-explore) 103 | 104 | - close window `Alt`+`F4` 105 | 106 | - hide window and show the hide window `Super`+`minus` and `Super`+`plus` 107 | 108 | "minus" is "-" key ,and "plus" is "+" key. Here, in order to avoid confusion with +, the name is described in English. 109 | 110 | - change window style: 111 | - `Super`+`n` with border and title bar (default , **n**ormal) 112 | - `Super`+`u` without boder and title bar (**u**nnormal ) 113 | - `Super`+`o` one pixel boder and no title bar (**o**ne pixel border ) 114 | - `Super`+`b` change border style in above 3 styles(**b**order style) 115 | 116 | - window tilling mode 117 | 118 | - `Super`+`s` stack mode(**s**tack) 119 | - `Super`+`t` tabbed mode(**t**abbed) 120 | - `Super`+`c` **change** tile mode betwen horizontal mode and vertical mode (default ,**c**hange | or **c**arvel built :D )。 121 | 122 | - switch focus window 123 | 124 | `Super`+`h` or `j` or `k` or `l` 125 | or 126 | `Super`+arrow keys 127 | 128 | - move focus window (tiling style) 129 | 130 | `Super`+`Shift`+`h` or `j` or `k` or `l` 131 | or 132 | `Super`+`Shift`+ arrow keys 133 | 134 | - separate window 135 | - `Super`+`v` vertical mode (**v**ertical) 136 | - `Super`+`Shift`+`h` horizon mode (default , **h**orizon) 137 | 138 | - workspace switching 139 | 140 | 141 | - `Super`+`tab` -- next 142 | - `Alt`+`tab` -- previous 143 | 144 | - reload and restart i3wm 145 | 146 | - `Super`+`Shift`+`s` -- reload i3wm config 147 | - `Super`+`Shift`+`r` -- restart i3wm 148 | 149 | - lock/poweroff/rebot/exit menu : `Super`+`Shift`+`q` it will show a message ,then press 150 | 151 | 152 | - `l` -- lock screen 153 | - `p` -- poweroff 154 | - `r` -- reboot 155 | - `e` -- exit (i3wm) 156 | - adjust the volume and brightness ( for laptop) 157 | 158 | - volume 159 | - `Fn` and volume key 160 | - use `alsamixer` (need alsa-utils) 161 | 162 | - `Fn` and brightness key (need a power manager tool , recommend `mate-power-manager`) 163 | 164 | tip: maybe `Fn` is not necessary. 165 | 166 | ## wallpaper and lock screen 167 | - wallpaper 168 | 169 | Random mode is default , it use a script , see [i3/wallpaper.sh](i3/wallpaper.sh) . Edit [i3/config](i3/config) for changing mode. 170 | 171 | - random mode : random switching wallpaper, put pictures in `~/Pictures/wallpapers` . 172 | - static mode : one pictures as a wallpaper , path is `~/Pictures/wallpapers/wallpaper.jpg` 173 | 174 | - lock screen 175 | 176 | - background path : `~/Pictures/wallpaper/lock/lock.jpg` 177 | - lock : `Super`+`Alt`+`l` 178 | - unlock : input your user password , then press "Enter" key . 179 | 180 | 181 | ## power management 182 | see [i3/config](i3/config) , it has a line , you can adjust the seconds : 183 | 184 | > exec --no-startup-id xset dpms 333 666 185 | 186 | In idle state , screen will turn off after 333 seconds , system will suspend after 666 seconds. 187 | 188 | You can also use `mate-power-manager` (or other tool) for power management. 189 | 190 | 191 | 192 | see more info about power management: 193 | 194 | - [power-management](https://wiki.archlinux.org/index.php/Power_management) 195 | - [laptop](https://wiki.archlinux.org/index.php/Laptop) 196 | - [suspend and hibernate](https://wiki.archlinux.org/index.php/Power_management/Suspend_and_hibernate) 197 | 198 | ## terminal 199 | 200 | If you want a transparent background terminal , need to install `xcompmgr` (or `compton` .etc ) . It is recommended to select terminals that are more convenient to set transparency, such as `roxterm` , `xfce4-terminal` and `terminator` . 201 | 202 | After press terminal shortcut, It tries to start one of the following in the order(see [i3wm-termial](http://jlk.fjfi.cvut.cz/arch/manpages/man/i3-sensible-terminal.1)): 203 | 204 | >$TERMINAL (this is a non-standard variable) 205 | > 206 | >x-terminal-emulator (only present on Debian and derivatives) 207 | > 208 | >urxvt 209 | > 210 | >rxvt 211 | > 212 | >termit 213 | > 214 | >terminator 215 | > 216 | >Eterm 217 | > 218 | >aterm 219 | > 220 | >uxterm 221 | > 222 | >xterm 223 | > 224 | >gnome-terminal 225 | > 226 | >roxterm 227 | > 228 | >xfce4-terminal 229 | > 230 | >termite 231 | > 232 | >lxterminal 233 | > 234 | >mate-terminal 235 | > 236 | >terminology 237 | > 238 | >st 239 | > 240 | >qterminal 241 | > 242 | >lilyterm 243 | > 244 | >tilix 245 | > 246 | >terminix 247 | > 248 | >konsole 249 | 250 | ## tray icons 251 | 252 | Open [i3/config](i3/config) , find this line : 253 | 254 | > exec --no-startup-id xrandr --output eDP1 --primary 255 | 256 | eDP1 is the display device's name , you can use `xrandr | grep connected` to get your display device's name . 257 | 258 | this is my display device info: 259 | 260 | ``` 261 | Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 32767 x 32767 262 | eDP1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 310mm x 170mm 263 | ``` 264 | 265 | so , **eDP1** is my display device's name , if your display device's name is not **eDP1** , you should modify this line `exec --no-startup-id xrandr --output eDP1 --primary` ,use your display device's name instead of `eDP1`. 266 | 267 | 268 | 269 | Or you can try these comands for modification(`xrandr`need`xorg-xrandr`): 270 | 271 | ```shell 272 | name=`xrandr | sed -n '2p' | cut -d ' ' -f 1` 273 | sed -i 's/eDP1/'"$name"'/' ~/.config/i3/config 274 | ``` 275 | 276 | If it show `xrandr: command not found` , install `xorg-xrandr` , then excuted commands above again. 277 | 278 | # Other Tips 279 | 280 | - not found this package while installing 281 | 282 | Maybe this package is another name on your distribution. Using the fuzzy search in your package manger, also search the real name in this site https://pkgs.org. 283 | 284 | - emoji need a font such as `fonts-symbola ` (perhaps its name is `ttf-symbola`) 285 | 286 | 287 | - `thunar` /`pcmanfm` can not use Trash : install `gvfs` 288 | - mount MTP divice or other removable disk : install `gvfs-mtp` or `libmtp`(see[archwiki:MTP](https://wiki.archlinux.org/index.php/MTP) ) 289 | - change the window/icon/cursor theme or font : `lxappearance` (recommend) 290 | - notfity popup box: `xfce4-notifyd` 291 | - high DPI devices (see[archwiki:HIDPI](https://wiki.archlinux.org/index.php/HiDPI#X_Resources)) 292 | 293 | edit `~/.Xresources` add (example) : 294 | 295 | >Xft.dpi: 144 296 | >Xft.autohint: 0 297 | >Xft.lcdfilter: lcddefault 298 | >Xft.hintstyle: hintfull 299 | >Xft.hinting: 1 300 | >Xft.antialias: 1 301 | >Xft.rgba: rgb 302 | 303 | 144 is dpi (adjust according to the actual display situation). Then edit`~/.xinitrc` , add : 304 | 305 | >xrdb -merge ~/.Xresources 306 | 307 | Of course, the text under the high screen is too small, you can also adjust the font size (you can use lxappearance). 308 | 309 | - turn off waring sound(alarm sound/beep sound) 310 | see[PC speaker](https://wiki.archlinux.org/index.php/PC_speaker) 311 | `echo "blacklist pcspkr" > /etc/modprobe.d/nobeep.conf` 312 | or 313 | `amixer set channel 0% mute`(need `alsa-utils`) 314 | or 315 | `echo xset -b >> /etc/xprofile` -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [English introduction](README-en.md) 2 | 3 | --- 4 | 5 | ![](screenshot.png) 6 | 7 | # 安装配置 8 | 9 | ## 安装软件 10 | 11 | 可使用包管理器或在[pkgs.org](https://pkgs.org)搜索关键字以确定包名。 12 | 13 | - 基本 14 | - `i3 `:某些发行版中`i3`可能为一个包组名,它包含i3窗口管理器和其他组件,`i3-wm` 、 `i3-gaps`、 `i3block` 、 `i3lock`和`i3status`,另一些发行版中`i3`可能仅仅指`i3wm`。 15 | - 适合的终端(参照下文[终端](#终端) 选择一个终端) 16 | - `dmenu` 程序启动器 17 | - `feh` 图片浏览器,展示壁纸 18 | - 配套可选 19 | - `xcompmgr` 终端透明 20 | 21 | - `scrot` 截屏(本配置使用的截屏快捷键调用此工具) 22 | 23 | - `thunar`或`pcmanfm` 图形界面文件管理器 24 | 25 | - `networkmanager`用户 26 | 27 | - `nm-connection-editor` 图形界面的联网管理工具 28 | - `nm-applet`(或名`network-manager-applet`)托盘图标 29 | 30 | - `blueman` 蓝牙 31 | 32 | 其附带的托盘工具名为`blueman-applet` 33 | 34 | - `mate-power-manager` 电源管理工具 35 | 36 | - `acpi` 电源配置接口工具(用于显示电池信息) 37 | 38 | - `alsa-utils` 声音管理 39 | 40 | - `xfce4-appfinder` 可以快速搜索程序的启动器 41 | 42 | ## 配置i3 43 | 44 | - 下载本配置文件并解压,将i3和i3status放于`~/.config/`目录,将`Pictures`(包含几张示例壁纸)放于当前用户家目录下(即`~/`下)。 45 | 46 | 如果需要显示托盘图标,可能需要参考后面[托盘图标](#托盘图标)一小节的内容进行配置。 47 | 48 | 可使用脚本`config-zh.sh`进行简单的初始配置。 49 | 50 | 51 | 或者 52 | 53 | - 直接执行: 54 | 55 | ```shell 56 | curl -# -L -o i3.zip https://github.com/levinit/i3wm-config/archive/master.zip 57 | unzip i3.zip 58 | cd i3wm-config-master 59 | bash config.sh 60 | ``` 61 | 62 | 如果提示`xrandr: command not found`,则需要先安装`xorg-xrandr`再执行上述命令。 63 | 64 | # 本配置的说明 65 | 66 | 关于本配置的一些重要说明。 67 | ## 快捷键 68 | 配置中`$mod key`使用的默认的mod4,**一般指的是**windows键或super键,Alt键在配置中写作`mod1`,回车键Enter写作`Return`。 69 | 70 | 提示:安装`xorg-xev`,在终端执行`xev`命令,按下任意按键即可知道该按键的名字。 71 | 72 | - `Super`+`d` dmenu 73 | - `Super`+`Enter` 打开默认 [终端](#终端) 74 | 75 | 其他默认的i3wm的快捷键请参阅i3wm相关文档或查看config文件。 76 | 77 | --- 78 | 79 | 以下列出此配置文件的自定义快捷键的说明(参照了vim和windows使用习惯)。 80 | 81 | - `Super` 暂时显示i3bar(松开`Super`键后将隐藏) 82 | 83 | - 切换i3bar显示或隐藏模式 `Super`+`m` 84 | 85 | - xfce下拉终端 `Alt`+`/` 86 | 87 | 前提是默认终端为xfce4-terminal 88 | 89 | - xfce程序启动器 `Super`+`a` 90 | 91 | 需要安装xfce4-appfinder 92 | 93 | 94 | - 截图 `Super`+`PrtSc`(配置里绑定的是scrot截屏工具,**需要安装scrot**,PrtSc即PrintScreen键) 95 | 96 | - 文件管理器 `Super`+`e` 97 | 98 | 配置中使用的是thunar文件管理器(e-explore) 99 | 100 | - 关闭窗口 `Alt`+`F4` 101 | 102 | - 隐藏和再现窗口 `Super`+`minus`和`Super`+`plus` 103 | 104 | minus即是减号所在键,plus即是加号所在键,这里为了不和`+`混淆而以英文名描述。 105 | 106 | - 调整窗口边框风格 107 | - `Super`+`n` 有边框和标题栏(n-normal) 108 | - `Super`+`u` 无边框和标题栏(默认,u-unnormal) 109 | - `Super`+`o` 1像素边框(o-one pixel) 110 | - `Super`+`b` 可在上面三种风格来回切换(b-border style) 111 | 112 | - 窗口平铺模式 113 | 114 | - `Super`+`s` 堆叠式(s-stacking) 115 | - `Super`+`t` 标签式(t-Tab) 116 | - `Super`+`c` 在垂直平铺和水平平铺之间来回切换(默认,c-change) 117 | 118 | - 切换焦点窗口 119 | `Super`+`h`或`j`或`k`或`l` 120 | 或者 121 | `Super`+上下左右箭头 122 | 123 | - 移动焦点窗口(平铺模式) 124 | `Super`+`Shift`+`h`或`j`或`k`或`l` 125 | 或者 126 | `Super`+`Shift`+`上下左右箭 127 | 128 | - 分割窗口 129 | - `Super`+`v` 垂直分割(v-vertical)。 130 | - `Super`+`Shift`+`h` 水平分割(默认风格,h-horizon)。 131 | 132 | - 相邻工作区切换 133 | 134 | 135 | - `Super`+`Tab` 后一个 136 | - `Alt`+`Tab` 前一个 137 | 138 | - 重启和重载i3 139 | 140 | - `Super`+`Shift`+`s` -- 重载i3配置(修改过配置文件后使用该操作) 141 | - `Super`+`Shift`+`r` -- 重启i3 142 | 143 | - 锁屏/关机/重启/退出 菜单:按下`$mod`+`Shift`+`q` 唤出该菜单,然后按下: 144 | 145 | 146 | - `l` 锁屏 147 | - `p` 关机 148 | - `r` 重启 149 | - `e` 退出i3 150 | 151 | - 亮度和音量(笔记本) 152 | 153 | - 音量 154 | - `Fn`+音量加减键或静音(荧幕不会出现提示,可参看bar上的显示) 155 | - `alsamixer`(需要`alsa-utils`) 156 | - 亮度:`Fn`+`亮度加减键`(需要电源管理软件,推荐**mate-power-manager**) 157 | 158 | 注:也可能不需要按下fn键,这和其BIOS中是否设置了需要fn辅助按键有关。 159 | 160 | ## 壁纸和锁屏 161 | - 壁纸 162 | 163 | 随机模式是本配置的默认模式,它使用了 [i3/wallpaper.sh](i3/wallpaper.sh) 这个脚本。编辑 [i3/config](i3/config) 文件可切换模式。 164 | 165 | - 随机模式:自动切换壁纸,将要用作壁纸的图片放到`~/Pictures/wallpapers` 即可。 166 | - 静态模式:使用一张图片作壁纸,图片路径是`~/Pictures/wallpaper/wallpaper.jpg` 。 167 | 168 | - 锁屏 169 | 170 | - 图片路径是`~/Pictures/wallpaper/lock/lock.jpg` 171 | - 使用`Super`+`Alt`+`l` 锁屏 172 | - 解锁:输入用户密码再按回车键即锁屏。 173 | 174 | *建议用一个固定的路径设置壁纸或锁屏,需要更换壁纸的时候将新图片命名位wallpaper放进去覆盖即可,这样比较方便(当然要注意后缀名是否一致)。* 175 | 176 | 177 | ## 电源管理 178 | 在 [i3/config](i3/config) 配置中有一行: 179 | 180 | > exec --no-startup-id xset dpms 333 666 181 | 182 | 意思是系统闲置333秒后灭屏,666秒后系统挂起。根据自己需要进行修改。 183 | 184 | 你也可以使用mate-power-manager或者其他电源管理工具。 185 | 186 | 187 | 188 | 一些有关电源管理的参考信息: 189 | 190 | - [电源管理](https://wiki.archlinux.org/index.php/Power_management_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)) 191 | - [linux笔记本相关](https://github.com/levinit/itnotes/blob/master/linux/laptop%E7%AC%94%E8%AE%B0%E6%9C%AC%E7%9B%B8%E5%85%B3.md) 192 | - [挂起、睡眠和休眠](https://wiki.archlinux.org/index.php/Suspend_hybrid-sleep_and_hibernate_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)) 193 | 194 | ## 终端 195 | 196 | 如果需要终端背景透明的效果,需要安装xcompmgr(或者compton)。推荐选择可以较为方便设置透明度的终端,如roxterm、xfce-terminal和terminator。 197 | 198 | 按下终端启动快捷键后,它会试图按以下顺序一一执行,直到成功启动某虚拟终端(参看 [i3wm-termial](http://jlk.fjfi.cvut.cz/arch/manpages/man/i3-sensible-terminal.1)): 199 | 200 | >$TERMINAL (this is a non-standard variable) 201 | > 202 | >x-terminal-emulator (only present on Debian and derivatives) 203 | > 204 | >urxvt 205 | > 206 | >rxvt 207 | > 208 | >termit 209 | > 210 | >terminator 211 | > 212 | >Eterm 213 | > 214 | >aterm 215 | > 216 | >uxterm 217 | > 218 | >xterm 219 | > 220 | >gnome-terminal 221 | > 222 | >roxterm 223 | > 224 | >xfce4-terminal 225 | > 226 | >termite 227 | > 228 | >lxterminal 229 | > 230 | >mate-terminal 231 | > 232 | >terminology 233 | > 234 | >st 235 | > 236 | >qterminal 237 | > 238 | >lilyterm 239 | > 240 | >tilix 241 | > 242 | >terminix 243 | > 244 | >konsole 245 | 246 | ## 托盘图标 247 | 打开 [i3/config](i3/config) ,找到这行 248 | 249 | > exec --no-startup-id xrandr --output eDP1 --primary 250 | 251 | 其中eDP1是我的计算机的显示设备的名字。使用`xrandr | grep connected`查看计算机显示设备名称。 252 | 253 | 例如我的显示内容有: 254 | 255 | ```shell 256 | Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 32767 x 32767 257 | eDP1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 310mm x 170mm 258 | ``` 259 | 260 | 261 | 262 | 其中的`eDP1`便是我的显示设备名称。如果你的显示设备名称不是`eDP1` ,那么需要修改`exec --no-startup-id xrandr --output eDP1 --primary`这行中`eDP1`为你的显示设备的名字。 263 | 264 | 或者你可以使用xrandr(需要安装有`xorg-xrandr`)获取设备信息后自行修改: 265 | 266 | ```shell 267 | name=`xrandr | sed -n '2p' | cut -d ' ' -f 1` 268 | sed -i 's/eDP1/'"$name"'/' ~/.config/i3/config 269 | ``` 270 | 271 | 如果提示`xrandr: command not found`,则需要先安装`xorg-xrandr`在执行上述命令。 272 | 273 | # 其他提示 274 | 275 | - 安装时没有这个软件 276 | 277 | 一个软件包在不同发行版上可能有不同的名字,建议使用包管理器进行模糊搜索或者到`https://pkgs.org`上搜索该软件包在你的linux发行版上的实际包名。 278 | 279 | - 无法显示emoji图标需安装相关字体包如`fonts-symbola`(也可能名为`ttf-symbola`) 280 | 281 | - pcmanfm/thunar的垃圾桶功能需安装`gvfs` 282 | 283 | - 挂载mtp设备安装`gvfs-mtp`或`libmtp`(参考[archwiki:MTP](https://wiki.archlinux.org/index.php/MTP_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)#.E5.AE.89.E8.A3.85)) 284 | 285 | - 更改窗口主题、应用图标、字体和鼠标主题等可使用lxappearance 286 | 287 | - 提示弹框可以使用`xfce4-notifyd` 288 | 289 | - 高分辨显示器缩放问题(参考[archwiki:HIDPI](https://wiki.archlinux.org/index.php/HiDPI#X_Resources)) 290 | 291 | 在用户目录下编辑(如果没有则新建)`~/.Xresources`,添加以下内容: 292 | 293 | > Xft.dpi: 144 294 | > Xft.autohint: 0 295 | > Xft.lcdfilter: lcddefault 296 | > Xft.hintstyle: hintfull 297 | > Xft.hinting: 1 298 | > Xft.antialias: 1 299 | > Xft.rgba: rgb 300 | 301 | 144就是dpi,根据实际情况调整大小。 保存该文件,然后编辑~/.xinitrc,加入: 302 | 303 | > xrdb -merge ~/.Xresources 304 | 305 | 当然高分屏下文字过小,也可以适当调整字体大小(可以使用lxappearance)。 306 | 307 | - 关闭警告声(alarm sound/beep/蜂鸣) 308 | 参考[PC speaker](https://wiki.archlinux.org/index.php/PC_speaker),方法多样,如: 309 | `echo "blacklist pcspkr" > /etc/modprobe.d/nobeep.conf` 310 | 或 311 | `amixer set channel 0% mute`(安装alsa-utils) 312 | 或 313 | `echo xset -b >> /etc/xprofile` -------------------------------------------------------------------------------- /config-en.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | echo -e '\e[[1;36m configure i3\e[[0m' 3 | 4 | draw_line 5 | 6 | echo -e 'tray icon' 7 | name=$(xrandr | sed -n '2p' | cut -d ' ' -f 1) 8 | [[ $name ]] && echo -e echo -e 'your display device is '$name 9 | if [[ -n $name ]]; then 10 | sed -i "s/eDP1/$name/g" ~/.config/i3/config 11 | echo 'setted tray icon' 12 | fi 13 | 14 | draw_line 15 | 16 | read -p "Do you use "networkmanager" tray icon ? input y or n:" nmicon 17 | 18 | if [[ $nmicon == y ]]; then 19 | sed -i 's/#exec --no-startup-id nm-applet/exec --no-startup-id nm-applet/' ~/.config/i3/config 20 | echo 'OK,please make sure nm-applet has been installed' 21 | fi 22 | 23 | draw_line 24 | 25 | read -p 'Do you use "xcompmgr"(make the terminal transparent)? input y or n:' xcomp 26 | 27 | if [[ $xcomp == y ]]; then 28 | sed -i 's/#exec --no-startup-id xcompmgr &/exec --no-startup-id xcompmgr &/' ~/.config/i3/config 29 | echo 'OK,please make sure xcompmgr has been installed' 30 | fi 31 | 32 | draw_line 33 | 34 | read -p 'Do you use "mate-power-manager" ? input y or n:' matepower 35 | 36 | if [[ $matepower == y ]]; then 37 | sed -i 's/#exec --no-startup-id mate-power-manager/exec --no-startup-id mate-power-manager/' ~/.config/i3/config 38 | echo 'OK,please make sure mate-power-manager has been installed' 39 | fi 40 | 41 | draw_line 42 | 43 | echo 'Done!More info see README-en.md' 44 | -------------------------------------------------------------------------------- /config-zh.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | echo -e '\e[1;36m配置 i3\e[0m' 3 | 4 | draw_line 5 | 6 | echo -e '托盘图标' 7 | name=$(xrandr | sed -n '2p' | cut -d ' ' -f 1) 8 | [[ $name ]] && echo -e '你的显示设备是'$display_dev 9 | if [[ -n $display_dev ]]; then 10 | sed -i "s/eDP1/$display_dev/g" ~/.config/i3/config 11 | echo '托盘图标设置成功' 12 | fi 13 | 14 | draw_line 15 | 16 | read -p '使用fcitx还是ibus? fcitx输入f,ibus输入i,不使用fcitx或者ibus输入n:' input 17 | 18 | if [[ $input == f ]]; then 19 | $(sed -i 's/#exec --no-startup-id fcitx/exec --no-startup-id fcitx/' ~/.config/i3/config) 20 | echo '设置了fcitx' 21 | elif [ $input == i ]; then 22 | sed -i 's/#exec --no-startup-id ibus/exec --no-startup-id ibus/' ~/.config/i3/config 23 | echo '设置了ibus' 24 | else 25 | echo '你没有使用任何的输入法工具?' 26 | fi 27 | 28 | draw_line 29 | 30 | read -p '你需要使用networkmanager的托盘图标吗?输入y或者n:' nmicon 31 | 32 | if [[ $nmicon = y ]]; then 33 | sed -i "s/#exec --no-startup-id nm-applet/exec --no-startup-id nm-applet/" ~/.config/i3/config 34 | echo '设置成功,请确保你安装了nm-applet' 35 | fi 36 | 37 | draw_line 38 | 39 | read -p '你使用xcompmgr合成器(用以使终端背景透明)吗?输入y或者n:' xcomp 40 | 41 | if [[ $xcomp = y ]]; then 42 | sed -i "s/#exec --no-startup-id xcompmgr &/exec --no-startup-id xcompmgr &/" ~/.config/i3/config 43 | echo '设置成功,请确保你安装了xcompmgr' 44 | fi 45 | 46 | draw_line 47 | 48 | read -p "你使用mate-power-manager?输入y或者n:" matepower 49 | 50 | if [[ $matepower = y ]]; then 51 | sed -i "s/#exec --no-startup-id mate-power-manager/exec --no-startup-id mate-power-manager/" ~/.config/i3/config 52 | echo '设置成功,请确保你已经安装了mate-power-manager' 53 | fi 54 | 55 | draw_line 56 | 57 | echo '配置完成。更多配置参考README.md' 58 | -------------------------------------------------------------------------------- /config.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | tar -xJvf Pictures.tar.xz -C ~/ 3 | cp -av i3 ~/.config 4 | chmod +x *.sh -R 5 | 6 | lang= 7 | 8 | function select_lang() { 9 | while :; do 10 | echo "which language to use during installation?" 11 | echo -en " 12 | Input the Number you select. 13 | 14 | $(tput bold)1$(tput sgr0) English 15 | $(tput bold)2$(tput sgr0) Chinese 16 | " 17 | read select_num 18 | case $select_num in 19 | '1') 20 | lang='en' 21 | break 22 | ;; 23 | '2') 24 | lang='zh' 25 | break 26 | ;; 27 | *) 28 | continue 29 | ;; 30 | esac 31 | done 32 | } 33 | 34 | select_lang 35 | 36 | function draw_line() { 37 | [[ -z $1 ]] && str="-" || str=$1 38 | seq -s "$str" $COLUMNS | sed "s/[0-9]//g" 39 | } 40 | source ./config-${lang}.sh 41 | -------------------------------------------------------------------------------- /i3/config: -------------------------------------------------------------------------------- 1 | # i3 config file by Levinit https://github.com/levinit 2 | # see http://i3wm.org/docs/userguide.html for a complete reference! 3 | 4 | # Super key == ⊞ Windows logo key == Apple ⌘ Command key 5 | set $mod Mod4 6 | 7 | #===autostart parograms=== 8 | #exec --no-startup-id xcompmgr & 9 | #exec --no-startup-id mate-power-manager 10 | #exec --no-startup-id nm-applet 11 | #exec --no-startup-id fcitx 12 | #exec --no-startup-id ibus 13 | #exec --no-startup-id megasync 14 | #exec --no-startup-id redshift 15 | #exec --no-startup-id blueman-applet 16 | 17 | #===programs shortcuts=== 18 | 19 | # dmenu (a program launcher) 20 | bindsym $mod+d exec --no-startup-id i3-dmenu-desktop 21 | 22 | # xfce4 app finder 23 | bindsym mod1+F2 exec --no-startup-id xfce4-appfinder 24 | 25 | # terminal 26 | bindsym $mod+Return exec --no-startup-id i3-sensible-terminal 27 | 28 | # xfce drop down terminal 29 | bindsym mod1+slash exec xfce4-terminal --drop-down 30 | 31 | # GUI file manager -- thunar 32 | bindsym $mod+e exec --no-startup-id thunar 33 | 34 | # bar toggle, hide or show 35 | bindsym $mod+m bar mode toggle 36 | 37 | # browsers--firefox chromium 38 | bindsym $mod+Shift+f exec firefox 39 | bindsym $mod+Shift+c exec chromium 40 | 41 | 42 | # printscreen--scrot (Print key == PrtSc key == PrintScreen key == Pr Scn key) 43 | bindsym $mod+Print exec scrot 44 | 45 | 46 | #===appearance=== 47 | #---window style--- 48 | 49 | # window gap 50 | gaps inner 8 51 | gaps outer 5 52 | smart_gaps on 53 | 54 | 55 | # new window 56 | new_window none 57 | new_float normal 58 | hide_edge_borders both 59 | 60 | 61 | # window colors 62 | # class border background text indicator child_border 63 | client.focused #4c7899 #285577 #ffffff #2e9ef4 #285577 64 | client.focused_inactive #81c2d6 #5f676a #ffffff #484e50 #0b6e48 65 | client.unfocused #c9cabb #222222 #888888 #292d2e #222222 66 | client.urgent #2f343a #900000 #ffffff #199475 #900000 67 | client.placeholder #a2b4ba #0c0c0c #ffffff #1793d0 #0c0c0c 68 | client.background #82abba 69 | 70 | 71 | # popups 72 | for_window [window_role="pop-up"] floating enable 73 | for_window [window_role="task_dialog"] floating enable 74 | 75 | 76 | # float programs(find the GUI program name in "/usr/share/applictions") 77 | for_window [class="Xfce4-terminal"] floating enable 78 | for_window [class="Gpicview"] floating enable 79 | for_window [class="mpv"] floating enable 80 | for_window [class="Gimp"] floating enable 81 | for_window [class="Xarchiver"] floating enable 82 | for_window [class="Vlc"] floating enable 83 | for_window [class="VirtualBox"] floating enable 84 | for_window [class="Thunar"] floating enable 85 | for_window [class="Catfish"] floating enable 86 | for_window [class="Xfce4-appfinder"] floating enable 87 | 88 | 89 | #---wallpaper--- 90 | 91 | # static mode 92 | #exec --no-startup-id feh --bg-scale "~/Pictures/wallpapers/wallpaper.jpg" 93 | 94 | # random mode 95 | exec --no-startup-id ~/.config/i3/wallpaper.sh & 96 | 97 | # font 98 | font pango:monospace 14 99 | 100 | 101 | #---tray icons 102 | # get display device name, run: xrandr | grep connected 103 | 104 | # tray icons (eDP1 is the display device) 105 | exec --no-startup-id xrandr --output eDP1 --primary 106 | 107 | # external display device 108 | #exec --no-startup-id xrandr --output HDMI1 1920*1080 --right-of eDP1 109 | 110 | 111 | #---bar--- 112 | 113 | bar { 114 | # status_command i3status -c ~/.config/i3/i3status.conf 115 | status_command i3blocks -c ~/.config/i3/i3blocks.conf 116 | 117 | #output eDP1 118 | #tray_output primary 119 | 120 | position top 121 | mode hide 122 | workspace_buttons yes 123 | 124 | tray_padding 0 125 | separator_symbol "|" 126 | 127 | colors { 128 | background #285477 129 | statusline #dedede 130 | separator #2d2d2d 131 | focused_workspace #636e88 #285de7 #dedfdg 132 | active_workspace #556677 #234567 #56ef67 133 | inactive_workspace #636d72 #2d2d2d #dedede 134 | urgent_workspace #ffffff #900000 #d23d32 135 | } 136 | 137 | #height 30 138 | } 139 | 140 | 141 | #===workspace=== 142 | 143 | # Workspace names 144 | #workspace "1:Main" output eDP1 145 | #workspace "2:Web" output eDP1 146 | #workspace "3:Code" output eDP1 147 | #workspace "9:Work" output eDP1 148 | 149 | # putting clients on specific workspaces 150 | assign [class="Chromium"] 1 151 | assign [class="code"] 3 152 | 153 | 154 | #---switch workspace--- 155 | 156 | # switch to near workspace 157 | bindsym $mod+Tab workspace next 158 | bindsym mod1+Tab workspace prev 159 | 160 | # switch to workspace 161 | bindsym $mod+1 workspace 1 162 | bindsym $mod+2 workspace 2 163 | bindsym $mod+3 workspace 3 164 | bindsym $mod+4 workspace 4 165 | bindsym $mod+5 workspace 5 166 | bindsym $mod+6 workspace 6 167 | bindsym $mod+7 workspace 7 168 | bindsym $mod+8 workspace 8 169 | bindsym $mod+9 workspace 9 170 | bindsym $mod+0 workspace 10 171 | 172 | # move focused container to workspace 173 | bindsym $mod+Shift+1 move container to workspace 1 174 | bindsym $mod+Shift+2 move container to workspace 2 175 | bindsym $mod+Shift+3 move container to workspace 3 176 | bindsym $mod+Shift+4 move container to workspace 4 177 | bindsym $mod+Shift+5 move container to workspace 5 178 | bindsym $mod+Shift+6 move container to workspace 6 179 | bindsym $mod+Shift+7 move container to workspace 7 180 | bindsym $mod+Shift+8 move container to workspace 8 181 | bindsym $mod+Shift+9 move container to workspace 9 182 | bindsym $mod+Shift+0 move container to workspace 10 183 | 184 | 185 | #===window=== 186 | 187 | # fullscreen mode for the focused container 188 | bindsym $mod+f fullscreen toggle 189 | 190 | # toggle tiling / floating 191 | bindsym $mod+Shift+space floating toggle 192 | 193 | # kill focused window ($mod1 is Alt key) 194 | bindsym mod1+F4 kill 195 | 196 | # hide | show window(minus is "-" and plus is "+".) 197 | bindsym $mod+minus move scratchpad 198 | bindsym $mod+plus scratchpad show 199 | 200 | # change container layout (stacked, tabbed, toggle split) 201 | bindsym $mod+s layout stacking 202 | bindsym $mod+t layout tabbed 203 | bindsym $mod+c layout toggle split 204 | 205 | # change border style 206 | bindsym $mod+u border none 207 | bindsym $mod+n border normal 208 | bindsym $mod+o border 1pixel 209 | bindsym $mod+b border toggle 210 | 211 | #---focus window--- 212 | 213 | # change focus between tiling / floating windows 214 | bindsym $mod+space focus mode_toggle 215 | 216 | # foucus follows mouse(cursor) 217 | focus_follows_mouse yes 218 | 219 | # change focus 220 | bindsym $mod+h focus left 221 | bindsym $mod+j focus down 222 | bindsym $mod+k focus up 223 | bindsym $mod+l focus right 224 | # alternatively, you can use the cursor keys: 225 | bindsym $mod+Left focus left 226 | bindsym $mod+Down focus down 227 | bindsym $mod+Up focus up 228 | bindsym $mod+Right focus right 229 | 230 | # focus the parent container 231 | bindsym $mod+mod4+p focus parent 232 | 233 | # focus the child container 234 | #bindsym $mod+d focus child 235 | 236 | #---move window--- 237 | 238 | # Use Mouse+$mod to drag a floating window 239 | floating_modifier $mod 240 | 241 | # move floating/tiling window 242 | bindsym $mod+Shift+h move left 243 | bindsym $mod+Shift+j move down 244 | bindsym $mod+Shift+k move up 245 | bindsym $mod+Shift+l move right 246 | # alternatively, you can use the cursor keys: 247 | bindsym $mod+Shift+Left move left 248 | bindsym $mod+Shift+Down move down 249 | bindsym $mod+Shift+Up move up 250 | bindsym $mod+Shift+Right move right 251 | 252 | #---split window--- 253 | 254 | # horizontal orientation 255 | bindsym $mod+mod1+h split h 256 | 257 | # vertical orientation 258 | bindsym $mod+v split v 259 | 260 | 261 | #---resize window--- 262 | bindsym $mod+r mode "resize" 263 | 264 | #resize shortcuts (also you can use the mouse for resizing) 265 | mode "resize" { 266 | bindsym j resize shrink width 10 px or 10 ppt 267 | bindsym k resize grow height 10 px or 10 ppt 268 | bindsym l resize shrink height 10 px or 10 ppt 269 | bindsym semicolon resize grow width 10 px or 10 ppt 270 | #same bindings, but for the arrow keys 271 | bindsym Left resize shrink width 10 px or 10 ppt 272 | bindsym Down resize grow height 10 px or 10 ppt 273 | bindsym Up resize shrink height 10 px or 10 ppt 274 | bindsym Right resize grow width 10 px or 10 ppt 275 | # back to normal: Enter or Escape 276 | bindsym Return mode "default" 277 | bindsym Escape mode "default" 278 | } 279 | 280 | #===volume control=== 281 | bindsym XF86AudioRaiseVolume exec --no-startup-id amixer -c 0 -q set Master 2dB+ unmute 282 | bindsym XF86AudioLowerVolume exec --no-startup-id amixer -c 0 -q set Master 2dB- unmute 283 | bindsym XF86AudioMute exec --no-startup-id amixer -q set Master toggle 284 | 285 | #===power manager=== 286 | set $mode_system select: lock(L) exit(E) reboot(R) poweroff(O) cancel(Esc) 287 | bindsym $mod+Shift+q mode "$mode_system" 288 | mode "$mode_system" { 289 | bindsym l exec --no-startup-id i3lock -c '#000000', mode "default" 290 | bindsym e exec --no-startup-id i3-msg exit, mode "default" 291 | bindsym r exec --no-startup-id systemctl reboot, mode "default" 292 | bindsym o exec --no-startup-id systemctl poweroff, mode "default" 293 | bindsym Escape mode "default" 294 | } 295 | 296 | # screen off | sleep | shutdown(time unit: seconds) 297 | #exec --no-startup-id xset dpms 300 1357 6789 298 | exec --no-startup-id xset dpms 365 1357 299 | 300 | 301 | #===manage i3=== 302 | 303 | # reload the configuration file 304 | bindsym $mod+Shift+r reload 305 | 306 | # restart i3 307 | bindsym $mod+Shift+s restart 308 | 309 | # i3lock 310 | mode "i3lock: Return to lock/Escape to Cancel" { 311 | bindsym Return mode "default" exec i3lock -I 600 -i ~/Pictures/lock.jpg 312 | bindsym Escape mode "default" 313 | } 314 | 315 | # lock screen 316 | bindsym Ctrl+mod1+l mode "i3lock: Return to lock/Escape to Cancel" 317 | 318 | 319 | # exit i3 320 | bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'" -------------------------------------------------------------------------------- /i3/i3blocks.conf: -------------------------------------------------------------------------------- 1 | # i3blocks config file by Levinit https://github.com/levinit 2 | #i3blocks reference: http://vivien.github.io/i3blocks 3 | # List of built-in function, see /usr/lib/i3blocks 4 | # ls /usr/lib/i3blocks 5 | # 6 | # List of valid properties: 7 | # 8 | # align 9 | # color 10 | # command 11 | # full_text 12 | # instance 13 | # interval 14 | # label 15 | # min_width 16 | # name 17 | # separator 18 | # separator_block_width 19 | # short_text 20 | # signal 21 | # urgent 22 | 23 | #todo 24 | #[Weather] 25 | #command=~/.config/i3/scripts/weather3.sh "Beijing" 26 | #interval=1800 27 | #color=#c9c9ff 28 | #border=#535353 29 | 30 | # Global properties 31 | command=/usr/lib/i3blocks/$BLOCK_NAME 32 | separator_block_width=15 33 | markup=pango 34 | 35 | # Disk usage 36 | # 37 | # The directory defaults to $HOME if the instance is not specified. 38 | # The script may be called with a optional argument to set the alert 39 | # (defaults to 10 for 10%). 40 | [disk] 41 | label=HOME 42 | instance=/home 43 | interval=2333 44 | 45 | # Memory usage 46 | [memory] 47 | label=MEM 48 | #used 49 | #command=free -h |sed -n "2p" | awk '{print $3}' 50 | #free 51 | #command=free -h |sed -n "2p" | awk '{print $4}' 52 | #available 53 | command=free -h | sed -n "2p" | awk '{print $NF}' 54 | separator=true 55 | interval=30 56 | color=#7ea1a5 57 | 58 | #[memory] 59 | #label=SWAP 60 | #instance=swap 61 | #separator=false 62 | #interval=30 63 | 64 | # CPU usage 65 | # 66 | # The script may be called with -w and -c switches to specify thresholds, 67 | #[cpu_usage] 68 | #label=CPU 69 | #interval=10 70 | #command=$SCRIPT_DIR/cpu_usage 71 | #min_width=CPU: 100.00% 72 | #separator=false 73 | 74 | # Temperature 75 | # Support multiple chips, though lm-sensors. 76 | # The script may be called with -w and -c switches to specify thresholds, 77 | [temperature] 78 | label=🌡️ 79 | command=sensors | grep Core | awk '{print $3}' | grep -oE "[0-9.]+" 80 | interval=30 81 | 82 | #Load 83 | [load_average] 84 | label=Load 85 | interval=60 86 | 87 | # Network interface monitoring 88 | # 89 | # If the instance is not specified, use the interface used for default route. 90 | # The address can be forced to IPv4 or IPv6 with -4 or -6 switches. 91 | [iface] 92 | #instance=wlan0 93 | color=#00FF00 94 | interval=233 95 | 96 | #wifi network quality 📶 U+1F4F6 97 | #[wifi] 98 | #instance=wlp1s0 99 | #interval=50 100 | #separator=true 101 | 102 | #🌐 U+1F310 103 | [bandwidth] 104 | instance=wlp1s0 105 | interval=5 106 | separator=true 107 | 108 | # Key indicators 109 | # If it did not work,add the following bindings to i3 config file: 110 | # bindsym --release Caps_Lock exec pkill -SIGRTMIN+11 i3blocks 111 | # bindsym --release Num_Lock exec pkill -SIGRTMIN+11 i3blocks 112 | [keyindicator] 113 | instance=CAPS 114 | interval=3 115 | signal=11 116 | 117 | [keyindicator] 118 | instance=NUM 119 | interval=3 120 | signal=11 121 | 122 | # Battery indicator 123 | # The battery instance defaults to 0. ⚡ 🔋: U+1F50B 124 | [battery] 125 | #label=BAT 126 | label=🔋 127 | command=acpi | grep -o -E "[0-9]+%" 128 | instance=1 129 | interval=123 130 | 131 | # Date Time 132 | [time] 133 | command=date '+%Y-%m-%d %H:%M %A' 134 | #command=date '+%Y-%m-%d %H:%M %a' 135 | #command=date '+%Y-%m-%d %H:%M %w' 136 | interval=59 137 | 138 | # Generic media player support 139 | # displays "ARTIST - SONG" if a music is playing. Support: spotify, vlc, audacious, xmms2, mplayer, and others. 140 | [mediaplayer] 141 | instance=spotify 142 | interval=33 143 | signal=30 144 | 145 | # OpenVPN support 146 | #[openvpn] 147 | #interval=20 148 | 149 | # Volume indicator 🔊: U+1F50A ♪ 150 | [volume] 151 | #label=VOL 152 | label=🔊 153 | instance=Master 154 | #instance=PCM 155 | interval=persist 156 | signal=10 157 | -------------------------------------------------------------------------------- /i3/i3status.conf: -------------------------------------------------------------------------------- 1 | # i3status configuration 2 | 3 | general { 4 | colors = true 5 | output_format=i3bar 6 | interval = 30 7 | } 8 | 9 | order += "cpu_temperature 0" 10 | #order += "cpu_usage" 11 | order += "memory" 12 | #order += "disk /" 13 | #order += "disk /home" 14 | order += "load" 15 | order += "volume master" 16 | order += "tztime local" 17 | #order += "ipv6" 18 | order += "wireless _first_" 19 | order += "ethernet _first_" 20 | #order += "run_watch DHCP" 21 | #order += "run_watch VPN" 22 | order += "battery all" 23 | 24 | wireless _first_ { 25 | format_up = "%ip@%essid-%quality" 26 | format_down = "" 27 | } 28 | 29 | ethernet _first_ { 30 | # if you use %speed, i3status requires root privileges 31 | format_up = "%ip (%speed)" 32 | format_down = "" 33 | } 34 | 35 | battery all { 36 | format = "%status %percentage %remaining %emptytime" 37 | format_down = "No Battery" 38 | status_chr = "🔌CHR" 39 | status_bat = "🔋BAT" 40 | status_unk = "?UNKOWN" 41 | status_full = "🔌FULL" 42 | path = "/sys/class/power_supply/BAT%d/uevent" 43 | low_threshold = 10 44 | threshold_type= time 45 | } 46 | 47 | run_watch DHCP { 48 | pidfile = "/var/run/dhclient*.pid" 49 | } 50 | 51 | run_watch VPN { 52 | pidfile = "/var/run/vpnc/pid" 53 | } 54 | 55 | tztime local { 56 | format = "⏲%Y-%m-%d %H:%M" 57 | } 58 | 59 | load { 60 | format = "Load:%5min" 61 | } 62 | 63 | disk "/" { 64 | format = "Root:%avail" 65 | } 66 | 67 | disk "/home" { 68 | format = "Home:%avail" 69 | } 70 | 71 | cpu_temperature 0 { 72 | format = "CPU %degrees°C" 73 | max_threshold = 60 74 | path = "/sys/class/thermal/thermal_zone0/temp" 75 | } 76 | 77 | cpu_usage { 78 | format = "%usage" 79 | } 80 | 81 | #memory { 82 | # format = "%used | %available" 83 | # threshold_degraded = "1G" 84 | # format_degraded = "MEMORY < %available" 85 | #} 86 | 87 | volume master { 88 | format = "🔊%volume" 89 | format_muted = "🔇muted" 90 | device = "default" 91 | mixer = "Master" 92 | mixer_idx = 0 93 | } 94 | -------------------------------------------------------------------------------- /i3/wallpaper.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | shopt -s nullglob 3 | 4 | if [[ -z $(which feh) ]] 5 | then 6 | echo "wallpaper err: Can not found command feh." > ~/i3wm-wallpaper.err 7 | exit 127 8 | fi 9 | 10 | #===change these config start=== 11 | 12 | #wallpapers directory 13 | path=~/Pictures/wallpapers 14 | 15 | #time interval 16 | interval=15m 17 | 18 | #===change these config end=== 19 | 20 | cd $path 21 | 22 | while true 23 | do 24 | files=() 25 | 26 | for i in *.jpg *.png; do 27 | [[ -f $i ]] && files+=("$i") 28 | done 29 | range=${#files[@]} 30 | 31 | ((range)) && feh --bg-scale "${files[RANDOM % range]}" 32 | 33 | sleep $interval 34 | done 35 | 36 | # another script refer https://wiki.archlinux.org/index.php/Feh_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87) 37 | # while true; do 38 | # find ~/.wallpaper -type f \( -name '*.jpg' -o -name '*.png' \) -print0 | 39 | # shuf -n1 -z | xargs -0 feh --bg-scale 40 | # sleep 15m 41 | # done 42 | -------------------------------------------------------------------------------- /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/levinit/i3wm-config/ce6a22e325377ecb232ff148c07bdccfea4b0074/screenshot.png --------------------------------------------------------------------------------