SHARE
TWEET

i3blocks

a guest Oct 8th, 2017 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #########################
  2. #   Global properties   #
  3. #########################
  4. #
  5. command=$HOME/.config/i3/i3blocks/$BLOCK_NAME
  6. full_text=
  7. color=#7b5751
  8. separator=false
  9. separator_block_width=16
  10. markup=pango
  11.  
  12.  
  13. #####################
  14. #   Media player    #
  15. #####################
  16. #
  17. [mocp]
  18. interval=1
  19. color=#7b5751
  20.  
  21.  
  22. #########################
  23. #   Volume indicator    #
  24. #########################
  25. #
  26. [volume]
  27. label=
  28. instance=Master
  29. interval=once
  30. signal=1
  31. color=#88b090
  32. [separator]
  33.  
  34.  
  35. #################
  36. #   Disk usage  #
  37. #################
  38. #
  39. [disk-root]
  40. label=
  41. command=echo "$(df -h / | grep dev | awk -F ' ' '{print $4}')"; [[ -z "${BLOCK_BUTTON}" ]] || pcmanfm -n / &
  42. interval=1
  43. color=#eeeeee
  44.  
  45. [disk-home]
  46. label=
  47. command=echo "$(df -h /home | grep dev | awk -F ' ' '{print $4}')"; [[ -z "${BLOCK_BUTTON}" ]] || pcmanfm -n &HOME &
  48. interval=1
  49. color=#eeeeee
  50.  
  51. [trash]
  52. label=
  53. interval=1
  54. color=#eeeeee
  55. [separator]
  56.  
  57.  
  58. #################
  59. #   Updates     #
  60. #################
  61. #
  62. #[updates]
  63. #label=
  64. #command=$HOME/.config/i3/i3blocks/updates; [[ -z "${BLOCK_BUTTON}" ]] || pamac-manager &
  65. #color=#d8d782
  66. #interval=3600
  67. #[separator]
  68.  
  69.  
  70. #################
  71. #   Packages    #
  72. #################
  73. #
  74. [packages]
  75. label=
  76. command=echo "$(pacman -Q | wc -l)"; [[ -z "${BLOCK_BUTTON}" ]] || pamac-manager &
  77. color=#87a7af
  78. interval=1
  79. [separator]
  80.  
  81.  
  82. #################
  83. #   CPU usage   #
  84. #################
  85. #
  86. [cpu_usage]
  87. label=
  88. interval=1
  89. color=#eeeeee
  90.  
  91.  
  92. #####################
  93. #   Temperature     #
  94. #####################
  95. #
  96. [temperature]
  97. label=
  98. interval=1
  99. color=#eeeeee
  100.  
  101.  
  102. #####################
  103. #   Memory usage    #
  104. #####################
  105. #
  106. [memory]
  107. command=echo "$(free -m | awk 'NR==2{printf "%0.0f\n",$3/$2*100}')%"; [[ -z "${BLOCK_BUTTON}" ]] || lxtask &
  108. label=
  109. color=#eeeeee
  110. interval=1
  111. [separator]
  112.  
  113.  
  114. #################
  115. #   Date & Time    #
  116. #################
  117. #
  118. [date]
  119. command=date +'%a %d.%m.%Y'; [[ -z "${BLOCK_BUTTON}" ]] || gsimplecal &
  120. interval=1
  121. label=
  122. color=#88b090
  123.  
  124. [time]
  125. command=echo "`date +'%H:%M'`"
  126. interval=1
  127. label=
  128. color=#88b090
  129. [separator]
  130.  
  131.  
  132. #################
  133. #   Powermenu   #
  134. #################
  135. #
  136. [powermenu]
  137. full_text=
  138. command=$HOME/.config/i3/powermenu &
  139. color=#eeeeee
  140.  
  141.  
  142.  
  143. MOCP:
  144. #!/bin/bash
  145.  
  146. STATUS=$(mocp -i | grep "State:" | sed -e "s/^.*: //")
  147. TITLE=$(mocp -i | grep "^Title:" | sed -e "s/^.*: //")
  148. ARTIST=$(mocp -i | grep "Artist:" | sed -e "s/^.*: //")
  149. SONGTITLE=$(mocp -i | grep "SongTitle:" | sed -e "s/^.*: //")
  150.  
  151. if [[ $STATUS == PLAY ]]; then
  152.   if [[ $TITLE != "" ]]; then
  153.     if [[ $ARTIST != "" ]]; then ARTIST="$ARTIST -"; fi
  154.       echo -e " $ARTIST $SONGTITLE  "
  155.     else echo -e " Prehráva sa  "
  156.     case $BLOCK_BUTTON in
  157.     1) mocp -f ;; # left click = next song
  158.     2) mocp -G ;; # middle click = toggle pause - play
  159.     3) mocp -r ;; # right click = previous song
  160.     esac
  161.     exit 0
  162.    fi
  163. fi
  164.  
  165. if (! pidof mocp ) &>/dev/null 2>&1; then
  166.   echo -e " "
  167. else echo -e " "
  168. fi
RAW Paste Data
Top