Guest User

Untitled

a guest
Jul 24th, 2022
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.92 KB | None | 0 0
  1. #!/usr/bin/env bash
  2.  
  3. # this is a simple config for herbstluftwm
  4.  
  5. hc() {
  6. herbstclient "$@"
  7. }
  8.  
  9. hc emit_hook reload
  10.  
  11. #xsetroot -solid '#5A8E3A'
  12. feh --bg-scale /home/jim/Pictures/wp6795450-43-wallpapers.jpg &
  13.  
  14. # remove all existing keybindings
  15. hc keyunbind --all
  16.  
  17. # keybindings
  18. # if you have a super key you will be much happier with Mod set to Mod4
  19. #Mod=Mod1 # Use alt as the main modifier
  20. Mod=Mod4 # Use the super key as the main modifier
  21.  
  22. hc keybind $Mod-Shift-q quit
  23. hc keybind $Mod-Shift-r reload
  24. hc keybind $Mod-Shift-c close
  25. hc keybind $Mod-Return spawn "${TERMINAL:-terminator}" # use your $TERMINAL with xterm as fallback
  26. hc keybind $Mod-q close
  27. hc keybind $Mod-f spawn firefox
  28. hc keybind $Mod-e spawn thunar
  29. hc keybind XF86AudioRaiseVolume spawn pulsemixer --change-volume +5
  30. hc keybind XF86AudioLowerVolume spawn pulsemixer --change-volume -5
  31. hc keybind $Mod-period spawn pulsemixer --change-volume +5
  32. hc keybind $Mod-comma spawn pulsemixer --change-volume -5
  33. hc keybind $mod-n spawn nmtui
  34. hc keybind $Mod-d spawn j4-dmenu-desktop
  35.  
  36. picom &
  37.  
  38. # basic movement in tiling and floating mode
  39. # focusing clients
  40. hc keybind $Mod-Left focus left
  41. hc keybind $Mod-Down focus down
  42. hc keybind $Mod-Up focus up
  43. hc keybind $Mod-Right focus right
  44. hc keybind $Mod-h focus left
  45. hc keybind $Mod-j focus down
  46. hc keybind $Mod-k focus up
  47. hc keybind $Mod-l focus right
  48.  
  49. # moving clients in tiling and floating mode
  50. hc keybind $Mod-Shift-Left shift left
  51. hc keybind $Mod-Shift-Down shift down
  52. hc keybind $Mod-Shift-Up shift up
  53. hc keybind $Mod-Shift-Right shift right
  54. hc keybind $Mod-Shift-h shift left
  55. hc keybind $Mod-Shift-j shift down
  56. hc keybind $Mod-Shift-k shift up
  57. hc keybind $Mod-Shift-l shift right
  58.  
  59. # splitting frames
  60. # create an empty frame at the specified direction
  61. hc keybind $Mod-u split bottom 0.5
  62. hc keybind $Mod-o split right 0.5
  63. # let the current frame explode into subframes
  64. hc keybind $Mod-Control-space split explode
  65.  
  66. # resizing frames and floating clients
  67. resizestep=0.02
  68. hc keybind $Mod-Control-h resize left +$resizestep
  69. hc keybind $Mod-Control-j resize down +$resizestep
  70. hc keybind $Mod-Control-k resize up +$resizestep
  71. hc keybind $Mod-Control-l resize right +$resizestep
  72. hc keybind $Mod-Control-Left resize left +$resizestep
  73. hc keybind $Mod-Control-Down resize down +$resizestep
  74. hc keybind $Mod-Control-Up resize up +$resizestep
  75. hc keybind $Mod-Control-Right resize right +$resizestep
  76.  
  77. # tags
  78. tag_names=( {1..9} )
  79. tag_keys=( {1..9} 0 )
  80.  
  81. hc rename default "${tag_names[0]}" || true
  82. for i in "${!tag_names[@]}" ; do
  83. hc add "${tag_names[$i]}"
  84. key="${tag_keys[$i]}"
  85. if [ -n "$key" ] ; then
  86. hc keybind "$Mod-$key" use_index "$i"
  87. hc keybind "$Mod-Shift-$key" move_index "$i"
  88. fi
  89. done
  90.  
  91. # cycle through tags
  92. hc keybind $Mod-shift-period use_index +1 --skip-visible
  93. hc keybind $Mod-shift-comma use_index -1 --skip-visible
  94.  
  95. # layouting
  96. hc keybind $Mod-r remove
  97. hc keybind $Mod-s floating toggle
  98. #hc keybind $Mod-f fullscreen toggle
  99. hc keybind $Mod-Shift-f set_attr clients.focus.floating toggle
  100. hc keybind $Mod-Shift-d set_attr clients.focus.decorated toggle
  101. hc keybind $Mod-Shift-m set_attr clients.focus.minimized true
  102. hc keybind $Mod-Control-m jumpto last-minimized
  103. hc keybind $Mod-p pseudotile toggle
  104. # The following cycles through the available layouts within a frame, but skips
  105. # layouts, if the layout change wouldn't affect the actual window positions.
  106. # I.e. if there are two windows within a frame, the grid layout is skipped.
  107. hc keybind $Mod-space \
  108. or , and . compare tags.focus.curframe_wcount = 2 \
  109. . cycle_layout +1 vertical horizontal max vertical grid \
  110. , cycle_layout +1
  111.  
  112. # mouse
  113. hc mouseunbind --all
  114. hc mousebind $Mod-Button1 move
  115. hc mousebind $Mod-Button2 zoom
  116. hc mousebind $Mod-Button3 resize
  117.  
  118. # focus
  119. hc keybind $Mod-BackSpace cycle_monitor
  120. hc keybind $Mod-Tab cycle_all +1
  121. hc keybind $Mod-Shift-Tab cycle_all -1
  122. hc keybind $Mod-c cycle
  123. hc keybind $Mod-i jumpto urgent
  124.  
  125. # theme
  126. hc attr theme.tiling.reset 1
  127. hc attr theme.floating.reset 1
  128. hc set frame_border_active_color '#222222cc'
  129. hc set frame_border_normal_color '#101010cc'
  130. hc set frame_bg_normal_color '#565656aa'
  131. hc set frame_bg_active_color '#345F0Caa'
  132. hc set frame_border_width 1
  133. hc set always_show_frame on
  134. hc set frame_bg_transparent on
  135. hc set frame_transparent_width 5
  136. hc set frame_gap 4
  137.  
  138. hc attr theme.title_height 12
  139. hc attr theme.title_when always
  140. hc attr theme.title_font 'Roboto :pixelsize=10' # example using Xft
  141. # hc attr theme.title_font '-*-fixed-medium-r-*-*-13-*-*-*-*-*-*-*'
  142. hc attr theme.title_depth 3 # space below the title's baseline
  143. hc attr theme.active.color '#345F0Cef'
  144. hc attr theme.title_color '#ffffff'
  145. hc attr theme.normal.color '#323232dd'
  146. hc attr theme.urgent.color '#7811A1dd'
  147. hc attr theme.tab_color '#1F1F1Fdd'
  148. hc attr theme.active.tab_color '#2B4F0Add'
  149. hc attr theme.active.tab_outer_color '#6C8257dd'
  150. hc attr theme.active.tab_title_color '#ababab'
  151. hc attr theme.normal.title_color '#898989'
  152. hc attr theme.inner_width 1
  153. hc attr theme.inner_color black
  154. hc attr theme.border_width 3
  155. hc attr theme.floating.border_width 4
  156. hc attr theme.floating.outer_width 1
  157. hc attr theme.floating.outer_color black
  158. hc attr theme.active.inner_color '#789161'
  159. hc attr theme.urgent.inner_color '#9A65B0'
  160. hc attr theme.normal.inner_color '#606060'
  161. # copy inner color to outer_color
  162. for state in active urgent normal ; do
  163. hc substitute C theme.${state}.inner_color \
  164. attr theme.${state}.outer_color C
  165. done
  166. hc attr theme.tiling.outer_width 1
  167. hc attr theme.background_color '#141414'
  168.  
  169. hc set window_gap 0
  170. hc set frame_padding 0
  171. hc set smart_window_surroundings off
  172. hc set smart_frame_surroundings on
  173. hc set mouse_recenter_gap 0
  174.  
  175. # rules
  176. hc unrule -F
  177. #hc rule class=XTerm tag=3 # move all xterms to tag 3
  178. hc rule focus=on # normally focus new clients
  179. hc rule floatplacement=smart
  180. #hc rule focus=off # normally do not focus new clients
  181. # give focus to most common terminals
  182. #hc rule class~'(.*[Rr]xvt.*|.*[Tt]erm|Konsole)' focus=on
  183. hc rule windowtype~'_NET_WM_WINDOW_TYPE_(DIALOG|UTILITY|SPLASH)' floating=on
  184. hc rule windowtype='_NET_WM_WINDOW_TYPE_DIALOG' focus=on
  185. hc rule windowtype~'_NET_WM_WINDOW_TYPE_(NOTIFICATION|DOCK|DESKTOP)' manage=off
  186. hc rule fixedsize floating=on
  187.  
  188. hc set tree_style '╾│ ├└╼─┐'
  189.  
  190. # unlock, just to be sure
  191. hc unlock
  192.  
  193. # do multi monitor setup here, e.g.:
  194. # hc set_monitors 1280x1024+0+0 1280x1024+1280+0
  195. # or simply:
  196. # hc detect_monitors
  197.  
  198. # find the panel
  199. panel=~/.config/herbstluftwm/panel.sh
  200. [ -x "$panel" ] || panel=/etc/xdg/herbstluftwm/panel.sh
  201. for monitor in $(hc list_monitors | cut -d: -f1) ; do
  202. # start it on each monitor
  203. "$panel" "$monitor" &
  204. done
  205.  
Advertisement
Add Comment
Please, Sign In to add comment