Advertisement
Guest User

ubersicht spaces widget

a guest
Jan 17th, 2017
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. command: "/usr/local/bin/kwmc query space active id"
  2.  
  3. refreshFrequency: 100
  4.  
  5. render: (output) ->
  6.   output = output.trim();
  7.   out = ''
  8.  
  9.   for x in [1...10] by 1
  10.     clazz = if (x + '') == output then 'tile active' else 'tile';
  11.     out = out + "<div class='table'><div class='" + clazz + "'>" + x + "</div></div>";
  12.  
  13.   out;
  14.  
  15. style: """
  16.  padding-top: 4px
  17.  display: flex
  18.  justify-content: space-around
  19.  width: 20%
  20.  font-size: 10px
  21.  font-family: Menlo
  22.  
  23.  .tile-container
  24.    display: table
  25.  
  26.  .tile
  27.    box-sizing: border-box
  28.    width: 20px
  29.    height: 20px
  30.    border: 1px solid red
  31.    text-align: center
  32.    border-radius: 10px
  33.    transition: opacity 1s
  34.    border: 1px solid white
  35.    display: table-cell
  36.    vertical-align: middle
  37.    color: white;
  38.  
  39.  .tile.active
  40.    background-color: white
  41.    color: gray;
  42.  
  43. """
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement