16 files changed,
466 insertions(+),
924 deletions(-)
Author:
Smirnov Alexandr
ss2316544@gmail.com
Committed at:
2021-02-26 17:08:25 +0200
Parent:
8511aa4
jump to
M
README.md
··· 5 5 6 6 #### System configuration 7 7 - `OS` Arch 8 -- `WM` bspwm 9 -- `Terminal` alacritty 8 +- `WM` bspwm, openbox 9 +- `Terminal` alacritty, kitty 10 10 - `Shell` zsh 11 11 - `Editor` nvim, vscode 12 12 - `File manager` ranger ··· 23 23 24 24 Install dependency: 25 25 ```bash 26 -sudo pacman -S neovim tmux git bspwm sxhkd alacritty picom dunst zsh rofi ranger firefox ttf-font-awesome ttf-jetbrains 26 +sudo pacman -S neovim tmux git openbox tint2 bspwm sxhkd kitty picom dunst zsh rofi ranger firefox ttf-font-awesome ttf-jetbrains 27 27 yay -S polybar xkblayout 28 28 ``` 29 29
D
config/fish/config.fish
··· 1 -set -U fish_user_paths $HOME/bin $HOME/.yarn/bin $HOME/.applications $fish_user_paths 2 -set fish_greeting 3 - 4 -## Variables 5 -set EDITOR "nvim" 6 -set VISUAL "nvim" 7 - 8 - 9 -## Key bindings 10 -function fish_user_key_bindings 11 - fish_default_key_bindings 12 - # fish_vi_key_bindings 13 -end 14 - 15 - 16 -## Colors 17 -set fish_color_normal brwhite 18 -set fish_color_autosuggestion '#DDDDDD' 19 -set fish_color_command brcyan 20 -set fish_color_error '#ff6c6b' 21 -set fish_color_param brwhite 22 - 23 - 24 -## Functions 25 -function backup --argument filename 26 - cp $filename $filename.bak 27 -end 28 - 29 -function targz-this-folder --argument filename 30 - tar -czf $filename.tar.gz . 31 -end 32 - 33 -function zip-this-folder --argument filename 34 - zip -r $filename.zip . 35 -end 36 - 37 -function set-wallpaper --argument filename 38 - feh --bg-scale $filename 39 -end 40 - 41 -function set-random-wallpaper 42 - feh --randomize --bg-scale ~/Pictures/wallp 43 -end 44 - 45 - 46 -## Plugins 47 -fundle plugin 'matchai/spacefish' # Prompt theme 48 -fundle plugin 'justinmayer/virtualfish' # Python venv support 49 -fundle plugin 'FabioAntunes/fish-nvm' # NVM status 50 -fundle plugin 'edc/bass' # Required for fish-nvm 51 -fundle plugin 'jorgebucaran/autopair.fish' # Brackets closer 52 -fundle init 53 - 54 - 55 -## Aliases 56 -alias cls="clear" 57 -alias mkdir="mkdir -p" 58 -alias cp="cp -r" 59 -alias du="du -sh" 60 -alias df="df -h" 61 -alias neovim='nvim' 62 -alias vim="nvim" 63 -alias vi="vim" 64 -alias tmux="tmux -2" 65 -alias :q="exit" 66 -alias q="exit" 67 -alias ..="cd .." 68 -alias ...="cd ../.."
M
config/i3/config
··· 19 19 exec_always --no-startup-id exec setxkbmap "us,ua" ",winkeys" "grp:alt_shift_toggle" -option "ctrl:nocaps" 20 20 exec_always --no-startup-id exec feh --randomize --bg-scale ~/Pictures/wallp 21 21 exec --no-startup-id exec picom -b 22 -exec --no-startup-id exec lxsession 23 22 24 23 ############ Variables ########### 25 24 set $terminal kitty ··· 37 36 # Restart i3wm 38 37 bindsym $mod+Control+r restart 39 38 40 -# Floating layout 41 -bindsym $mod+Shift+Tab floating toggle 42 - 43 -# Tab layout 39 +# Layout 44 40 bindsym $mod+Control+w layout tabbed 45 - 46 -# Split layout 47 41 bindsym $mod+Control+e layout toggle split 42 +bindsym $mod+Shift+Tab floating toggle 48 43 49 -# Splits 50 -bindsym $mod+b split h 51 -bindsym $mod+v split v 44 +# Split mode 45 +bindsym $mod+$alt+h split h 46 +bindsym $mod+$alt+v split v 52 47 53 48 # Scratchpad 54 49 bindsym $mod+Shift+grave move scratchpad ··· 56 51 57 52 ############## User key ########### 58 53 59 -# Menus 60 -bindsym $mod+Shift+Return exec rofi -show drun -theme ntenV2 61 -bindsym $mod+Escape exec ~/.script/dmenu/dmenu-power.sh 62 -bindsym $mod+Control+i exec ~/.script/dmenu/dmenu-pass.sh 63 - 64 -# Apps 65 -bindsym $mod+Return exec $terminal 54 +# Applications 55 +bindsym $mod+Return exec $terminal 66 56 bindsym $mod+Shift+w exec $browser 67 57 bindsym $mod+Shift+f exec $filemanager 68 58 bindsym $mod+Shift+e exec $codeeditor ··· 70 60 bindsym $mod+Shift+v exec veracrypt 71 61 bindsym $mod+Shift+s exec ~/.applications/simplenote.appimage 72 62 73 -# Sceenshot 63 +# Menu 64 +bindsym $mod+Shift+Return exec rofi -show drun -theme ntenV2 65 +bindsym $mod+Escape exec ~/.script/dmenu/dmenu-power.sh 66 +bindsym $mod+Control+i exec ~/.script/dmenu/dmenu-pass.sh 67 + 68 +# Screenhot 74 69 bindsym --release Print exec scrot -s /home/${USER}/$(date +%Y-%m-%d-%H-%M-%S).png 75 70 bindsym Shift+Print exec scrot /home/${USER}/$(date +%Y-%m-%d-%H-%M-%S).png 76 71 77 -# Lockscreen 78 -bindsym $mod+Shift+z exec betterlockscreen --off 180 -t "Computer is lockerd" -l 79 - 80 72 # Volume 81 73 bindsym $mod+plus exec amixer sset Master 2%+ 82 74 bindsym $mod+minus exec amixer sset Master 2%- 83 75 bindsym $mod+Shift+minus exec amixer sset Master toggle 84 76 77 +############## GAPS ############### 78 +smart_gaps on 79 +gaps inner 3 80 +gaps outer 4 81 + 85 82 ######### Window preferens ######## 86 83 assign [class="(?i)alacritty|kitty"] $ws1 87 84 assign [class="(?i)google-chrome-stable|firefox"] $ws2 ··· 90 87 assign [class="Joplin|Simplenote"] $ws5 91 88 assign [class="TelegramDesktop|discord"] $ws6 92 89 for_window [class="TelegramDesktop|discord"] layout tabbed 93 -assign [class="KeePassXC"] $ws7 90 +assign [class="KeePassX"] $ws7 94 91 assign [class="Spotify"] $ws9 95 92 for_window [title="Google Tasks"] floating enable 96 93 focus_on_window_activation focus ··· 163 160 position top 164 161 colors { 165 162 background #262A2B 166 - statusline #FFFFFF 167 - separator #58676C 168 - focused_workspace #008DCD #008DCD #FFFFFF 169 - active_workspace #262A2B #262A2B #FFFFFF 163 + statusline #DFDFDF 164 + separator #CED4DA 165 + focused_workspace #008DCD #008DCD #DFDFDF 166 + active_workspace #262A2B #262A2B #DFDFDF 170 167 inactive_workspace #262A2B #262A2B #DFDFDF 171 - urgent_workspace #FF6C6B #FF6C6B #FFFFFF 172 - binding_mode #2F343A #900000 #FFFFFF 168 + urgent_workspace #FF6C6B #FF6C6B #DFDFDF 169 + binding_mode #2F343A #900000 #DFDFDF 173 170 } 174 171 } 175 172 ############## Colors ############# 176 -# Class Border Backgr Text Indicator Child_border 177 -client.focused #008DCD #008DCD #FFFFFF #008DCD #008DCD 178 -client.focused_inactive #008DCD #002b36 #DFDFDF #002b36 #002b36 179 -client.unfocused #262A2B #262A2B #DFDFDF #262A2B #262A2B 180 -client.urgent #002b36 #262A2B #FFFFFF #262A2B #262A2B 181 -client.placeholder #000000 #000000 #FFFFFF #000000 #000000 173 +client.focused #008DCD #008DCD #FFFFFF #008DCD #008DCD 174 +client.focused_inactive #008DCD #002b36 #DFDFDF #002b36 #002b36 175 +client.unfocused #262A2B #262A2B #DFDFDF #262A2B #262A2B 176 +client.urgent #002b36 #262A2B #FFFFFF #262A2B #262A2B 177 +client.placeholder #000000 #000000 #FFFFFF #000000 #000000 182 178 client.background #FFFFFF 183 179 184 180 # vim: ft=i3config
M
config/openbox/rc.xml
··· 1 1 <?xml version="1.0" encoding="UTF-8"?> 2 2 <openbox_config xmlns="http://openbox.org/3.4/rc" xmlns:xi="http://www.w3.org/2001/XInclude"> 3 - <resistance> 4 - <strength>10</strength> 5 - <screen_edge_strength>20</screen_edge_strength> 6 - </resistance> 7 - <focus> 8 - <focusNew>yes</focusNew> 9 - <followMouse>no</followMouse> 10 - <focusLast>yes</focusLast> 11 - <underMouse>no</underMouse> 12 - <focusDelay>70</focusDelay> 13 - <raiseOnFocus>no</raiseOnFocus> 14 - </focus> 15 - <placement> 16 - <policy>Smart</policy> 17 - <center>yes</center> 18 - <monitor>Primary</monitor> 19 - <primaryMonitor>1</primaryMonitor> 20 - </placement> 21 - <theme> 22 - <name>nten</name> 23 - <titleLayout>NLIMC</titleLayout> 24 - <keepBorder>yes</keepBorder> 25 - <animateIconify>yes</animateIconify> 26 - <font place="ActiveWindow"> 27 - <name>sans</name> 28 - <size>8</size> 29 - <weight>bold</weight> 30 - <slant>normal</slant> 31 - </font> 32 - <font place="InactiveWindow"> 33 - <name>sans</name> 34 - <size>8</size> 35 - <weight>bold</weight> 36 - <slant>normal</slant> 37 - </font> 38 - <font place="MenuHeader"> 39 - <name>sans</name> 40 - <size>9</size> 41 - <weight>normal</weight> 42 - <slant>normal</slant> 43 - </font> 44 - <font place="MenuItem"> 45 - <name>sans</name> 46 - <size>9</size> 47 - <weight>normal</weight> 48 - <slant>normal</slant> 49 - </font> 50 - <font place="ActiveOnScreenDisplay"> 51 - <name>sans</name> 52 - <size>9</size> 53 - <weight>bold</weight> 54 - <slant>normal</slant> 55 - </font> 56 - <font place="InactiveOnScreenDisplay"> 57 - <name>sans</name> 58 - <size>9</size> 59 - <weight>bold</weight> 60 - <slant>normal</slant> 61 - </font> 62 - </theme> 63 - <desktops> 64 - <number>1</number> 65 - <firstdesk>1</firstdesk> 66 - <names> 67 - <name>Desktop</name> 68 - </names> 69 - <popupTime>0</popupTime> 70 - </desktops> 71 - <resize> 72 - <drawContents>yes</drawContents> 73 - <popupShow>Nonpixel</popupShow> 74 - <popupPosition>Center</popupPosition> 75 - <popupFixedPosition> 76 - <x>10</x> 77 - <y>10</y> 78 - </popupFixedPosition> 79 - </resize> 80 - <margins> 81 - <top>0</top> 82 - <bottom>0</bottom> 83 - <left>0</left> 84 - <right>0</right> 85 - </margins> 86 - <dock> 87 - <position>BottomLeft</position> 88 - <floatingX>0</floatingX> 89 - <floatingY>0</floatingY> 90 - <noStrut>no</noStrut> 91 - <stacking>Above</stacking> 92 - <direction>Vertical</direction> 93 - <autoHide>no</autoHide> 94 - <hideDelay>300</hideDelay> 95 - <showDelay>300</showDelay> 96 - <moveButton>Middle</moveButton> 97 - </dock> 98 - <keyboard> 99 - <chainQuitKey>C-g</chainQuitKey> 100 - <keybind key="W-d"> 101 - <action name="ToggleShowDesktop" /> 102 - </keybind> 103 - <!-- Keybindings for windows --> 104 - <keybind key="A-F4"> 105 - <action name="Close" /> 106 - </keybind> 107 - <!-- Keybindings for window switching --> 108 - <keybind key="A-Tab"> 109 - <action name="NextWindow"> 110 - <finalactions> 111 - <action name="Focus" /> 112 - <action name="Raise" /> 113 - <action name="Unshade" /> 114 - </finalactions> 115 - </action> 116 - </keybind> 117 - <keybind key="A-S-Tab"> 118 - <action name="PreviousWindow"> 119 - <finalactions> 120 - <action name="Focus" /> 121 - <action name="Raise" /> 122 - <action name="Unshade" /> 123 - </finalactions> 124 - </action> 125 - </keybind> 126 - <!-- Keybindings for running applications --> 127 - <keybind key="W-Return"> 128 - <action name="Execute"> 129 - <command>kitty</command> 130 - </action> 131 - </keybind> 132 - <keybind key="W-S-w"> 133 - <action name="Execute"> 134 - <command>google-chrome-stable</command> 135 - </action> 136 - </keybind> 137 - </keyboard> 138 - <mouse> 139 - <dragThreshold>1</dragThreshold> 140 - <doubleClickTime>500</doubleClickTime> 141 - <screenEdgeWarpTime>400</screenEdgeWarpTime> 142 - <screenEdgeWarpMouse>false</screenEdgeWarpMouse> 143 - <context name="Frame"> 144 - <mousebind button="A-Left" action="Press"> 145 - <action name="Focus" /> 146 - <action name="Raise" /> 147 - </mousebind> 148 - <mousebind button="A-Left" action="Click"> 149 - <action name="Unshade" /> 150 - </mousebind> 151 - <mousebind button="A-Left" action="Drag"> 152 - <action name="Move" /> 153 - </mousebind> 154 - <mousebind button="A-Right" action="Press"> 155 - <action name="Focus" /> 156 - <action name="Raise" /> 157 - <action name="Unshade" /> 158 - </mousebind> 159 - <mousebind button="A-Right" action="Drag"> 160 - <action name="Resize" /> 161 - </mousebind> 162 - </context> 163 - <context name="Titlebar"> 164 - <mousebind button="Left" action="Drag"> 165 - <action name="Move" /> 166 - </mousebind> 167 - <mousebind button="Left" action="DoubleClick"> 168 - <action name="ToggleMaximize" /> 169 - </mousebind> 170 - <mousebind button="Up" action="Click"> 171 - <action name="if"> 172 - <shaded>no</shaded> 173 - <then> 174 - <action name="Shade" /> 175 - <action name="FocusToBottom" /> 176 - <action name="Unfocus" /> 177 - <action name="Lower" /> 178 - </then> 179 - </action> 180 - </mousebind> 181 - <mousebind button="Down" action="Click"> 182 - <action name="if"> 183 - <shaded>yes</shaded> 184 - <then> 185 - <action name="Unshade" /> 186 - <action name="Raise" /> 187 - </then> 188 - </action> 189 - </mousebind> 190 - </context> 191 - <context name="Titlebar Top Right Bottom Left TLCorner TRCorner BRCorner BLCorner"> 192 - <mousebind button="Left" action="Press"> 193 - <action name="Focus" /> 194 - <action name="Raise" /> 195 - <action name="Unshade" /> 196 - </mousebind> 197 - <mousebind button="Right" action="Press"> 198 - <action name="Focus" /> 199 - <action name="Raise" /> 200 - <action name="ShowMenu"> 201 - <menu>client-menu</menu> 202 - </action> 203 - </mousebind> 204 - </context> 205 - <context name="Top"> 206 - <mousebind button="Left" action="Drag"> 207 - <action name="Resize"> 208 - <edge>top</edge> 209 - </action> 210 - </mousebind> 211 - </context> 212 - <context name="Left"> 213 - <mousebind button="Left" action="Drag"> 214 - <action name="Resize"> 215 - <edge>left</edge> 216 - </action> 217 - </mousebind> 218 - </context> 219 - <context name="Right"> 220 - <mousebind button="Left" action="Drag"> 221 - <action name="Resize"> 222 - <edge>right</edge> 223 - </action> 224 - </mousebind> 225 - </context> 226 - <context name="Bottom"> 227 - <mousebind button="Left" action="Drag"> 228 - <action name="Resize"> 229 - <edge>bottom</edge> 230 - </action> 231 - </mousebind> 232 - <mousebind button="Right" action="Press"> 233 - <action name="Focus" /> 234 - <action name="Raise" /> 235 - <action name="ShowMenu"> 236 - <menu>client-menu</menu> 237 - </action> 238 - </mousebind> 239 - </context> 240 - <context name="TRCorner BRCorner TLCorner BLCorner"> 241 - <mousebind button="Left" action="Press"> 242 - <action name="Focus" /> 243 - <action name="Raise" /> 244 - <action name="Unshade" /> 245 - </mousebind> 246 - <mousebind button="Left" action="Drag"> 247 - <action name="Resize" /> 248 - </mousebind> 249 - </context> 250 - <context name="Client"> 251 - <mousebind button="Left" action="Press"> 252 - <action name="Focus" /> 253 - <action name="Raise" /> 254 - </mousebind> 255 - <mousebind button="Middle" action="Press"> 256 - <action name="Focus" /> 257 - <action name="Raise" /> 258 - </mousebind> 259 - <mousebind button="Right" action="Press"> 260 - <action name="Focus" /> 261 - <action name="Raise" /> 262 - </mousebind> 263 - </context> 264 - <context name="Icon"> 265 - <mousebind button="Left" action="Press"> 266 - <action name="Focus" /> 267 - <action name="Raise" /> 268 - <action name="Unshade" /> 269 - <action name="ShowMenu"> 270 - <menu>client-menu</menu> 271 - </action> 272 - </mousebind> 273 - <mousebind button="Right" action="Press"> 274 - <action name="Focus" /> 275 - <action name="Raise" /> 276 - <action name="ShowMenu"> 277 - <menu>client-menu</menu> 278 - </action> 279 - </mousebind> 280 - </context> 281 - <context name="AllDesktops"> 282 - <mousebind button="Left" action="Press"> 283 - <action name="Focus" /> 284 - <action name="Raise" /> 285 - <action name="Unshade" /> 286 - </mousebind> 287 - <mousebind button="Left" action="Click"> 288 - <action name="ToggleOmnipresent" /> 289 - </mousebind> 290 - </context> 291 - <context name="Shade"> 292 - <mousebind button="Left" action="Press"> 293 - <action name="Focus" /> 294 - <action name="Raise" /> 295 - </mousebind> 296 - <mousebind button="Left" action="Click"> 297 - <action name="ToggleShade" /> 298 - </mousebind> 299 - </context> 300 - <context name="Iconify"> 301 - <mousebind button="Left" action="Press"> 302 - <action name="Focus" /> 303 - <action name="Raise" /> 304 - </mousebind> 305 - <mousebind button="Left" action="Click"> 306 - <action name="Iconify" /> 307 - </mousebind> 308 - </context> 309 - <context name="Maximize"> 310 - <mousebind button="Left" action="Press"> 311 - <action name="Focus" /> 312 - <action name="Raise" /> 313 - <action name="Unshade" /> 314 - </mousebind> 315 - <mousebind button="Middle" action="Press"> 316 - <action name="Focus" /> 317 - <action name="Raise" /> 318 - <action name="Unshade" /> 319 - </mousebind> 320 - <mousebind button="Right" action="Press"> 321 - <action name="Focus" /> 322 - <action name="Raise" /> 323 - <action name="Unshade" /> 324 - </mousebind> 325 - <mousebind button="Left" action="Click"> 326 - <action name="ToggleMaximize" /> 327 - </mousebind> 328 - <mousebind button="Middle" action="Click"> 329 - <action name="ToggleMaximize"> 330 - <direction>vertical</direction> 331 - </action> 332 - </mousebind> 333 - <mousebind button="Right" action="Click"> 334 - <action name="ToggleMaximize"> 335 - <direction>horizontal</direction> 336 - </action> 337 - </mousebind> 338 - </context> 339 - <context name="Close"> 340 - <mousebind button="Left" action="Press"> 341 - <action name="Focus" /> 342 - <action name="Raise" /> 343 - <action name="Unshade" /> 344 - </mousebind> 345 - <mousebind button="Left" action="Click"> 346 - <action name="Close" /> 347 - </mousebind> 348 - </context> 349 - <context name="Desktop"> 350 - <mousebind button="Up" action="Click"> 351 - <action name="GoToDesktop"> 352 - <to>previous</to> 353 - </action> 354 - </mousebind> 355 - <mousebind button="Down" action="Click"> 356 - <action name="GoToDesktop"> 357 - <to>next</to> 358 - </action> 359 - </mousebind> 360 - <mousebind button="A-Up" action="Click"> 361 - <action name="GoToDesktop"> 362 - <to>previous</to> 363 - </action> 364 - </mousebind> 365 - <mousebind button="A-Down" action="Click"> 366 - <action name="GoToDesktop"> 367 - <to>next</to> 368 - </action> 369 - </mousebind> 370 - <mousebind button="C-A-Up" action="Click"> 371 - <action name="GoToDesktop"> 372 - <to>previous</to> 373 - </action> 374 - </mousebind> 375 - <mousebind button="C-A-Down" action="Click"> 376 - <action name="GoToDesktop"> 377 - <to>next</to> 378 - </action> 379 - </mousebind> 380 - <mousebind button="Left" action="Press"> 381 - <action name="Focus" /> 382 - <action name="Raise" /> 383 - </mousebind> 384 - <mousebind button="Right" action="Press"> 385 - <action name="Focus" /> 386 - <action name="Raise" /> 387 - </mousebind> 388 - </context> 389 - <context name="Root"> 390 - <mousebind button="Right" action="Press"> 391 - <action name="ShowMenu"> 392 - <menu>root-menu</menu> 393 - </action> 394 - </mousebind> 395 - </context> 396 - <context name="MoveResize"> 397 - <mousebind button="Up" action="Click"> 398 - <action name="GoToDesktop"> 399 - <to>previous</to> 400 - </action> 401 - </mousebind> 402 - </context> 403 - </mouse> 404 - <menu> 405 - <file>menu.xml</file> 406 - <hideDelay>200</hideDelay> 407 - <middle>no</middle> 408 - <submenuShowDelay>100</submenuShowDelay> 409 - <submenuHideDelay>400</submenuHideDelay> 410 - <showIcons>yes</showIcons> 411 - <manageDesktops>yes</manageDesktops> 412 - </menu> 413 - <applications /> 414 -</openbox_config> 3 + <resistance> 4 + <strength>10</strength> 5 + <screen_edge_strength>20</screen_edge_strength> 6 + </resistance> 7 + <focus> 8 + <focusNew>yes</focusNew> 9 + <followMouse>no</followMouse> 10 + <focusLast>yes</focusLast> 11 + <underMouse>no</underMouse> 12 + <focusDelay>70</focusDelay> 13 + <raiseOnFocus>no</raiseOnFocus> 14 + </focus> 15 + <placement> 16 + <policy>Smart</policy> 17 + <center>yes</center> 18 + <monitor>Primary</monitor> 19 + <primaryMonitor>1</primaryMonitor> 20 + </placement> 21 + <theme> 22 + <name>nten</name> 23 + <titleLayout>NLIMC</titleLayout> 24 + <keepBorder>yes</keepBorder> 25 + <animateIconify>yes</animateIconify> 26 + <font place="ActiveWindow"> 27 + <name>sans</name> 28 + <size>8</size> 29 + <weight>bold</weight> 30 + <slant>normal</slant> 31 + </font> 32 + <font place="InactiveWindow"> 33 + <name>sans</name> 34 + <size>8</size> 35 + <weight>bold</weight> 36 + <slant>normal</slant> 37 + </font> 38 + <font place="MenuHeader"> 39 + <name>sans</name> 40 + <size>9</size> 41 + <weight>normal</weight> 42 + <slant>normal</slant> 43 + </font> 44 + <font place="MenuItem"> 45 + <name>sans</name> 46 + <size>9</size> 47 + <weight>normal</weight> 48 + <slant>normal</slant> 49 + </font> 50 + <font place="ActiveOnScreenDisplay"> 51 + <name>sans</name> 52 + <size>9</size> 53 + <weight>bold</weight> 54 + <slant>normal</slant> 55 + </font> 56 + <font place="InactiveOnScreenDisplay"> 57 + <name>sans</name> 58 + <size>9</size> 59 + <weight>bold</weight> 60 + <slant>normal</slant> 61 + </font> 62 + </theme> 63 + <desktops> 64 + <number>1</number> 65 + <firstdesk>1</firstdesk> 66 + <names> 67 + <name>Desktop</name> 68 + </names> 69 + <popupTime>0</popupTime> 70 + </desktops> 71 + <resize> 72 + <drawContents>yes</drawContents> 73 + <popupShow>Nonpixel</popupShow> 74 + <popupPosition>Center</popupPosition> 75 + <popupFixedPosition> 76 + <x>10</x> 77 + <y>10</y> 78 + </popupFixedPosition> 79 + </resize> 80 + <margins> 81 + <top>0</top> 82 + <bottom>0</bottom> 83 + <left>0</left> 84 + <right>0</right> 85 + </margins> 86 + <dock> 87 + <position>BottomLeft</position> 88 + <floatingX>0</floatingX> 89 + <floatingY>0</floatingY> 90 + <noStrut>no</noStrut> 91 + <stacking>Above</stacking> 92 + <direction>Vertical</direction> 93 + <autoHide>no</autoHide> 94 + <hideDelay>300</hideDelay> 95 + <showDelay>300</showDelay> 96 + <moveButton>Middle</moveButton> 97 + </dock> 98 + <keyboard> 99 + <chainQuitKey>C-g</chainQuitKey> 100 + <keybind key="W-d"> 101 + <action name="ToggleShowDesktop"/> 102 + </keybind> 103 + <!-- Keybindings for windows --> 104 + <keybind key="A-F4"> 105 + <action name="Close"/> 106 + </keybind> 107 + <!-- Keybindings for window switching --> 108 + <keybind key="A-Tab"> 109 + <action name="NextWindow"> 110 + <finalactions> 111 + <action name="Focus"/> 112 + <action name="Raise"/> 113 + <action name="Unshade"/> 114 + </finalactions> 115 + </action> 116 + </keybind> 117 + <keybind key="A-S-Tab"> 118 + <action name="PreviousWindow"> 119 + <finalactions> 120 + <action name="Focus"/> 121 + <action name="Raise"/> 122 + <action name="Unshade"/> 123 + </finalactions> 124 + </action> 125 + </keybind> 126 + <!-- Keybindings for running applications --> 127 + <keybind key="W-Return"> 128 + <action name="Execute"> 129 + <command>kitty</command> 130 + </action> 131 + </keybind> 132 + <keybind key="W-S-w"> 133 + <action name="Execute"> 134 + <command>google-chrome-stable</command> 135 + </action> 136 + </keybind> 137 + </keyboard> 138 + <mouse> 139 + <dragThreshold>1</dragThreshold> 140 + <doubleClickTime>500</doubleClickTime> 141 + <screenEdgeWarpTime>400</screenEdgeWarpTime> 142 + <screenEdgeWarpMouse>false</screenEdgeWarpMouse> 143 + <context name="Frame"> 144 + <mousebind button="A-Left" action="Press"> 145 + <action name="Focus"/> 146 + <action name="Raise"/> 147 + </mousebind> 148 + <mousebind button="A-Left" action="Click"> 149 + <action name="Unshade"/> 150 + </mousebind> 151 + <mousebind button="A-Left" action="Drag"> 152 + <action name="Move"/> 153 + </mousebind> 154 + <mousebind button="A-Right" action="Press"> 155 + <action name="Focus"/> 156 + <action name="Raise"/> 157 + <action name="Unshade"/> 158 + </mousebind> 159 + <mousebind button="A-Right" action="Drag"> 160 + <action name="Resize"/> 161 + </mousebind> 162 + </context> 163 + <context name="Titlebar"> 164 + <mousebind button="Left" action="Drag"> 165 + <action name="Move"/> 166 + </mousebind> 167 + <mousebind button="Left" action="DoubleClick"> 168 + <action name="ToggleMaximize"/> 169 + </mousebind> 170 + <mousebind button="Up" action="Click"> 171 + <action name="if"> 172 + <shaded>no</shaded> 173 + <then> 174 + <action name="Shade"/> 175 + <action name="FocusToBottom"/> 176 + <action name="Unfocus"/> 177 + <action name="Lower"/> 178 + </then> 179 + </action> 180 + </mousebind> 181 + <mousebind button="Down" action="Click"> 182 + <action name="if"> 183 + <shaded>yes</shaded> 184 + <then> 185 + <action name="Unshade"/> 186 + <action name="Raise"/> 187 + </then> 188 + </action> 189 + </mousebind> 190 + </context> 191 + <context name="Titlebar Top Right Bottom Left TLCorner TRCorner BRCorner BLCorner"> 192 + <mousebind button="Left" action="Press"> 193 + <action name="Focus"/> 194 + <action name="Raise"/> 195 + <action name="Unshade"/> 196 + </mousebind> 197 + <mousebind button="Right" action="Press"> 198 + <action name="Focus"/> 199 + <action name="Raise"/> 200 + <action name="ShowMenu"> 201 + <menu>client-menu</menu> 202 + </action> 203 + </mousebind> 204 + </context> 205 + <context name="Top"> 206 + <mousebind button="Left" action="Drag"> 207 + <action name="Resize"> 208 + <edge>top</edge> 209 + </action> 210 + </mousebind> 211 + </context> 212 + <context name="Left"> 213 + <mousebind button="Left" action="Drag"> 214 + <action name="Resize"> 215 + <edge>left</edge> 216 + </action> 217 + </mousebind> 218 + </context> 219 + <context name="Right"> 220 + <mousebind button="Left" action="Drag"> 221 + <action name="Resize"> 222 + <edge>right</edge> 223 + </action> 224 + </mousebind> 225 + </context> 226 + <context name="Bottom"> 227 + <mousebind button="Left" action="Drag"> 228 + <action name="Resize"> 229 + <edge>bottom</edge> 230 + </action> 231 + </mousebind> 232 + <mousebind button="Right" action="Press"> 233 + <action name="Focus"/> 234 + <action name="Raise"/> 235 + <action name="ShowMenu"> 236 + <menu>client-menu</menu> 237 + </action> 238 + </mousebind> 239 + </context> 240 + <context name="TRCorner BRCorner TLCorner BLCorner"> 241 + <mousebind button="Left" action="Press"> 242 + <action name="Focus"/> 243 + <action name="Raise"/> 244 + <action name="Unshade"/> 245 + </mousebind> 246 + <mousebind button="Left" action="Drag"> 247 + <action name="Resize"/> 248 + </mousebind> 249 + </context> 250 + <context name="Client"> 251 + <mousebind button="Left" action="Press"> 252 + <action name="Focus"/> 253 + <action name="Raise"/> 254 + </mousebind> 255 + <mousebind button="Middle" action="Press"> 256 + <action name="Focus"/> 257 + <action name="Raise"/> 258 + </mousebind> 259 + <mousebind button="Right" action="Press"> 260 + <action name="Focus"/> 261 + <action name="Raise"/> 262 + </mousebind> 263 + </context> 264 + <context name="Icon"> 265 + <mousebind button="Left" action="Press"> 266 + <action name="Focus"/> 267 + <action name="Raise"/> 268 + <action name="Unshade"/> 269 + <action name="ShowMenu"> 270 + <menu>client-menu</menu> 271 + </action> 272 + </mousebind> 273 + <mousebind button="Right" action="Press"> 274 + <action name="Focus"/> 275 + <action name="Raise"/> 276 + <action name="ShowMenu"> 277 + <menu>client-menu</menu> 278 + </action> 279 + </mousebind> 280 + </context> 281 + <context name="AllDesktops"> 282 + <mousebind button="Left" action="Press"> 283 + <action name="Focus"/> 284 + <action name="Raise"/> 285 + <action name="Unshade"/> 286 + </mousebind> 287 + <mousebind button="Left" action="Click"> 288 + <action name="ToggleOmnipresent"/> 289 + </mousebind> 290 + </context> 291 + <context name="Shade"> 292 + <mousebind button="Left" action="Press"> 293 + <action name="Focus"/> 294 + <action name="Raise"/> 295 + </mousebind> 296 + <mousebind button="Left" action="Click"> 297 + <action name="ToggleShade"/> 298 + </mousebind> 299 + </context> 300 + <context name="Iconify"> 301 + <mousebind button="Left" action="Press"> 302 + <action name="Focus"/> 303 + <action name="Raise"/> 304 + </mousebind> 305 + <mousebind button="Left" action="Click"> 306 + <action name="Iconify"/> 307 + </mousebind> 308 + </context> 309 + <context name="Maximize"> 310 + <mousebind button="Left" action="Press"> 311 + <action name="Focus"/> 312 + <action name="Raise"/> 313 + <action name="Unshade"/> 314 + </mousebind> 315 + <mousebind button="Middle" action="Press"> 316 + <action name="Focus"/> 317 + <action name="Raise"/> 318 + <action name="Unshade"/> 319 + </mousebind> 320 + <mousebind button="Right" action="Press"> 321 + <action name="Focus"/> 322 + <action name="Raise"/> 323 + <action name="Unshade"/> 324 + </mousebind> 325 + <mousebind button="Left" action="Click"> 326 + <action name="ToggleMaximize"/> 327 + </mousebind> 328 + <mousebind button="Middle" action="Click"> 329 + <action name="ToggleMaximize"> 330 + <direction>vertical</direction> 331 + </action> 332 + </mousebind> 333 + <mousebind button="Right" action="Click"> 334 + <action name="ToggleMaximize"> 335 + <direction>horizontal</direction> 336 + </action> 337 + </mousebind> 338 + </context> 339 + <context name="Close"> 340 + <mousebind button="Left" action="Press"> 341 + <action name="Focus"/> 342 + <action name="Raise"/> 343 + <action name="Unshade"/> 344 + </mousebind> 345 + <mousebind button="Left" action="Click"> 346 + <action name="Close"/> 347 + </mousebind> 348 + </context> 349 + <context name="Desktop"> 350 + <mousebind button="Up" action="Click"> 351 + <action name="GoToDesktop"> 352 + <to>previous</to> 353 + </action> 354 + </mousebind> 355 + <mousebind button="Down" action="Click"> 356 + <action name="GoToDesktop"> 357 + <to>next</to> 358 + </action> 359 + </mousebind> 360 + <mousebind button="A-Up" action="Click"> 361 + <action name="GoToDesktop"> 362 + <to>previous</to> 363 + </action> 364 + </mousebind> 365 + <mousebind button="A-Down" action="Click"> 366 + <action name="GoToDesktop"> 367 + <to>next</to> 368 + </action> 369 + </mousebind> 370 + <mousebind button="C-A-Up" action="Click"> 371 + <action name="GoToDesktop"> 372 + <to>previous</to> 373 + </action> 374 + </mousebind> 375 + <mousebind button="C-A-Down" action="Click"> 376 + <action name="GoToDesktop"> 377 + <to>next</to> 378 + </action> 379 + </mousebind> 380 + <mousebind button="Left" action="Press"> 381 + <action name="Focus"/> 382 + <action name="Raise"/> 383 + </mousebind> 384 + <mousebind button="Right" action="Press"> 385 + <action name="Focus"/> 386 + <action name="Raise"/> 387 + </mousebind> 388 + </context> 389 + <context name="Root"> 390 + <mousebind button="Right" action="Press"> 391 + <action name="ShowMenu"> 392 + <menu>root-menu</menu> 393 + </action> 394 + </mousebind> 395 + </context> 396 + <context name="MoveResize"> 397 + <mousebind button="Up" action="Click"> 398 + <action name="GoToDesktop"> 399 + <to>previous</to> 400 + </action> 401 + </mousebind> 402 + </context> 403 + </mouse> 404 + <menu> 405 + <file>menu.xml</file> 406 + <hideDelay>200</hideDelay> 407 + <middle>no</middle> 408 + <submenuShowDelay>100</submenuShowDelay> 409 + <submenuHideDelay>400</submenuHideDelay> 410 + <showIcons>yes</showIcons> 411 + <manageDesktops>yes</manageDesktops> 412 + </menu> 413 + <applications/> 414 +</openbox_config>
D
config/qtile/README.md
··· 1 -# Qtile config 2 - 3 - 4 ------------------------------- 5 - 6 -### Install 7 ------------ 8 -~~~shell 9 -sudo pacman -S qtile alacritty 10 -yay -S xkblayout 11 -~~~ 12 - 13 -### Autostart 14 -------------- 15 -~~~bash 16 -xautolock -time 5 -locker "betterlockscreen --off 300 -t \"Computer is lockerd\" -l" & 17 -setxkbmap "us,ua" ",winkeys" "grp:alt_shift_toggle" -option "ctrl:nocaps" & 18 -/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 & 19 -nitrogen --restore & 20 -picom --experimental-backends -b & 21 -~~~~
D
config/qtile/config.py
··· 1 -from libqtile import bar, layout, widget, hook 2 -from libqtile.config import Click, Drag, Group, Key, Screen 3 -from libqtile.lazy import lazy 4 -from os import system as cmd 5 -import kblayout 6 - 7 - 8 -# Set mod key 9 -mod = "mod4" 10 -alt = "mod1" 11 - 12 -# Set program 13 -terminal = "alacritty" 14 -browser = "firefox" 15 -filemanager = f"{terminal} --title=ranger -e ranger" 16 -editor = f"{terminal} --title=NVim -e nvim" 17 -guicodeeitor = "code --disable-gpu" 18 - 19 -# Set qtile colors 20 -color = [ 21 - "#FFFFFF", # 0. Text color 22 - "#CED4DA", # 1. Unfocus color 23 - "#008DCD", # 2. Focus color 24 - "#262A2B", # 3. Panel color 25 - "#51AFEF", # 4. Text color 26 - "#C678DD", # 5. Text color 27 - "#FF6C6B", # 6. Text color 28 - "#ECBE7B", # 7. Text color 29 - "#98BE65", # 8. Text color 30 -] 31 - 32 - 33 -# Auto start 34 -@hook.subscribe.startup_once 35 -def autostart(): 36 - cmd("~/.config/qtile/autostart.sh") 37 - 38 - 39 -keys = [ 40 - # Applications 41 - Key([mod], "Return", 42 - lazy.spawn(terminal), 43 - desc="Launch terminal"), 44 - Key([mod, "shift"], "w", 45 - lazy.spawn(browser), 46 - desc="Launch browser"), 47 - Key([mod, "shift"], "f", 48 - lazy.spawn(filemanager), 49 - desc="Launch filemanager"), 50 - Key([mod, "shift"], "e", 51 - lazy.spawn(editor), 52 - desc="Launch code editor"), 53 - Key([mod, "shift"], "c", 54 - lazy.spawn(guicodeeitor), 55 - desc="Run GUI code editor"), 56 - 57 - # Window control 58 - Key([mod], "q", 59 - lazy.window.kill(), 60 - desc="Kill focused window"), 61 - Key([mod, "shift"], "Tab", 62 - lazy.window.toggle_floating(), 63 - desc="Toggle floating mode"), 64 - Key([mod], "h", 65 - lazy.layout.left(), 66 - desc="Change focus window(left)"), 67 - Key([mod], "j", 68 - lazy.layout.down(), 69 - desc="Change focus window(down)"), 70 - Key([mod], "k", 71 - lazy.layout.up(), 72 - desc="Change focus window(up)"), 73 - Key([mod], "l", 74 - lazy.layout.right(), 75 - desc="Change focus window(right)"), 76 - Key([mod, "shift"], "h", 77 - lazy.layout.shuffle_left(), 78 - desc="Move focus window(left)"), 79 - Key([mod, "shift"], "j", 80 - lazy.layout.shuffle_down(), 81 - desc="Move focus window(down)"), 82 - Key([mod, "shift"], "k", 83 - lazy.layout.shuffle_up(), 84 - desc="Move focus window(up)"), 85 - Key([mod, "shift"], "l", 86 - lazy.layout.shuffle_right(), 87 - desc="Move focus window(right)"), 88 - Key([mod, "control"], "h", 89 - lazy.layout.grow_left(), 90 - desc="Resize focus window(left)"), 91 - Key([mod, "control"], "j", 92 - lazy.layout.grow_down(), 93 - desc="Resize focus window(down)"), 94 - Key([mod, "control"], "k", 95 - lazy.layout.grow_up(), 96 - desc="Resize focus window(up)"), 97 - Key([mod, "control"], "l", 98 - lazy.layout.grow_right(), 99 - desc="Resize focus window(right)"), 100 - 101 - # Layout 102 - Key([mod], "Tab", 103 - lazy.next_layout(), 104 - desc="Toggle between layouts"), 105 - Key([mod], "space", 106 - lazy.layout.next(), 107 - desc="Switch window focus to other pane(s) of stack"), 108 - Key([mod, "shift"], "space", 109 - lazy.layout.rotate(), 110 - desc="Swap panes of split stack"), 111 - 112 - # Volume 113 - Key([mod], "equal", 114 - lazy.spawn("amixer sset Master 2%+"), 115 - desc="Plus 2% volume"), 116 - Key([mod], "minus", 117 - lazy.spawn("amixer sset Master 2%-"), 118 - desc="Minus 2% volume"), 119 - Key([mod, "shift"], "minus", 120 - lazy.spawn("amixer sset Master toggle"), 121 - desc="Mute volume"), 122 - 123 - # Menus(dmenu or/and rofi) 124 - Key([mod, "shift"], "Return", 125 - lazy.spawn("rofi -show drun"), 126 - desc="(Rofi) Program launcher"), 127 - Key([mod], "Escape", 128 - lazy.spawn("./.script/dmenu/dmenu-power.sh"), 129 - desc="Power menu"), 130 - Key([mod, "control"], "i", 131 - lazy.spawn("./.script/dmenu/dmenu-pass.sh"), 132 - desc="Dmenu(rofi) password menu"), 133 - Key([mod, "control"], "u", 134 - lazy.spawn("./.script/dmenu/dmenu-config-edit.sh"), 135 - desc="Config editor"), 136 - 137 - # Screenhot 138 - Key([], "Print", 139 - lazy.spawn("scrot -s ./$(date +%Y-%m-%d-%H-%M-%S).png"), 140 - desc="Create screenhot(scrot -s)"), 141 - Key(["shift"], "Print", 142 - lazy.spawn("scrot ./$(date +%Y-%m-%d-%H-%M-%S).png"), 143 - desc="Create screenhot full screen(scrot)"), 144 - 145 - # Qtile 146 - Key([mod, "control"], "r", 147 - lazy.restart(), 148 - desc="Restart qtile"), 149 - Key([mod], "r", 150 - lazy.spawncmd(), 151 - desc="Spawn a command using a prompt widget"), 152 - Key([mod, "shift"], "q", 153 - lazy.spawn("xkill"), 154 - desc="Xkill"), 155 - Key([mod, "shift"], "z", 156 - lazy.spawn("betterlockscreen --off 300 -t \"Computer is locked\" -l"), 157 - desc="Lock screen") 158 -] 159 - 160 - 161 -# Auto send window on specific WP 162 -@hook.subscribe.client_new 163 -def client_new(client): 164 - if client.name == "Alacritty" or client.name == "Kitty": 165 - client.togroup("term") 166 - elif client.name == "Mozilla Firefox" or \ 167 - client.name == "Firefox Developer Edition": 168 - client.togroup("www") 169 - elif client.name == "NVim" or client.name == \ 170 - "Visual Studio Code": 171 - client.togroup("dev") 172 - elif client.name == "Thunar" or client.name == "ranger": 173 - client.togroup("sys") 174 - elif client.name == "Joplin": 175 - client.togroup("doc") 176 - elif client.name == "Telegram" or client.name == "Discord": 177 - client.togroup("chat") 178 - elif client.name == "KeePassXC": 179 - client.togroup("pass") 180 - elif client.name == "Spotify": 181 - client.togroup("mus") 182 - 183 - 184 -# Workspaces name, keys 185 -group_names = [("term", {"layout": "columns"}), 186 - ("www", {"layout": "max"}), 187 - ("dev", {"layout": "columns"}), 188 - ("sys", {"layout": "columns"}), 189 - ("doc", {"layout": "columns"}), 190 - ("chat", {"layout": "columns"}), 191 - ("pass", {"layout": "columns"}), 192 - ("mus", {"layout": "max"}), 193 - ("flo", {"layout": "columns"})] 194 -groups = [Group(name, **kwargs) for name, kwargs in group_names] 195 -for i, (name, kwargs) in enumerate(group_names, 1): 196 - keys.append(Key([mod], str(i), lazy.group[name].toscreen())) 197 - keys.append(Key([mod, "shift"], str(i), lazy.window.togroup(name))) 198 - 199 - 200 -# Window layout(s) 201 -layout_theme = { 202 - "border_width": 2, 203 - "margin": 2, 204 - "border_focus": color[2], 205 - "border_normal": color[3], 206 - "font": "Jatbrains Mono" 207 -} 208 -layouts = [ 209 - layout.Max(), 210 - # layout.Stack(num_stacks=2, **layout_theme), 211 - # layout.Bsp(**layout_theme), 212 - layout.Columns(**layout_theme), 213 - # layout.Matrix(), 214 - # layout.MonadTall(**layout_theme), 215 - # layout.Floating(**layout_theme), 216 - # layout.MonadWide(), 217 - # layout.RatioTile(), 218 - # layout.Tile(**layout_theme), 219 - # layout.TreeTab(), 220 - # layout.VerticalTile(), 221 - # layout.Zoomy(), 222 -] 223 - 224 - 225 -# Panel 226 -widget_defaults = dict( 227 - font="Jatbrains Mono", 228 - fontsize=12, 229 - padding=4, 230 - foreground=color[0], 231 - background=color[3], 232 -) 233 -extension_defaults = widget_defaults.copy() 234 -screens = [Screen(top=bar.Bar([ 235 - widget.GroupBox( 236 - active=color[0], 237 - inactive=color[1], 238 - rounded=False, 239 - disable_drag=True, 240 - highlight_color=color[2], 241 - highlight_method="block", 242 - this_current_screen_border=color[2], 243 - this_screen_border=color[3] 244 - ), 245 - widget.Prompt(), 246 - widget.WindowName(), 247 - kblayout.KBLayout( 248 - foreground=color[5], 249 - update_interval=0, 250 - fmt=" {}" 251 - ), 252 - widget.CurrentLayout( 253 - foreground=color[8] 254 - ), 255 - widget.Volume( 256 - foreground=color[6], 257 - fmt=" {}" 258 - ), 259 - widget.Net( 260 - interface="wlp3s0", 261 - format="{down} ↓↑{up}", 262 - foreground=color[7] 263 - ), 264 - widget.Systray(), 265 - widget.Clock( 266 - format=" %H:%M", 267 - foreground=color[4] 268 - ), 269 - widget.Clock( 270 - format=" %d.%m.%Y", 271 - foreground=color[4] 272 - )], 24 # Panel size 273 -))] 274 - 275 - 276 -# Drag floating layouts 277 -mouse = [ 278 - Drag([mod], "Button1", 279 - lazy.window.set_position(), 280 - start=lazy.window.get_position()), 281 - Drag([mod], "Button3", 282 - lazy.window.set_size_floating(), 283 - start=lazy.window.get_size()), 284 - Click([mod], "Button2", 285 - lazy.window.bring_to_front()) 286 -] 287 - 288 - 289 -dgroups_key_binder = None 290 -dgroups_app_rules = [] 291 -main = None 292 -follow_mouse_focus = True 293 -bring_front_click = False 294 -cursor_warp = False 295 -floating_layout = layout.Floating( 296 - **layout_theme, float_rules=[ 297 - {"wmclass": "confirm"}, 298 - {"wmclass": "dialog"}, 299 - {"wmclass": "download"}, 300 - {"wmclass": "error"}, 301 - {"wmclass": "file_progress"}, 302 - {"wmclass": "notification"}, 303 - {"wmclass": "splash"}, 304 - {"wmclass": "toolbar"}, 305 - {"wmclass": "confirmreset"}, 306 - {"wmclass": "makebranch"}, 307 - {"wmclass": "maketag"}, 308 - {"wname": "branchdialog"}, 309 - {"wname": "pinentry"}, 310 - {"wmclass": "ssh-askpass"}]) 311 -auto_fullscreen = True 312 -focus_on_window_activation = "smart" 313 -wmname = "LG3D"
D
config/qtile/kblayout.py
··· 1 -""" 2 -For working widget install `xkblayout` 3 -$ yay -S xkblayout 4 -""" 5 -from libqtile.widget import base 6 -from os import popen 7 - 8 - 9 -KBCMD = """ 10 -case "$(xkblayout)" in 11 - "Eng") echo "us" ;; 12 - "Ukr") echo "ua" ;; 13 -esac 14 -""" 15 - 16 - 17 -class KBLayout(base.InLoopPollText): 18 - """Widget for displaying the current keyboard layout""" 19 - orientations = base.ORIENTATION_HORIZONTAL 20 - 21 - def __init__(self, **config): 22 - base.InLoopPollText.__init__(self, **config) 23 - 24 - def poll(self): 25 - kb = popen(KBCMD).read() \ 26 - .rstrip('\n') \ 27 - .encode('utf-8') \ 28 - .decode('utf-8') 29 - return kb