项目作者: okitavera

项目描述 :
Beautiful Logout UI for X11 window manager
高级语言: Python
项目地址: git://github.com/okitavera/clearine.git
创建时间: 2018-03-15T12:38:36Z
项目社区:https://github.com/okitavera/clearine

开源协议:MIT License

下载


Clearine

Beautiful Logout UI for X11 window manager.
Inspired from oblogout and Android Oreo’s power menu.

Preview

Dependencies

  • python (version 3)
  • python-gobject
  • python-cairo

Installation

For Arch user, you can install it via AUR insteads:

  1. $ yaourt -S clearine-git

For Void user :

  1. $ sudo xbps-install -S clearine

Install from source

Install the dependencies first:

  1. $ sudo pacman -S python-cairo python-gobject # Arch Linux

clone this repo into your local storage:

  1. $ git clone https://github.com/yuune/clearine.git
  2. $ cd clearine

then install via pip:

  1. $ pip install .

if you not using pip, you can run setup.py directly:

  1. $ python3 setup.py install --prefix=/usr --root="/" --optimize=1

Configuration file

Clearine basically read configuration from “~/.config/clearine.conf” .
if that file is unavailable, clearine will read from “/etc/clearine.conf” or “/usr/share/clearine/clearine.conf” insteads.

Configuration format

The configuration format is using section-style like this :

  1. [main]
  2. # set background opacity
  3. opacity = 0.8
  4. # set gaps
  5. gap-left = 70
  6. gap-right = 70
  7. gap-top = 70
  8. gap-bottom = 70
  9. # set mode (vertical/horizontal)
  10. mode = horizontal
  11. # set spacing between card and widget
  12. spacing = 20
  13. [command]
  14. # set command to launch when the button is clicked
  15. logout = openbox --exit
  16. lock = i3lock
  17. restart = systemctl reboot
  18. shutdown = systemctl poweroff
  19. [shortcuts]
  20. cancel = Escape
  21. lock = K
  22. suspend = P
  23. hibernate = H
  24. logout = L
  25. restart = R
  26. shutdown = S
  27. [card]
  28. # set background color and border radius for card
  29. background-color = #e1e5e8
  30. border-radius = 5
  31. # set padding
  32. padding-bottom = 10
  33. padding-left = 10
  34. padding-right = 10
  35. padding-top = 10
  36. [button]
  37. # button theme name
  38. theme = Clearine-Fallback
  39. # button item sort
  40. items = logout, lock, restart, shutdown, cancel
  41. # set button text font and text color
  42. label-font = DejaVu Sans Book 9
  43. label-size = 9
  44. label-color = #101314
  45. # set button width and height
  46. width = 70
  47. height = 70
  48. # set button icon width and height
  49. icon-width = 32
  50. icon-height = 32
  51. # set per-button margin
  52. margin-bottom = 0
  53. margin-left = 0
  54. margin-right = 0
  55. margin-top = 0
  56. # set spacing between button
  57. spacing = 0
  58. # opacity
  59. opacity-normal = 0.7
  60. opacity-focus = 1.0
  61. [widget]
  62. # set widget first line font, size, color and format
  63. firstline-font = DejaVu Sans ExtraLight
  64. firstline-size = 90
  65. firstline-color = #e1e5e8
  66. firstline-format = %H.%M
  67. # set widget second line font, size, color and format
  68. secondline-font = DejaVu Sans Book
  69. secondline-size = 14
  70. secondline-color = #e1e5e8
  71. secondline-format = %A, %d %B %Y

For the color, you can use hex format like this :

  1. [card]
  2. background-color = #e1e5e8

or you can get color from your X resources, by using format like this:

  1. [card]
  2. background-color = {background}
  3. [widget]
  4. firstline-color = {color6}

Themes

You can use the png or svg for the icon button.

See /usr/share/themes/Clearine-Fallback for example

Credits

License

The code is available under the MIT license.