<eww>
  <definitions>
    <def name="smol_calendar">
      <box orientation="v"  space-evenly="false">
        <box class="number_day">{{number_day}}</box>
        <box class="month">{{month}}</box>
      </box>
    </def>
    <def name="weather_side">
      <box orientation="h"  space-evenly="false">
        <box class="weather-icon-side" style="color: {{weather-hex}}">{{weather-icon}}</box>
        <box class="weather-info-side" orientation="v" space-evenly="false">
          <box class="temperature-side">{{temperature}}  </box>
          <box class="weather-stat-side">{{weather-stat-side}}</box>
        </box>
      </box>
    </def>

    <def name="weather_side">
      <box orientation="h"  space-evenly="false">
        <box class="weather-icon-side" style="color: {{weather-hex}}">{{weather-icon}}</box>
        <box class="weather-info-side" orientation="v" space-evenly="false">
          <box class="temperature-side">{{temperature}}  </box>
          <box class="weather-stat-side">{{weather-stat-side}}</box>
        </box>
      </box>
    </def>
    <def name="player_side">
      <box orientation="h"  space-evenly="false">
        <box class="musicart-side" style="background-image: url('{{cover}}');">{{art}}</box>

        <box class="musicstuff-side" orientation="v" space-evenly="false">
          <box class="musicinfo-side">{{music3}}</box>
          <box class="musicinfo-side">{{temperature}}</box>
          <box orientation="h" halign="center" class="musicbtn-side" space-evenly="false">
            <button onclick="playerctl previous"></button> 
            <button class="pause-play-side" onclick="playerctl play-pause">{{musicstat}}</button>
            <button onclick="playerctl next"></button>
          </box>
        </box>
      </box>
    </def>
<def name="tasks">
      <box orientation="v" space-evenly="false" class="tasks--wrap">
        <box halign="start" width="10" class="tasktitle" >{{notion_tasks}}</box>
        <box halign="start" width="10" class="tasktitle" >{{notion_tasks1}}</box>
        <box halign="start" width="10" class="tasktitle" >{{notion_tasks2}}</box>
        <box halign="start" width="10" class="tasktitle" >{{notion_tasks3}}</box>
        <box halign="start" width="10" class="tasktitle" >{{notion_tasks4}}</box>
        <box halign="start" width="10" class="tasktitle" >{{notion_tasks5}}</box>
        <box halign="start" width="10" class="tasktitle" >{{notion_tasks6}}</box>
        <box halign="start" width="10" class="tasktitle" >{{notion_tasks7}}</box>
        <box halign="start" width="10" class="tasktitle" >{{notion_tasks8}}</box>
        <box halign="start" width="10" class="tasktitle" >{{notion_tasks9}}</box>
        <box halign="start" width="10" class="tasktitle" >{{notion_tasks10}}</box>
        <box halign="start" width="10" class="tasktitle" >{{notion_tasks11}}</box>
      </box>
    </def>

  <def name="player">
      <box orientation="v" space-evenly="false" class="musicart--wrap">
          <box class="musicart" style="background-image: url('{{cover}}'), url('{{cover}}');
                      background-size: contain, 10px;
                      background-repeat: no-repeat, repeat;
                      ">{{art}}</box>
        <box class="musictitle">{{music3}}</box>
        <box class="musicartist">{{music2}}</box>
        <box orientation="h" halign="center" class="musicbtn" space-evenly="false">
          <button onclick="playerctl previous"></button> 
          <button onclick="playerctl play-pause">{{musicstat}}</button>
          <button onclick="playerctl next"></button>
        </box>
        <box orientation="h" class="volume" space-evenly="false" halign="center">
          <scale min="0" max="101" value="{{volume}}" onchange="amixer -D pulse sset Master {}%"/>
        </box>
      </box>
    </def>
    <def name="redshift">
        <box orientation="v" space-evenly="false" >
            <box orientation="h" class="redshift" space-evenly="false" halign="center">
                <scale min="1000" max="10000" value="{{redshift_val}}" onchange="echo > /tmp/redshift {}%; redshift -P -O $(cat /tmp/redshift)"/>
            </box>
        </box>
    </def>

    <def name="smol_calendar">
      <box orientation="v"  space-evenly="false">
        <box class="number_day">{{number_day}}</box>
        <box class="month">{{month}}</box>
      </box>
    </def>
    <def name="weather_side">
      <box orientation="h"  space-evenly="false">
        <box class="weather-icon-side" style="color: {{weather-hex}}">{{weather-icon}}</box>
        <box class="weather-info-side" orientation="v" space-evenly="false">
          <box class="temperature-side">{{temperature}}  </box>
          <box class="weather-stat-side">{{weather-stat-side}}</box>
        </box>
      </box>
    </def>
    <def name="player_side">
      <box orientation="h"  space-evenly="false">
        <box class="musicart-side" style="background-image: url('{{cover}}');">{{art}}</box>
        <box class="musicstuff-side" orientation="v" space-evenly="false">
          <box class="musicinfo-side">{{music3}}</box>
          <box orientation="h" halign="center" class="musicbtn-side" space-evenly="false">
            <button onclick="playerctl previous"></button> 
            <button class="pause-play-side" onclick="playerctl play-pause">{{musicstat}}</button>
            <button onclick="playerctl next"></button>
          </box>
        </box>
      </box>
    </def>
    <def name="time_side">
      <box orientation="v" space-evenly="false">
        <box orientation="h" class="time-side" space-evenly="true">
          <box class="hour-side">{{hour}}</box>
          <box class="minute-side">{{min}}</box>
        </box>
        <box class="day-side">{{day}}</box>
      </box>
    </def>
    <def name="sliders_side">
      <box orientation="v" space-evenly="false" class="sliders-side">
        <box orientation="h" class="slider-vol-side" space-evenly="false">
          <box class="label-vol-side"></box>
          <scale min="0" max="101" value="{{volume}}" onchange="amixer -D pulse sset Master {}%"/>
        </box>
        <box orientation="h" class="slider-bright-side" space-evenly="false">
          <box class="label-bright-side"></box>
          <scale min="0" max="101" value="{{bright}}" onchange="brightnessctl s {}%"/>
        </box>
        <box orientation="h" class="slider-ram-side" space-evenly="false">
          <box class="label-ram-side"></box>
          <scale min="0" active="false" max="101" value="{{ram-used}}"/>
        </box>
        <box orientation="h" class="slider-battery-side" space-evenly="false">
          <box class="label-battery-side">{{bat-icon}}</box>
          <scale min="0" active="false" max="101" value="{{battery-remaining}}"/>
        </box>
      </box>
    </def>
    <def name="sys_side">
      <box orientation="v" space-evenly="false">
        <button class="search-side" onclick="~/bin/launcher.sh">  Search...</button>
        <box orientation="h" halign="center" class="sysbtn" space-evenly="true">
          <button class="shutdown-side" onclick="~/.config/eww/scripts/shutdown.sh"></button> 
          <button class="reboot-side" onclick="~/.config/eww/scripts/reboot.sh"></button>
          <button class="lock-side" onclick="~/.config/eww/scripts/lockscreen.sh"></button>
          <button class="suspend-side" onclick="~/.config/eww/scripts/suspend.sh"></button>
          <button class="logout-side" onclick="~/.config/eww/scripts/logout.sh"></button>
        </box>
      </box>
    </def>
    <def name="calendar_full">
        <box orientation="v" halign="center" space-evenly="false">
           <box class="calendar_title">     {{day}}, {{number_day}} {{month_full}} {{year_full}}</box>
          <box class="calendar">
            <calendar show-details="true"/>
          </box>
        </box>
    </def>
    <def name="search_full">
      <box orientation="h" space-evenly="true">
        <button class="search-full" onclick="~/bin/launcher.sh"></button>
      </box>
    </def>
    <def name="power_full">
      <box orientation="h" space-evenly="true">
        <button class="power-full" onclick="~/.config/eww/scripts/shutdown.sh"></button>
      </box>
    </def>
    <def name="reboot_full">
      <box orientation="h" space-evenly="true">
        <button class="reboot-full" onclick="~/.config/eww/scripts/reboot.sh"></button>
      </box>
    </def>
    <def name="lock_full">
      <box orientation="h" space-evenly="true">
        <button class="lock-full" onclick="~/.config/eww/scripts/lockscreen.sh"></button>
      </box>
    </def>
    <def name="suspend_full">
      <box orientation="h" space-evenly="true">
        <button class="suspend-full" onclick="~/.config/eww/scripts/suspend.sh"></button>
      </box>
    </def>
    <def name="logout_full">
      <box orientation="h" space-evenly="true">
        <button class="logout-full" onclick="~/.config/eww/scripts/shutdown.sh"></button>
      </box>
    </def>
    <def name="close_full">
      <box orientation="h" space-evenly="true">
        <button class="power-full" onclick="~/bin/centerkill"></button>
      </box>
    </def>
    <def name="profile">
    <box orientation="v" space-evenly="false" class="profile">
        <box orientation="h" space-evenly="false">
          <box class="pfp"></box>
        </box>
        <box orientation="v" space-evenly="false"> 
          <box class="pfptxt" valign="center">*Insert-Name-Here*</box>
          <box class="subpfptxt" halign="center">*Some-cheeky-line*</box>
        </box>
      </box>
    </def>
    <def name="weather">
      <box orientation="v" space-evenly="false">
        <box orientation="h"  space-evenly="false">
          <box class="weather-icon" style="color: {{weather-hex}}">{{weather-icon}}</box>
          <box class="temperature">{{temperature}}  </box>
        </box>
        <box orientation="v" space-evenly="false">
          <box class="weather-stat">{{weather-stat}}</box>
          <box class="weather-quote-head">{{weather-quote}}</box>
          <box class="weather-quote-tail">{{weather-quote2}}</box>
        </box>
      </box>
    </def>
     <def name="home_dir">
      <box orientation="v" space-evenly="true" class="home-dir">
        <button class="l1" onclick="(thunar ~/{{l1}})">{{l1-processed}}</button>
        <button class="l2" onclick="(thunar ~/{{l2}})">{{l2-processed}}</button>
        <button class="l3" onclick="(thunar ~/{{l3}})">{{l3-processed}}</button>
        <button class="l4" onclick="(thunar ~/{{l4}})">{{l4-processed}}</button>
        <button class="l5" onclick="(thunar ~/{{l5}})">{{l5-processed}}</button>
        <button class="l6" onclick="(thunar ~/{{l6}})">{{l6-processed}}</button>
      </box>
    </def>
    <def name="quote">
      <box orientation="v" space-evenly="false" class="quote-box">
        <label class="quote-main" halign="start" text="{{quote}}{{quote-gen}}" wrap="true" width="25"/>
        <label class="quote-tail" halign="start" text="{{quote-tail}}" wrap="true" width="25"/>
        <label class="quote-author" text="- {{author-quote}}" halign="end"/>
      </box>
    </def>
    <def name="screenshot">
      <box orientation="v" space-evenly="true">
        <button class="screenshot-icon" onclick="flameshot gui"></button>
      </box>
    </def>
    <def name="vpn">
      <box orientation="v" space-evenly="true">
	      <button class="vpn-icon" onclick="~/.config/eww/scripts/vpntoggle" style="color: {{vpn-hex}}">嬨{{getvpnstat}}</button>
      </box>
    </def>
    <def name="incognito">
      <box orientation="v" space-evenly="true">
        <button class="incognito-icon" onclick="firefox -private-window">﫸</button>
      </box>
    </def>
    <def name="blur_full">
      <box orientation="v" space-evenly="true">
      </box>
    </def>
    <!-- <def name="powermenu">
       <box orientation="h" halign="center" class="sysbtn" space-evenly="true">
          <button class="shutdown-side" onclick="~/.config/eww/scripts/shutdown.sh"></button> 
          <button class="reboot-side" onclick="~/.config/eww/scripts/reboot.sh"></button>
          <button class="lock-side" onclick="~/.config/eww/scripts/lockscreen.sh"></button>
          <button class="suspend-side" onclick="~/.config/eww/scripts/suspend.sh"></button>
          <button class="logout-side" onclick="~/.config/eww/scripts/logout.sh"></button>
          <button class="lock-side" onclick="exec ~/bin/eww close powermenu"></button>
        </box>
    </def> -->

  </definitions>

  <variables>
    <!-- Music vars -->
    <script-var name="music" interval="5s">playerctl metadata --format '{{ artist }} - {{ title }}'</script-var>
    <script-var name="music2" interval="5s">playerctl metadata --format '{{ artist }}'</script-var>
    <script-var name="music3" interval="5s">~/.config/eww/scripts/gettitle</script-var>
    <script-var name="art" interval="5s">~/.config/eww/scripts/getart</script-var>
    <script-var name="volume" interval="3ms">~/.config/eww/scripts/getvol</script-var>
    <script-var name="redshift_val" interval="3ms">~/.config/eww/scripts/getredshift</script-var>
    <script-var name="notion_tasks" interval="1m">a=$(~/.config/eww/scripts/gettasks | sed -n '0p'); echo ${a:0:6}</script-var>
    <script-var name="notion_tasks1" interval="1m">a=$(~/.config/eww/scripts/gettasks | sed -n '1p'); echo ${a:0:6}</script-var>
    <script-var name="notion_tasks2" interval="1m">a=$(~/.config/eww/scripts/gettasks | sed -n '2p'); echo ${a:0:6}</script-var>
    <script-var name="notion_tasks3" interval="1m">a=$(~/.config/eww/scripts/gettasks | sed -n '3p'); echo ${a:0:6}</script-var>
    <script-var name="notion_tasks4" interval="1m">a=$(~/.config/eww/scripts/gettasks | sed -n '4p'); echo ${a:0:6}</script-var>
    <script-var name="notion_tasks5" interval="1m">a=$(~/.config/eww/scripts/gettasks | sed -n '5p'); echo ${a:0:6}</script-var>
    <script-var name="notion_tasks6" interval="1m">a=$(~/.config/eww/scripts/gettasks | sed -n '6p'); echo ${a:0:6}</script-var>
    <script-var name="notion_tasks7" interval="1m">a=$(~/.config/eww/scripts/gettasks | sed -n '7p'); echo ${a:0:6}</script-var>
    <script-var name="notion_tasks8" interval="1m">a=$(~/.config/eww/scripts/gettasks | sed -n '8p'); echo ${a:0:6}</script-var>
    <script-var name="notion_tasks9" interval="1m">a=$(~/.config/eww/scripts/gettasks | sed -n '9p'); echo ${a:0:6}</script-var>
    <script-var name="notion_tasks10" interval="1m">a=$(~/.config/eww/scripts/gettasks | sed -n '10p'); echo ${a:0:6}</script-var>
    <script-var name="notion_tasks11" interval="1m">a=$(~/.config/eww/scripts/gettasks | sed -n '11p'); echo ${a:0:6}</script-var>
    <script-var name="bright" interval="1ms">~/.config/eww/scripts/getbri</script-var>
    <script-var name="musicstat" interval="1s">~/.config/eww/scripts/getplaystatus</script-var>
    <script-var name="cover" interval="5s">~/.config/eww/scripts/echoart</script-var>

    <!--Date vars-->
    <script-var name="number_day" interval="5h">date "+%d"</script-var>
    <script-var name="month" interval="10h">date "+%b"</script-var>
    <script-var name="min" interval="10s">date "+%M"</script-var>
    <script-var name="hour" interval="30m">date "+%H"</script-var>
    <script-var name="day" interval="15h">~/.config/eww/scripts/getday</script-var>
    <script-var name="month_full" interval="15h">date "+%B"</script-var>
    <script-var name="year_full" interval="15h">date "+%Y"</script-var>

    <!--Weather vars-->
    <script-var name="weather-icon" interval="20m">cat /tmp/xmonad/weather/weather-icon</script-var>
    <script-var name="temperature" interval="20m">cat /tmp/xmonad/weather/weather-degree</script-var>
    <script-var name="weather-hex" interval="20m">cat /tmp/xmonad/weather/weather-hex</script-var>
    <script-var name="weather-quote" interval="20m">~/.config/eww/scripts/getwethquote</script-var>
    <script-var name="weather-quote2" interval="20m">~/.config/eww/scripts/getwethquote2</script-var>
    <script-var name="weather-stat" interval="20m">cat /tmp/xmonad/weather/weather-stat</script-var>
    <script-var name="weather-stat-side" interval="20m">~/.config/eww/scripts/weather-trimmer</script-var>

    <!--Big brain RAM vars-->
    <script-var name="ram-used" interval="1s">~/.config/eww/scripts/getram</script-var>

    <!--Battery charge vars-->
    <script-var name="battery-remaining" interval="2m">cat /sys/class/power_supply/BAT0/capacity</script-var>
    <script-var name="bat-icon" interval="2m">~/.config/tint2/scripts/battery.sh</script-var>

    <!-- Home-dir stuff -->
    <script-var name="l1-processed" interval="20h">~/.config/eww/scripts/home-dir/l1-processed</script-var>
    <script-var name="l2-processed" interval="20h">~/.config/eww/scripts/home-dir/l2-processed</script-var>
    <script-var name="l3-processed" interval="20h">~/.config/eww/scripts/home-dir/l3-processed</script-var>
    <script-var name="l4-processed" interval="20h">~/.config/eww/scripts/home-dir/l4-processed</script-var>
    <script-var name="l5-processed" interval="20h">~/.config/eww/scripts/home-dir/l5-processed</script-var>
    <script-var name="l6-processed" interval="20h">~/.config/eww/scripts/home-dir/l6-processed</script-var>

    <script-var name="l1" interval="20h">~/.config/eww/scripts/home-dir/l1</script-var>
    <script-var name="l2" interval="20h">~/.config/eww/scripts/home-dir/l2</script-var>
    <script-var name="l3" interval="20h">~/.config/eww/scripts/home-dir/l3</script-var>
    <script-var name="l4" interval="20h">~/.config/eww/scripts/home-dir/l4</script-var>
    <script-var name="l5" interval="20h">~/.config/eww/scripts/home-dir/l5</script-var>
    <script-var name="l6" interval="20h">~/.config/eww/scripts/home-dir/l6</script-var>

    <!-- Quote vars -->
    <script-var name="author-quote" interval="10m">cat /tmp/xmonad/quotes/author</script-var>
    <script-var name="quote" interval="10m">cat /tmp/xmonad/quotes/quote</script-var>
    <script-var name="quote-gen" interval="30m">~/.config/eww/scripts/quotes</script-var>
    <script-var name="quote-tail" interval="10m">cat /tmp/xmonad/quotes/quote-tail</script-var>
    <script-var name="two_monitors" interval="5s">cat /tmp/xmonad/quotes/checkmonitor</script-var>

    <!--Vpn stats-->
    <script-var name="getvpnstat" interval="10s">~/.config/eww/scripts/getvpnstat</script-var>
    <script-var name="vpn-hex" interval="10s">cat /tmp/xmonad/vpnstat-hex</script-var>

  </variables>

  <windows >
    <!-- Sidebar stuff -->

    <window name="smol_calendar">
      <geometry x="10px" y="45px" width="80px" height="80px"/>
      <widget>
        <smol_calendar/>
      </widget>
    </window>
    <window name="weather_side">
      <geometry x="95px" y="45px" width="215px" height="80px"/>
      <widget>
        <weather_side/>
      </widget>
    </window>
    <window name="player_side">
      <geometry x="10px" y="270px" width="300px" height="110px"/>
      <widget>
        <player_side/>
      </widget>
    </window>
    <window name="time_side">
      <geometry x="10px" y="130px" width="300px" height="135px"/>
      <widget>
        <time_side/>
      </widget>
    </window>
    <window name="sliders_side">
      <geometry x="10px" y="385px" width="300px" height="205px"/>
      <widget>
        <sliders_side/>
      </widget >
    </window>
    <window name="sys_side">
      <geometry x="10px" y="595px" width="300px" height="153px"/>
      <widget>
        <sys_side/>
      </widget>
    </window>

    <!-- Main Stuff -->
    <window name="calendar_full">
      <geometry x="229px" y="359px" width="100px" height="100px"/>
      <widget>
        <tasks/>
      </widget>
    </window>
    <window name="power_full">
      <geometry x="1410px" y="220px" width="120px" height="120px"/>
      <widget>
        <power_full/>
      </widget>
    </window>
     <window name="reboot_full">
      <geometry x="1410px" y="350px" width="120px" height="121px"/>
      <widget>
        <reboot_full/>
      </widget>
    </window>
    <window name="lock_full">
      <geometry x="1410px" y="482px" width="120px" height="121px"/>
      <widget>
        <lock_full/>
      </widget>
    </window>
     <window name="suspend_full">
      <geometry x="1410px" y="614px" width="120px" height="122px"/>
      <widget>
        <suspend_full/>
      </widget>
    </window>
     <window name="logout_full">
      <geometry x="1410px" y="748px" width="120px" height="122px"/>
      <widget>
        <logout_full/>
      </widget>
    </window>
     <window name="close_full">
      <geometry x="633px" y="861px" width="110px" height="122px"/>
      <widget>
        <close_full/>
      </widget>
    </window>
     <window name="player">
      <geometry x="810" y="360" width="300px" height="300px"/>
      <widget>
        <player/>
      </widget>
    </window>
    <window name="redshift" >
        <geometry x="810" y="690" width="300px" height="50px"/>
        <widget>
            <redshift/>
        </widget>
    </window>
    <window name="profile">
      <geometry x="390px" y="640" width="340px" height="520px"/>
      <widget>
        <profile/>
      </widget>
    </window>
     <window name="weather">
      <geometry x="740px" y="220px" width="410px" height="400px"/>
      <widget>
        <weather/>
      </widget>
    </window>
     <window name="home_dir">
      <geometry x="1160px" y="350px" width="240px" height="520px"/>
      <widget>
        <home_dir/>
      </widget>
    </window>
    <window name="quote">
      <geometry x="520px" y="750px" width="630px" height="120px"/>
      <widget>
        <quote/>
      </widget>
    </window>
     <window name="screenshot">
      <geometry x="1160px" y="220px" width="240px" height="120px"/>
      <widget>
        <screenshot/>
      </widget>
    </window>
    <window name="vpn-icon">
      <geometry x="740px" y="630px" width="200px" height="110px"/>
      <widget>
        <vpn/>
      </widget>
    </window>
    <window name="incognito-icon">
      <geometry x="950px" y="630px" width="200px" height="110px"/>
      <widget>
        <incognito/>
      </widget>
    </window>
    <window name="blur_full" screen="0">
      <geometry x="0px" y="0px" width="100%" height="100%"/>
      <widget>
        <blur_full/>
      </widget>
    </window>
    <!-- <window name="powermenu" focusable="true">
      <geometry x="35%" y="20%" width="30%" height="40%"/>
      <widget>
        <powermenu/>
      </widget>
    </window> -->
  </windows>
</eww>
