Advertisement
Guest User

Untitled

a guest
Feb 20th, 2017
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 8.11 KB | None | 0 0
  1. > cat ~/.config/i3status/config
  2. # i3status configuration file.
  3. # see "man i3status" for documentation.
  4.  
  5. # It is important that this file is edited as UTF-8.
  6. # The following line should contain a sharp s:
  7. # ß
  8. # If the above line is not correctly displayed, fix your editor first!
  9.  
  10. general {
  11.         output_format = "i3bar"
  12.         colors = true
  13.         interval = 2
  14. }
  15.  
  16. #order += "ipv6"
  17. order += "disk /"
  18. order += "disk /home"
  19. #order += "run_watch DHCP"
  20. #order += "run_watch VPN"
  21. order += "wireless _first_"
  22. order += "ethernet _first_"
  23. order += "battery 0"
  24. order += "cpu_usage"
  25. order += "volume master"
  26. order += "tztime local"
  27.  
  28. wireless _first_ {
  29.         format_up = "W: %bitrate, %quality у [%essid] з IP [%ip]"
  30.         format_down = "W"
  31. }
  32.  
  33. ethernet _first_ {
  34.         # if you use %speed, i3status requires root privileges
  35.         format_up = "E: %ip (%speed)"
  36.         format_down = "E"
  37. }
  38.  
  39. battery 0 {
  40.     status_chr = "⚇ СТРУМ"
  41.     status_bat = "⚡ АКУМ"
  42.     status_full= "☻ ПОВН"
  43.     last_full_capacity = true
  44.     hide_seconds = true
  45.     format = "%status %percentage %remaining %consumption"
  46. }
  47.  
  48. run_watch DHCP {
  49.         pidfile = "/var/run/dhclient*.pid"
  50. }
  51.  
  52. run_watch VPN {
  53.         pidfile = "/var/run/vpnc/pid"
  54. }
  55.  
  56. tztime local {
  57.         format = "%A, %e %Om %Y %X"#"%Y-%m-%d %H:%M:%S"
  58. }
  59.  
  60. load {
  61.         format = "%1min"
  62. }
  63.  
  64. cpu_usage {
  65.         format = "%usage"
  66. }
  67.  
  68. disk "/" {
  69.         prefix_type = custom
  70.         format = "/ %used/%total"
  71. }
  72.  
  73. disk "/home" {
  74.         prefix_type = custom
  75.         format = "~ %used/%total"
  76. }
  77.  
  78. volume master {
  79.     format = "♪ %volume"
  80.     format_muted = "♪-%volume"
  81.     device = "pulse"
  82. }
  83. ukrkyi@ukrkyi-NB-SUSETW:~> cat ~/.config/i3/config
  84. # This file has been auto-generated by i3-config-wizard(1).
  85. # It will not be overwritten, so edit it as you like.
  86. #
  87. # Should you change your keyboard layout some time, delete
  88. # this file and re-run i3-config-wizard(1).
  89. #
  90.  
  91. # i3 config file (v4)
  92. #
  93. # Please see http://i3wm.org/docs/userguide.html for a complete reference!
  94.  
  95. set $mod Mod4
  96.  
  97. # Font for window titles. Will also be used by the bar unless a different font
  98. # is used in the bar {} block below.
  99. #font pango:monospace 10
  100.  
  101. # This font is widely installed, provides lots of unicode glyphs, right-to-left
  102. # text rendering and scalability on retina/hidpi displays (thanks to pango).
  103. #font pango:DejaVu Sans Mono 10
  104.  
  105. # Before i3 v4.8, we used to recommend this one as the default:
  106.  font -misc-fixed-medium-r-normal--14-130-75-75-C-70-iso10646-1
  107. # The font above is very space-efficient, that is, it looks good, sharp and
  108. # clear in small sizes. However, its unicode glyph coverage is limited, the old
  109. # X core fonts rendering does not support right-to-left and this being a bitmap
  110. # font, it doesn’t scale on retina/hidpi displays.
  111.  
  112. # Use Mouse+$mod to drag floating windows to their wanted position
  113. floating_modifier $mod
  114.  
  115. # start a terminal
  116. bindsym $mod+Return exec i3-sensible-terminal
  117.  
  118. # kill focused window
  119. bindsym $mod+Shift+Cyrillic_shorti kill
  120.  
  121. # start dmenu (a program launcher)
  122. bindsym $mod+Cyrillic_ve exec dmenu_run
  123. # There also is the (new) i3-dmenu-desktop which only displays applications
  124. # shipping a .desktop file. It is a wrapper around dmenu, so you need that
  125. # installed.
  126. #bindsym $mod+d exec --no-startup-id i3-dmenu-desktop
  127.  
  128. # change focus
  129. bindsym $mod+Cyrillic_o focus left
  130. bindsym $mod+Cyrillic_el focus down
  131. bindsym $mod+Cyrillic_de focus up
  132. bindsym $mod+Cyrillic_zhe focus right
  133.  
  134. # alternatively, you can use the cursor keys:
  135. bindsym $mod+Left focus left
  136. bindsym $mod+Down focus down
  137. bindsym $mod+Up focus up
  138. bindsym $mod+Right focus right
  139.  
  140. # move focused window
  141. bindsym $mod+Shift+Cyrillic_o move left
  142. bindsym $mod+Shift+Cyrillic_el move down
  143. bindsym $mod+Shift+Cyrillic_de move up
  144. bindsym $mod+Shift+Cyrillic_zhe move right
  145.  
  146. # alternatively, you can use the cursor keys:
  147. bindsym $mod+Shift+Left move left
  148. bindsym $mod+Shift+Down move down
  149. bindsym $mod+Shift+Up move up
  150. bindsym $mod+Shift+Right move right
  151.  
  152. # split in horizontal orientation
  153. bindsym $mod+Cyrillic_er split h
  154.  
  155. # split in vertical orientation
  156. bindsym $mod+Cyrillic_em split v
  157.  
  158. # enter fullscreen mode for the focused container
  159. bindsym $mod+Cyrillic_a fullscreen toggle
  160.  
  161. # change container layout (stacked, tabbed, toggle split)
  162. bindsym $mod+Ukrainian_i layout stacking
  163. bindsym $mod+Cyrillic_tse layout tabbed
  164. bindsym $mod+Cyrillic_u layout toggle split
  165.  
  166. # toggle tiling / floating
  167. bindsym $mod+Shift+space floating toggle
  168.  
  169. # change focus between tiling / floating windows
  170. bindsym $mod+space focus mode_toggle
  171.  
  172. # focus the parent container
  173. bindsym $mod+Cyrillic_ef focus parent
  174.  
  175. # focus the child container
  176. #bindsym $mod+d focus child
  177.  
  178. # switch to workspace
  179. bindsym $mod+1 workspace 1
  180. bindsym $mod+2 workspace 2
  181. bindsym $mod+3 workspace 3
  182. bindsym $mod+4 workspace 4
  183. bindsym $mod+5 workspace 5
  184. bindsym $mod+6 workspace 6
  185. bindsym $mod+7 workspace 7
  186. bindsym $mod+8 workspace 8
  187. bindsym $mod+9 workspace 9
  188. bindsym $mod+0 workspace 10
  189.  
  190. # move focused container to workspace
  191. bindsym $mod+Shift+1 move container to workspace 1
  192. bindsym $mod+Shift+2 move container to workspace 2
  193. bindsym $mod+Shift+3 move container to workspace 3
  194. bindsym $mod+Shift+4 move container to workspace 4
  195. bindsym $mod+Shift+5 move container to workspace 5
  196. bindsym $mod+Shift+6 move container to workspace 6
  197. bindsym $mod+Shift+7 move container to workspace 7
  198. bindsym $mod+Shift+8 move container to workspace 8
  199. bindsym $mod+Shift+9 move container to workspace 9
  200. bindsym $mod+Shift+0 move container to workspace 10
  201.  
  202. # reload the configuration file
  203. bindsym $mod+Shift+Cyrillic_es reload
  204. # restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
  205. bindsym $mod+Shift+Cyrillic_ka restart
  206. # exit i3 (logs you out of your X session)
  207. bindsym $mod+Shift+Cyrillic_u 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'"
  208.  
  209. # resize window (you can also use the mouse for that)
  210. mode "resize" {
  211.         # These bindings trigger as soon as you enter the resize mode
  212.  
  213.         # Pressing left will shrink the window’s width.
  214.         # Pressing right will grow the window’s width.
  215.         # Pressing up will shrink the window’s height.
  216.         # Pressing down will grow the window’s height.
  217.         bindsym Cyrillic_o resize shrink width 5 px or 5 ppt
  218.         bindsym Cyrillic_el resize grow height 5 px or 5 ppt
  219.         bindsym Cyrillic_de resize shrink height 5 px or 5 ppt
  220.         bindsym Cyrillic_zhe resize grow width 5 px or 5 ppt
  221.  
  222.         # same bindings, but for the arrow keys
  223.         bindsym Left resize shrink width 5 px or 5 ppt
  224.         bindsym Down resize grow height 5 px or 5 ppt
  225.         bindsym Up resize shrink height 5 px or 5 ppt
  226.         bindsym Right resize grow width 5 px or 5 ppt
  227.  
  228.         # back to normal: Enter or Escape
  229.         bindsym Return mode "default"
  230.         bindsym Escape mode "default"
  231. }
  232.  
  233. bindsym $mod+Cyrillic_ka mode "resize"
  234.  
  235. # Start i3bar to display a workspace bar (plus the system information i3status
  236. # finds out, if available)
  237. bar {
  238.         font pango:DejaVu Sans Mono 10
  239.         status_command status.sh
  240. }
  241.  
  242. #Autostart
  243.  
  244. exec --no-startup-id "dropbox start"
  245.  
  246. # Audio keys
  247.  
  248. #Mute
  249. bindcode 121 exec --no-startup-id "volume.sh mute"
  250. #Lower
  251. bindcode 122 exec --no-startup-id "volume.sh down"
  252. #Raise
  253. bindcode 123 exec --no-startup-id "volume.sh up"
  254.  
  255. # Lock on Ctrl+Alt+L
  256. bindcode 160 exec --no-startup-id lock.sh
  257. bindsym Control+Mod1+l exec --no-startup-id lock.sh
  258. bindsym Control+Mod1+Cyrillic_de exec --no-startup-id lock.sh
  259. ukrkyi@ukrkyi-NB-SUSETW:~> cat ~/bin/status.sh
  260. #!/bin/sh
  261. # shell script to prepend i3status with more stuff
  262. # https://github.com/nonpop/xkblayout-state
  263.  
  264. i3status | while :
  265. do
  266.         read line
  267.         BEFORE="{\"name\":\"layout\",\"instance\":\"current\",\"markup\":\"none\",\"full_text\":\""
  268.         LAYOUT=$(xkblayout-state print "%s")
  269.         AFTER="\"},"
  270.         echo $line | sed "s/{\"name\":\"tztime\"/$BEFORE\U$LAYOUT\E$AFTER&/" || exit 1
  271. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement