Advertisement
bluebyt

eww.yuck

May 12th, 2024
578
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
INI file 11.10 KB | None | 0 0
  1. ;; CAL VARS
  2. (defpoll calendar_day :interval "10h" "date '+%d'")
  3. (defpoll calendar_year :interval "10h" "date '+%Y'")
  4. (defpoll calendar_date :interval "12h" "date '+%A, %d %B'")
  5. (defpoll today :interval "12h" "date '+%a, %d %B'")
  6. (defpoll time :interval "5s" "date '+%H:%M'")
  7.  
  8. ;; ENV VARS
  9. ;;(defpoll wm :interval "12h" "echo $XDG_CURRENT_DESKTOP")
  10. (defpoll wm :initial "..." :interval "12h" "$HOME/.config/scripts/display.sh &")
  11. (defpoll shell :interval "1h" "echo $SHELL | awk -F'/' '{print $NF}'")
  12. (defpoll term :interval "1h" "echo $TERM | awk -F'-' '{print $NF}'")
  13. (defpoll uptime :interval "1m" "uptime -p | sed -e 's/up //;s/ hours,/h/;s/ minutes/m/;s/ [0-9]\+m//'")
  14. ;;(defpoll packages :interval "15m" "pacman -Q | wc -l")
  15. (defpoll updates_poll :initial "..." :interval "10m" "$HOME/.config/scripts/updates.sh &")
  16. ;; WEATHER VARS
  17. (defpoll weather_temp :interval "1h" :initial "0"
  18.     "$HOME/.config/scripts/Weather.sh current_temp")
  19. (defpoll weather_desc :interval "1h"
  20.     "$HOME/.config/scripts/Weather.sh weather_desc")
  21. (defpoll weather_feels_like :interval "3h"
  22.     "$HOME/.config/scripts/Weather.sh feels_like")
  23. (defpoll weather_humidity :interval "3h"
  24.     "$HOME/.config/scripts/Weather.sh humidity")
  25. (defpoll weather_icon :interval "3h"
  26.     "$HOME/.config/scripts/Weather.sh icon")
  27. (defpoll weather_wind :interval "3h"
  28.     "$HOME/.config/scripts/Weather.sh wind")
  29.  
  30. (defpoll memory :interval "15s"
  31.     "$HOME/.config/scripts/memory")
  32. (defpoll cpu :interval "17s"
  33.     "$HOME/.config/scripts/cpu")
  34. (defpoll disk :interval "30s"
  35.     "$HOME/.config/scripts/disk")
  36. (defpoll tempe :interval "3s"
  37.     "$HOME/.config/scripts/tempe")
  38. (defpoll temp :initial 30 :interval "10s" `sensors | rg temp1 | rg -o "\\d+.\\d+" | head -1`)
  39.  
  40. (defpoll IP_ADDR :interval "24h" "ip -br address | grep UP | awk '{ print $3 }'")
  41.  
  42.  
  43. (deflisten window :initial "..." "$HOME/.config/scripts/window-title.sh")
  44.  
  45. ;; Widgets
  46.  
  47. (defwidget dash []
  48.     (box :class "dash" :orientation "h")
  49. )
  50.  
  51. (defwidget cal[]
  52.     (box :class "cal-container" :orientation "v" :space-evenly "false" :halign "center"
  53.         (box  :class "cal-box" :orientation "v" :space-evenly "false"
  54.             (label :class "clock" :text time)
  55.             (label :class "date" :text today)
  56.         )  
  57.         (box :class "cal-window" :orientation "h"
  58.             (calendar :class "day-names" :day calendar_day :orientation "v"
  59.                       :class "month-year" :year calendar_year)
  60.         )
  61.     )
  62. )
  63.  
  64. (defwidget info []
  65.     (box :class "info-box-outer" :orientation "h" :space-evenly false :halign "center"
  66.         (box :class "info-box-top" :orientation "v" :space-evenly false
  67.             (box :class "info-box-inner" :orientation "h" :space-evenly false
  68.                 (box :class "info-box-left" :orientation "v" :space-evenly false
  69.                     (label :class "info-icon" :text " :")
  70.                     (label :class "info-icon" :text " :")
  71.                     (label :class "info-icon" :text " :")
  72.                     (label :class "info-icon" :text " :")
  73.                 )
  74.                 (box :class "info-box-right" :orientation "v" :space-evenly false
  75.                     (label :class "info-text" :halign "start" :text "${wm}")
  76.                     (label :class "info-text" :halign "start" :text "${shell}")
  77.                     (label :class "info-text" :halign "start" :text "${uptime}")
  78.                     (label :class "info-text" :halign "start" :text "${updates_poll} packages")
  79.                 )
  80.             )
  81.         )
  82.     )
  83. )
  84.  
  85. (defwidget window-title []
  86.     (box
  87.         (label :class "window-title"
  88.         :halign "center"
  89.         :limit-width 16
  90.         :justify "center"
  91.         :text "${window}")
  92.     )
  93. )
  94.  
  95. (defwidget weather []
  96.     (box :class "weather-container" :orientation "v" :space-evenly "false" :halign "center"
  97.         (box :class "weather-box" :orientation "h" :space-evenly "false" :halign "center" :spacing 10
  98.             (label :class "weather-icon" :text {weather_icon != "" ? "${weather_icon}" : ""})
  99.             (label :class "weather-temp" :text "${weather_temp}°C")
  100.         )
  101.         (box :class "weather-window" :orientation "v" :space-evenly "false" :spacing 2
  102.             (label :class "weather-feel" :text "${weather_desc}"
  103.                                         :limit-width 32
  104.                                         :justify "center"
  105.                                         :wrap "true")
  106.             (label :class "weather-desc" :text "Feels Like: ${weather_feels_like}°C")
  107.             (label :class "weather-desc" :halign "center" :text " ${weather_wind} km/h")
  108.             (label :class "weather-desc" :halign "center" :text "  ${weather_humidity} %")
  109.         )
  110.     )
  111. )
  112.  
  113.  
  114. (defwidget network []
  115.     (box :class "network-label" :orientation "h" :space-evenly "false" :spacing 10 :halign "center"
  116.         (label :text "${IP_ADDR}")
  117.     )
  118. )
  119.  
  120. (defwidget network-up []
  121.     (box :class "network" :orientation "h" :space-evenly "false" :spacing 10 :halign "center"
  122.         (box :orientation "h" :class "network-box"
  123.             (label :text "" :class "network-up")
  124.         )
  125.         (box :orientation "h" :width 130
  126.             (graph  :class "network-graph-up"
  127.                     :thickness 2
  128.                     :value {round(EWW_NET.enp4s0.NET_UP / (1024 * 1024) ,1)}
  129.                     :time-range "2m"
  130.                     :min 0
  131.                     :max 101
  132.                     :dynamic "true"
  133.                     :line-style "round"
  134.             )
  135.         )
  136.     )
  137. )
  138. (defwidget network-down []
  139.     (box :class "network" :orientation "h" :space-evenly "false" :spacing 10 :halign "center"
  140.         (box :orientation "h" :class "network-box"
  141.             (label :text "" :width 10 :class "network-down")
  142.         )
  143.         (box :orientation "h" :width 130
  144.             (graph  :class "network-graph-down"
  145.                     :thickness 2
  146.                     :value {round(EWW_NET.enp4s0.NET_DOWN / 1024 ,1)}
  147.                     :time-range "2m"
  148.                     :min 0
  149.                     :max 101
  150.                     :dynamic "true"
  151.                     :line-style "round"
  152.             )
  153.         )
  154.     )
  155. )
  156.  
  157. (defwidget system []
  158.     (box :class "sys_win" :orientation "h" :space-evenly "true" :hexpand "false" :vexpand "false"
  159.         (box :class "sys_cpu_box" :orientation "v" :space-evenly "false" :hexpand "false" :vexpand "false"
  160.             (circular-progress
  161.                     :value cpu
  162.                     :class "sys_cpu"
  163.                     :thickness 8
  164.                 (label :text ""
  165.                     :class "sys_icon_cpu"
  166.                     :limit-width 4
  167.                     :show_truncated false
  168.                     :wrap false))
  169.             (label :class "cpu_perc" :halign "center" :text "${cpu}%")
  170.         )
  171.         (box :class "sys_mem_box" :orientation "v" :space-evenly "false" :hexpand "false" :vexpand "false"
  172.             (circular-progress
  173.                     :value memory
  174.                     :class "sys_mem"
  175.                     :thickness 8
  176.               (label :text ""
  177.                     :class "sys_icon_mem"
  178.                     :limit-width 4
  179.                     :show_truncated false
  180.                     :wrap false
  181.                     :angle 0.0))
  182.             (label :class "mem_perc" :halign "center" :text "${memory}%")
  183.         )
  184.     )
  185. )
  186.  
  187. (defwidget disktemp []
  188.     (box :class "disk_temp" :orientation "h" :space-evenly "true" :hexpand "false" :vexpand "false"
  189.         (box :class "sys_disk_box" :orientation "v" :space-evenly "false" :hexpand "false" :vexpand "false"
  190.           (circular-progress
  191.                   :value disk
  192.                   :class "sys_disk"
  193.                   :thickness 8
  194.               (label :text ""
  195.                     :class "sys_icon_disk"
  196.                     :limit-width 4
  197.                     :show_truncated false
  198.                     :wrap false))
  199.             (label :class "disk_perc" :halign "center" :text "${disk}%")
  200.         )        
  201.       (box :class "sys_tempe_box" :orientation "v" :space-evenly "false" :hexpand "false" :vexpand "false"
  202.             (circular-progress
  203.                     :value tempe
  204.                     :class "sys_tempe"
  205.                     :thickness 8
  206.               (label :text ""
  207.                     :class "sys_icon_tempe"
  208.                     :limit-width 4
  209.                     :show_truncated false
  210.                     :wrap false
  211.                     :angle 0.0))
  212.             (label :class "tempe_perc" :halign "center" :text "${tempe}C")
  213.         )  
  214.     )
  215. )
  216.  
  217.  
  218.  
  219. (defwidget apps []
  220.     (box :class "app-container" :orientation "v" :space-evenly "true" :hexpand "false" :vexpand "false" :halign "center"
  221.     (label :text "Apps" :class "app-label")
  222.         (box :class "app-box" :orientation "h" :space-evenly "false" :hexpand "false" :vexpand "false" :spacing 10
  223.             (button :class "app-firefox"
  224.                 :onclick "alacritty -e zsh 2> /dev/null" "")
  225.             (button :class "app-files"
  226.                 :onclick "thunar 2> /dev/null" "")
  227.             (button :class "app-code"
  228.                 :onclick "wofi -n --show drun -k 2> /dev/null" "")
  229.             (button :class "app-steam"
  230.                 :onclick "foot 2> /dev/null" "")
  231.         )
  232.     )
  233. )
  234.  
  235. ;; Functions
  236. (defwidget functions []
  237.     (box :class "function-container" :orientation "v" :space-evenly "true" :hexpand "false" :vexpand "false" :halign "center"
  238.     (label :text "Functions" :class "function-label")
  239.         (box :class "function-box" :orientation "h" :space-evenly "false" :hexpand "false" :vexpand "false" :spacing 10
  240.             (button :class "screenshot"
  241.                 :onclick "bash $HOME/.config/scripts/screenshot.sh 2> /dev/null"
  242.                 :tooltip "Screenshot"
  243.             (label :text "" :class "tooltip"))
  244.             (button :class "wallpaper"
  245.                 :onclick "bash $HOME/.config/scripts/wallpaper.sh 2> /dev/null"
  246.                 :tooltip "Wallpaper"
  247.             (label :text "" :class "tooltip"))
  248.             (button :class "keybind"
  249.                 :onclick "$HOME/.config/scripts/hyprland"
  250.                 :tooltip "Hyprland.conf"
  251.             (label :text "" :class "tooltip"))
  252.             (button :class "logout"
  253.                 :onclick "bash $HOME/.config/scripts/logout.sh"
  254.                 :tooltip "Logout"
  255.             (label :text "" :class "tooltip")
  256.             )
  257.         )
  258.     )
  259. )
  260.  
  261. (defwidget right []
  262.     (box :class "right" :orientation "v" :space-evenly "false"
  263.         (cal)
  264.         (dash)
  265.         (window-title)
  266.         (dash)
  267.         (info)
  268.         (dash)
  269.         (apps)
  270.         (dash)
  271.         (weather)
  272.         (dash)
  273.         (network)
  274.         (network-up)
  275.         (network-down)
  276.         (dash)
  277.         (disktemp)
  278.         (system)
  279.     (dash)
  280.     (functions)
  281.     )
  282. )
  283.  
  284. (defwindow sidebar
  285.     :monitor 0
  286.     :geometry (geometry :x "16px"
  287.                         :y "40px"
  288.                         :width "140px"
  289.                         :height "60%"
  290.                         :anchor "top left")
  291.     :stacking "fg"
  292.     :windowtype "dock"
  293.     :exclusive true
  294.         (box :class "main-container"
  295.         (right)
  296.     )
  297. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement