Linux configuration stuffs

add new cards

clxxiii 1735fdb9 7ab034c0

+849 -83
+6 -4
.gitignore
··· 1 - .config/ranger/plugins/__pycache__ 2 - .config/cava/shaders 1 + ranger/plugins/__pycache__ 2 + ranger/plugins/ranger_devicons 3 + cava/shaders 3 4 Wallpapers/wallpaper 4 - .config/ranger/plugins/ranger_devicons 5 - .config/bashtop/error.log 5 + bashtop/error.log 6 + openweatherkey 7 + album.png
-36
eww/bars/horizontal-bspwm/eww.yuck
··· 147 147 ) 148 148 149 149 150 - (defwidget h-brightness [] 151 - (box 152 - :class "bright widget" 153 - :orientation "h" 154 - :spacing 5 155 - :space-evenly "false" 156 - (label :text "") 157 - (scale 158 - :class "volbar" 159 - :value {brightness} 160 - :orientation "h" 161 - :min 0 162 - :max 101 163 - :onchange "brightnessctl set {}%" 164 - ) 165 - ) 166 - ) 167 - 168 - (defwidget h-volume [] 169 - (box 170 - :class "vol widget" 171 - :spacing 5 172 - :orientation "h" 173 - :space-evenly "false" 174 - (label :text "") 175 - (scale 176 - :class "vol scale" 177 - :value {volume} 178 - :orientation "h" 179 - :min 0 180 - :max 101 181 - :onchange "pactl set-sink-volume @DEFAULT_SINK@ {}%" 182 - ) 183 - ) 184 - ) 185 - 186 150 (defwidget circle-widget [value class name icon] 187 151 (overlay 188 152 :class {class}
+9 -8
eww/bars/horizontal/eww.css
··· 50 50 color: #a6e3a1; 51 51 font-size: 1.75rem; 52 52 } 53 - 54 53 progressbar trough, 55 54 scale trough { 56 55 background-color: #313244; 56 + } 57 + 58 + progressbar.volbar trough, 59 + scale.volbar trough { 60 + background-color: #313244; 57 61 min-height: 10px; 58 62 border-radius: 100px; 59 63 min-width: 90px; 60 64 } 61 - scale trough highlight, 65 + scale.volbar trough highlight, 62 66 progressbar trough progress { 63 67 border-radius: 10px; 64 68 min-height: 10px; ··· 81 85 color: #74c7ec; 82 86 } 83 87 84 - scale trough highlight { 85 - background-color: #74c7ec; 88 + scale.volbar { 89 + font-size: 1rem; 86 90 } 87 - .vol scale trough highlight { 91 + scale.volbar trough highlight { 88 92 background-color: #74c7ec; 89 - } 90 - scale { 91 - font-size: 1rem; 92 93 } 93 94 .bright scale trough highlight { 94 95 background-color: #f9e2af;
+1 -1
eww/bars/horizontal/eww.yuck
··· 170 170 :space-evenly "false" 171 171 (label :text "") 172 172 (scale 173 - :class "vol scale" 173 + :class "volbar" 174 174 :value {volume} 175 175 :orientation "h" 176 176 :min 0
-1
eww/bars/wayland/eww.yuck
··· 37 37 :halign "end" 38 38 (h-volume) 39 39 (h-brightness) 40 - (h-bat) 41 40 (h-wifi) 42 41 (h-times) 43 42 )
+25
eww/cards.sh
··· 1 + #! /bin/bash 2 + # 3 + # Opens all the eww cards 4 + 5 + EWW="eww-wayland" 6 + CARD_NAMES=(np profile distro quickapps powermenu weather confirmation clock system sliders github youtube brightspace twitch calendar) 7 + 8 + open() { 9 + for i in ${CARD_NAMES[*]}; 10 + do 11 + $EWW open $i 12 + done 13 + } 14 + 15 + close() { 16 + for i in ${CARD_NAMES[*]}; 17 + do 18 + $EWW close $i 19 + done 20 + } 21 + 22 + close 23 + if [[ $1 != "close" ]]; then 24 + open 25 + fi
+14
eww/cards/calendar/eww.yuck
··· 1 + (defwindow calendar 2 + :monitor 0 3 + :geometry (geometry :x "${320 + 11 * 6}px" 4 + :y "${140 + 61 * 6}px" 5 + :anchor "top left") 6 + :stacking "bg" 7 + :focusable false 8 + :hexpand false 9 + (box 10 + :class "card" 11 + :width {10 * 6} 12 + :height {10 * 6} 13 + ) 14 + )
+29
eww/cards/clock/eww.yuck
··· 1 + (defpoll weekday :interval "1s" :inital "" 2 + `date '+%A'` 3 + ) 4 + 5 + (defwindow clock 6 + :monitor 0 7 + :geometry (geometry :x "${320 + 155 * 6}px" 8 + :y "${140 + 0 * 6}px" 9 + :anchor "top left") 10 + :stacking "bg" 11 + :focusable false 12 + :hexpand false 13 + (box 14 + :class "card" 15 + :width {59 * 6} 16 + :height {25 * 6} 17 + (clock) 18 + ) 19 + ) 20 + 21 + (defwidget clock [] 22 + (box 23 + :orientation "v" 24 + :space-evenly false 25 + (label :class "bigtime" :text "${hour}:${minute}:${second}") 26 + (label :class "weekday" :text weekday) 27 + (label :class "date" :text date) 28 + ) 29 + )
+33
eww/cards/confirmation/eww.yuck
··· 1 + (defvar poweroperation "") 2 + 3 + (defwindow confirmation 4 + :monitor 0 5 + :geometry (geometry :x "${320 + 9 * 6}px" 6 + :y "${140 + 91 * 6}px" 7 + :anchor "top left") 8 + :stacking "bg" 9 + :focusable false 10 + :hexpand false 11 + 12 + (revealer 13 + :reveal {poweroperation != ""} 14 + :transition "slideleft" 15 + (box 16 + :class "popupl" 17 + :orientation "v" 18 + :valign "center" 19 + :space-evenly false 20 + :spacing 10 21 + :width {50 * 6} 22 + :height {29 * 6} 23 + (label :class "powerwarning" :text "Really ${poweroperation}?") 24 + (box 25 + :halign "center" 26 + :space-evenly false 27 + :spacing 10 28 + (button :class "powerno" :onclick "${EWW_CMD} update poweroperation=''" "No") 29 + (button :class "poweryes" :onclick "scripts/power.sh ${poweroperation}" "Yes") 30 + ) 31 + ) 32 + ) 33 + )
+18
eww/cards/distro/eww.yuck
··· 1 + (defwindow distro 2 + :monitor 0 3 + :geometry (geometry :x "${320 + 0 * 6}px" 4 + :y "${140 + 0 * 6}px" 5 + :anchor "top left") 6 + :stacking "bg" 7 + :focusable false 8 + :hexpand false 9 + (box 10 + :class "card" 11 + :width {10 * 6} 12 + :height {10 * 6} 13 + (image 14 + :path "images/eos.png" 15 + :image-width {6 * 6} 16 + ) 17 + ) 18 + )
+145 -3
eww/cards/eww.css
··· 1 1 .card { 2 2 background-color: #1e1e2e; 3 3 border-radius: 8px; 4 + padding: 12px; 5 + } 6 + .popupl { 7 + background-color: #313244; 8 + padding: 12px; 9 + border-top-right-radius: 8px; 10 + border-bottom-right-radius: 8px; 11 + } 12 + .powerwarning { 13 + font-weight: bold; 14 + font-size: 24px; 15 + } 16 + .poweryes, 17 + .powerno { 18 + border-radius: 8px; 19 + color: #1e1e2e; 4 20 padding: 10px; 21 + background-color: #a6e3a1; 22 + } 23 + .powerno { 24 + background-color: #f38ba8; 5 25 } 6 26 7 27 .album { 8 28 border-radius: 8px; 9 29 } 30 + 10 31 .duration { 11 32 font-family: "Jetbrains Mono NFM"; 12 33 } ··· 15 36 background-color: #313244; 16 37 min-height: 10px; 17 38 border-radius: 100px; 18 - min-width: 400px; 39 + 40 + min-width: 270px; 41 + } 42 + 43 + .pfp { 44 + margin-top: 20px; 45 + border-radius: 999px; 46 + background-size: cover; 47 + } 48 + .username { 49 + font-family: "Damion", "Product Sans", sans-serif; 50 + color: #cdd6f4; 51 + font-size: 36px; 19 52 } 20 53 21 54 .title { 22 - color: white; 55 + color: #cdd6f4; 23 56 font-weight: bold; 24 57 font-size: 16; 25 58 } 26 59 .artist { 27 - color: white; 60 + color: #cdd6f4; 28 61 font-size: 16; 29 62 } 30 63 ··· 34 67 color: #cdd6f4; 35 68 font-size: 24px; 36 69 } 70 + 71 + .poweroff, 72 + .restart, 73 + .logout { 74 + font-size: 36px; 75 + } 76 + .weblink .icon { 77 + font-size: 128px; 78 + margin-top: -40px; 79 + margin-bottom: -40px; 80 + } 81 + 82 + scale.songduration trough highlight { 83 + background-color: #74c7ec; 84 + } 85 + 86 + .poweroff { 87 + color: #f38ba8; 88 + } 89 + .restart { 90 + color: #89b4fa; 91 + } 92 + .logout { 93 + color: #f9e2af; 94 + } 95 + 96 + .wicon { 97 + font-size: 128px; 98 + margin: -55px 0px -60px 5px; 99 + } 100 + .shortcut { 101 + font-family: "Jetbrains Mono NFM"; 102 + font-size: 36px; 103 + color: #6c7086; 104 + } 105 + .shortcut:hover { 106 + color: #cdd6f4; 107 + } 108 + .wtemp { 109 + font-family: "Jetbrains Mono NFM"; 110 + font-size: 48px; 111 + color: #cdd6f4; 112 + } 113 + .wstat { 114 + font-family: "Damion", "Product Sans", sans-serif; 115 + font-size: 40px; 116 + } 117 + .quote1 { 118 + font-weight: bold; 119 + } 120 + .quote1, 121 + .quote2 { 122 + margin: -5px 0px -5px 0px; 123 + font-family: "Product Sans", sans-serif; 124 + color: #cdd6f4; 125 + font-style: italic; 126 + font-size: 17px; 127 + } 128 + .bigtime { 129 + font-family: "Jetbrains Mono NFM"; 130 + font-size: 48px; 131 + color: #f9e2af; 132 + margin-bottom: -10px; 133 + } 134 + .weekday { 135 + font-family: "Damion", "Product Sans", sans-serif; 136 + font-size: 30px; 137 + color: #a6e3a1; 138 + } 139 + .date { 140 + font-family: "Product Sans", sans-serif; 141 + font-size: 20px; 142 + font-weight: bold; 143 + color: #cdd6f4; 144 + } 145 + .bigcircle .usage { 146 + font-family: "Jetbrains Mono NFM"; 147 + font-size: 32px; 148 + } 149 + .bigcircle .icon { 150 + font-family: "Jetbrains Mono NFM"; 151 + font-size: 100px; 152 + margin-top: -7px; 153 + } 154 + scale.system-slider trough { 155 + min-height: 200px; 156 + border-radius: 8px; 157 + min-width: 40px; 158 + } 159 + 160 + .b-slider { 161 + font-family: "Material Icons"; 162 + font-size: 30px; 163 + color: #f9e2af; 164 + } 165 + 166 + .b-slider scale trough highlight { 167 + background-color: #f9e2af; 168 + } 169 + 170 + .v-slider { 171 + font-family: "Material Icons"; 172 + font-size: 30px; 173 + color: #74c7ec; 174 + } 175 + 176 + .v-slider scale trough highlight { 177 + background-color: #74c7ec; 178 + }
+17
eww/cards/eww.yuck
··· 1 1 (include "cards/np/eww.yuck") 2 + (include "cards/profile/eww.yuck") 3 + (include "cards/distro/eww.yuck") 4 + (include "cards/quickapps/eww.yuck") 5 + (include "cards/powermenu/eww.yuck") 6 + (include "cards/weather/eww.yuck") 7 + (include "cards/confirmation/eww.yuck") 8 + (include "cards/clock/eww.yuck") 9 + (include "cards/system/eww.yuck") 10 + (include "cards/sliders/eww.yuck") 11 + (include "cards/webshortcuts/eww.yuck") 12 + (include "cards/calendar/eww.yuck") 13 + 14 + (include "cards/frame.yuck") 15 + 16 + ; Each card is an element that shows up on the bottom of the desktop 17 + ; The full dashboard is scaled to be around 1280x720, centered on the screen 18 + ; All cards are built in units of 6px, so the spacing remains even in between them 2 19 3 20
+15
eww/cards/frame.yuck
··· 1 + (defwindow frame 2 + :monitor 0 3 + :geometry (geometry :x "${320 + 0 * 6}px" 4 + :y "${140 + 0 * 6}px" 5 + :anchor "top left") 6 + :stacking "bg" 7 + :focusable false 8 + :hexpand false 9 + (box 10 + :width 1284 11 + :height 720 12 + :style "background-color: #aaaaaa" 13 + (empty) 14 + ) 15 + )
+15 -17
eww/cards/np/eww.yuck
··· 1 1 (defwindow np 2 2 :monitor 0 3 - :geometry (geometry :x "0px" 4 - :y "6px" 5 - :anchor "center top") 3 + :geometry (geometry :x "${320 + 62 * 6}px" 4 + :y "${140 + 0 * 6}px" 5 + :anchor "top left") 6 6 :stacking "bg" 7 7 :focusable false 8 8 :hexpand false 9 9 (box 10 - :width 550 11 - :height 150 10 + :width {92 * 6} 11 + :height {25 * 6} 12 12 :valign "center" 13 13 :hexpand false 14 14 :space-evenly false 15 15 :class "card" 16 16 (box 17 - :width 530 17 + :width {88 * 6} 18 18 :visible {playerstatus == "Stopped"} 19 19 (label :xalign 0.5 :text "Nothing is playing" ) 20 20 ) ··· 23 23 :spacing 10 24 24 :visible {playerstatus != "Stopped"} 25 25 (controls) 26 + (album) 26 27 (box 27 28 :space-evenly false 28 29 :spacing 15 30 + :valign "center" 29 31 :orientation "v" 30 32 (data) 31 33 (playerprogress) ··· 51 53 ) 52 54 ) 53 55 ) 54 - ;  55 56 56 - (defwidget data [] 57 - (box 58 - :space-evenly false 59 - :hexpand false 60 - :orientation "h" 61 - :spacing 10 57 + (defwidget album [] 62 58 (image 63 - :image-width 100 64 - :image-height 100 59 + :image-width {17 * 6} 60 + :image-height {17 * 6} 65 61 :class "album" 66 62 :path "${albumart}" 67 63 ) 64 + ) 65 + 66 + (defwidget data [] 68 67 (box 69 68 :space-evenly false 70 69 :valign "center" 71 - :halign "center" 70 + :halign "start" 72 71 :hexpand false 73 72 :orientation "v" 74 73 (label :limit-width 50 :xalign 0 :class "title" :text {title}) 75 74 (label :xalign 0 :class "artist" :text {artist}) 76 75 ) 77 - ) 78 76 ) 79 77 (defwidget playerprogress [] 80 78 (box
+19
eww/cards/powermenu/eww.yuck
··· 1 + (defwindow powermenu 2 + :monitor 0 3 + :geometry (geometry :x "${320 + 0 * 6}px" 4 + :y "${140 + 91 * 6}px" 5 + :anchor "top left") 6 + :stacking "bg" 7 + :focusable false 8 + :hexpand false 9 + (box 10 + :class "card" 11 + :orientation "v" 12 + :width {10 * 6} 13 + :height {29 * 6} 14 + (button :onclick "${EWW_CMD} update poweroperation=poweroff" (label :class "poweroff" :text "󰤆")) 15 + (button :onclick "${EWW_CMD} update poweroperation=restart" (label :class "restart" :text "󰜉")) 16 + (button :onclick "${EWW_CMD} update poweroperation=logout" (label :class "logout" :text "󰍃")) 17 + 18 + ) 19 + )
+33
eww/cards/profile/eww.yuck
··· 1 + (defwindow profile 2 + :monitor 0 3 + :geometry (geometry :x "${320 + 11 * 6}px" 4 + :y "${140 + 0 * 6}px" 5 + :anchor "left top") 6 + :stacking "bg" 7 + :focusable false 8 + :hexpand false 9 + (box 10 + :class "card" 11 + :space-evenly false 12 + :spacing 10 13 + :width {50 * 6} 14 + :height {60 * 6} 15 + :orientation "v" 16 + (box 17 + :orientation "h" 18 + :halign "center" 19 + (pfp) 20 + ) 21 + (label :text "Hello, ${username}" :class "username" ) 22 + ) 23 + ) 24 + 25 + (defpoll username :initial "" :interval 600 "whoami") 26 + 27 + (defwidget pfp [] 28 + (box 29 + :width 200 30 + :height 215 31 + :class "pfp" 32 + :style "background-image: url('/var/lib/AccountsService/icons/${username}')") 33 + )
+34
eww/cards/quickapps/eww.yuck
··· 1 + (defwindow quickapps 2 + :monitor 0 3 + :geometry (geometry :x "${320 + 0 * 6}px" 4 + :y "${140 + 11 * 6}px" 5 + :anchor "top left") 6 + :stacking "bg" 7 + :focusable false 8 + :hexpand false 9 + (box 10 + :class "card" 11 + :width {10 * 6} 12 + :orientation "v" 13 + :height {79 * 6} 14 + (shortcut :text "LibreWolf" :icon "󰈹" :path "librewolf &") 15 + (shortcut :text "Alacritty" :icon "" :path "alacritty &") 16 + (shortcut :text "Spotify" :icon "" :path "spotify-launcher &") 17 + (shortcut :text "Obsidian" :icon "󰠮" :path "obsidian &") 18 + (shortcut :text "Code" :icon "󰨞" :path "code &") 19 + (shortcut :text "Discord" :icon "󰙯" :path "discord &") 20 + (shortcut :text "Vim" :icon "" :path "alacritty -e nvim &") 21 + ) 22 + ) 23 + 24 + (defwidget shortcut [icon path ?text] 25 + (eventbox 26 + :cursor "pointer" 27 + (button 28 + :class "shortcut" 29 + :tooltip "${text}" 30 + :onclick "${path}" 31 + "${icon}" 32 + ) 33 + ) 34 + )
+60
eww/cards/sliders/eww.yuck
··· 1 + (defwindow sliders 2 + :monitor 0 3 + :geometry (geometry :x "${320 + 180 * 6}px" 4 + :y "${140 + 26 * 6}px" 5 + :anchor "top left") 6 + :stacking "bg" 7 + :focusable false 8 + :hexpand false 9 + (box 10 + :class "card" 11 + :width {34 * 6} 12 + :height {46 * 6} 13 + (box 14 + :valign "center" 15 + :space-evenly false 16 + :halign "center" 17 + :spacing {5 * 6} 18 + (big-volume) 19 + (big-brightness) 20 + ) 21 + ) 22 + ) 23 + 24 + (defwidget big-brightness [] 25 + (box 26 + :class "b-slider" 27 + :orientation "v" 28 + :spacing 5 29 + :space-evenly "false" 30 + (scale 31 + :class "system-slider" 32 + :value {brightness} 33 + :orientation "v" 34 + :flipped true 35 + :min 0 36 + :max 101 37 + :onchange "brightnessctl set {}%" 38 + ) 39 + (label :text "") 40 + ) 41 + ) 42 + 43 + (defwidget big-volume [] 44 + (box 45 + :class "v-slider" 46 + :orientation "v" 47 + :spacing 5 48 + :space-evenly "false" 49 + (scale 50 + :class "system-slider" 51 + :value {volume} 52 + :orientation "v" 53 + :flipped true 54 + :min 0 55 + :max 101 56 + :onchange "pactl set-sink-volume @DEFAULT_SINK@ {}%" 57 + ) 58 + (label :text "") 59 + ) 60 + )
+97
eww/cards/system/eww.yuck
··· 1 + (defvar cpuhover false) 2 + (defvar ramhover false) 3 + (defvar diskhover false) 4 + (defvar bathover false) 5 + 6 + (defwindow system 7 + :monitor 0 8 + :geometry (geometry :x "${320 + 133 * 6}px" 9 + :y "${140 + 26 * 6}px" 10 + :anchor "top left") 11 + :stacking "bg" 12 + :focusable false 13 + :hexpand false 14 + (box 15 + :class "card" 16 + :width {46 * 6} 17 + :height {46 * 6} 18 + (box 19 + :orientation "v" 20 + :halign "center" 21 + :valign "center" 22 + :space-evenly false 23 + :spacing {2 * 6} 24 + (box 25 + :space-evenly false 26 + :halign "center" 27 + :valign "center" 28 + :spacing {2 * 6} 29 + (bigcircle 30 + :color "#74c7ec" 31 + :value {EWW_CPU.avg} 32 + :class "cpu" 33 + :name "CPU" 34 + :icon "󰻠" 35 + :hover cpuhover 36 + :hovername "cpuhover" 37 + ) 38 + (bigcircle 39 + :color "#cba6f7" 40 + :value {EWW_RAM.used_mem_perc} 41 + :class "ram" 42 + :name "RAM" 43 + :icon "󰘚" 44 + :hover ramhover 45 + :hovername "ramhover" 46 + ) 47 + ) 48 + (box 49 + :space-evenly false 50 + :halign "center" 51 + :valign "center" 52 + :spacing {2 * 6} 53 + (bigcircle 54 + :color "#eba0ac" 55 + :value {EWW_DISK["/"].used_perc} 56 + :class "disk" 57 + :name "Disk" 58 + :icon "󰋊" 59 + :hover diskhover 60 + :hovername "diskhover" 61 + ) 62 + (bigcircle 63 + :value {battery_per} 64 + :color "#a6e3a1" 65 + :class "cpu" 66 + :name "CPU" 67 + :icon "${battery_icon}" 68 + :hover bathover 69 + :hovername "bathover" 70 + ) 71 + ) 72 + ) 73 + ) 74 + ) 75 + 76 + (defwidget bigcircle [value class name icon ?color ?hover ?hovername] 77 + (eventbox 78 + :class "bigcircle" 79 + :onhover "${EWW_CMD} update ${hovername}=true" 80 + :onhoverlost "${EWW_CMD} update ${hovername}=false" 81 + (overlay 82 + :class {class} 83 + :style "color: ${color}" 84 + (circular-progress 85 + :value {value} 86 + :class "circle" 87 + :thickness 15 88 + :start-at 25 89 + :height {20 * 6} 90 + :width {20 * 6} 91 + ) 92 + (label :visible {!hover} :class "icon" :text {icon}) 93 + (label :visible {hover} :class "usage" :text {round(value,1)} 94 + ) 95 + ) 96 + ) 97 + )
+32
eww/cards/weather/eww.yuck
··· 1 + (defpoll wicon :interval 60 "scripts/weather.sh --icon") 2 + (defpoll wtemp :interval 60 "scripts/weather.sh --temp") 3 + (defpoll whex :interval 60 "scripts/weather.sh --hex") 4 + (defpoll wstat :interval 60 "scripts/weather.sh --stat") 5 + (defpoll wquote :interval 60 "scripts/weather.sh --quote") 6 + (defpoll wquote2 :interval 60 "scripts/weather.sh --quote2") 7 + 8 + (defwindow weather 9 + :monitor 0 10 + :geometry (geometry :x "${320 + 62 * 6}px" 11 + :y "${140 + 26 * 6}px" 12 + :anchor "top left") 13 + :stacking "bg" 14 + :focusable false 15 + :hexpand false 16 + (box 17 + :class "card" 18 + :width {70 * 6} 19 + :height {34 * 6} 20 + :orientation "v" 21 + :valign "end" 22 + :space-evenly false 23 + (box :orientation "v" :spacing 10 :space-evenly "false" :vexpand "false" :hexpand "false" 24 + (box :orientation "h" :vexpand "false" :hexpand "false" 25 + (label :class "wicon" :halign "start" :style "color: ${whex};" :text wicon) 26 + (label :class "wtemp" :halign "end" :text wtemp)) 27 + (box :orientation "v" :spacing 10 :halign "start" :space-evenly "false" :vexpand "false" :hexpand "false" 28 + (label :xalign 0 :class "wstat" :text wstat :style "color: ${whex}") 29 + (label :xalign 0 :class "quote1" :text wquote) 30 + (label :xalign 0 :class "quote2" :text wquote2)))) 31 + ) 32 +
+57
eww/cards/webshortcuts/eww.yuck
··· 1 + 2 + (defwindow youtube 3 + :monitor 0 4 + :geometry (geometry :x "${320 + 167 * 6}px" 5 + :y "${140 + 73 * 6}px" 6 + :anchor "top left") 7 + :stacking "bg" 8 + :focusable false 9 + :hexpand false 10 + (webshortcut :icon "󰗃" :link "https://youtube.com" :color "#FF0000") 11 + ) 12 + 13 + (defwindow github 14 + :monitor 0 15 + :geometry (geometry :x "${320 + 167 * 6}px" 16 + :y "${140 + 97 * 6}px" 17 + :anchor "top left") 18 + :stacking "bg" 19 + :focusable false 20 + :hexpand false 21 + (webshortcut :icon "" :link "https://github.com" :color "#181717") 22 + ) 23 + 24 + (defwindow twitch 25 + :monitor 0 26 + :geometry (geometry :x "${320 + 191 * 6}px" 27 + :y "${140 + 97 * 6}px" 28 + :anchor "top left") 29 + :stacking "bg" 30 + :focusable false 31 + :hexpand false 32 + (webshortcut :icon "󰕃" :link "https://twitch.tv" :color "#9146FF") 33 + ) 34 + 35 + (defwindow brightspace 36 + :monitor 0 37 + :geometry (geometry :x "${320 + 191 * 6}px" 38 + :y "${140 + 73 * 6}px" 39 + :anchor "top left") 40 + :stacking "bg" 41 + :focusable false 42 + :hexpand false 43 + (webshortcut :icon "" :link "https://www.oswego.edu/mylearning" :color "#444444") 44 + ) 45 + 46 + (defwidget webshortcut [icon color link] 47 + (box 48 + :class "card weblink" 49 + :width {23 * 6} 50 + :style "background-color: ${color}" 51 + :height {23 * 6} 52 + (button 53 + :onclick "$BROWSER ${link}" 54 + (label :class "icon" :text icon) 55 + ) 56 + ) 57 + )
eww/images/eos.png

This is a binary file and will not be displayed.

+24 -11
eww/scripts/battery.sh
··· 4 4 per="$(cat "$bat/capacity")" 5 5 6 6 icon() { 7 + [ $(cat "$bat/status") = Charging ] && echo "󰂄" && exit 7 8 8 - [ $(cat "$bat/status") = Charging ] && echo "" && exit 9 - 10 - if [ "$per" -gt "15" ]; then 11 - icon="" 12 - elif [ "$per" -gt "10" ]; then 13 - icon="" 14 - # notify-send -u critical "Battery Low" "Connect Charger" 15 - else 16 - echo  && exit 17 - fi 18 - echo "$icon" 9 + if [ "$per" -gt "90" ]; then 10 + icon="󰁹" 11 + elif [ "$per" -gt "80" ]; then 12 + icon="󰂂" 13 + elif [ "$per" -gt "70" ]; then 14 + icon="󰂁" 15 + elif [ "$per" -gt "60" ]; then 16 + icon="󰂀" 17 + elif [ "$per" -gt "50" ]; then 18 + icon="󰁿" 19 + elif [ "$per" -gt "40" ]; then 20 + icon="󰁾" 21 + elif [ "$per" -gt "30" ]; then 22 + icon="󰁽" 23 + elif [ "$per" -gt "20" ]; then 24 + icon="󰁼" 25 + elif [ "$per" -gt "10" ]; then 26 + icon="󰂃" 27 + # notify-send -u critical ")Battery Low" "Connect Charger" 28 + else 29 + echo 󰂃 && exit 30 + fi 31 + echo "$icon" 19 32 } 20 33 21 34 percent() {
-2
eww/scripts/getvolume.sh
··· 1 - #!/bin/sh 2 - pactl get-sink-volume @DEFAULT_SINK@ | grep -E -o '[1234567890]{1,3}%' | tr -d '%' | head -n 1
+12
eww/scripts/power.sh
··· 1 + 2 + if [[ $1 == "poweroff" ]]; then 3 + systemctl shutdown 4 + fi 5 + 6 + if ! [[ $1 != "restart" ]]; then 7 + systemctl reboot 8 + fi 9 + 10 + if ! [[ $1 != "logout" ]]; then 11 + ~/.config/rofi/logout 12 + fi
+154
eww/scripts/weather.sh
··· 1 + #!/bin/bash 2 + 3 + ## Collect data 4 + cache_dir="$HOME/.cache/eww/weather" 5 + cache_weather_stat=${cache_dir}/weather-stat 6 + cache_weather_degree=${cache_dir}/weather-degree 7 + cache_weather_quote=${cache_dir}/weather-quote 8 + cache_weather_hex=${cache_dir}/weather-hex 9 + cache_weather_icon=${cache_dir}/weather-icon 10 + 11 + ## Weather data 12 + KEYFILE="$HOME/.config/eww/scripts/openweatherkey" 13 + ID="5130076" 14 + UNIT="imperial" # Available options : 'metric' or 'imperial' 15 + 16 + ## Get Key 17 + if [[ ! -e $KEYFILE ]]; then 18 + echo "Key not found! Make a file in the script's directory titled 'openweatherkey' and place your api key" 19 + exit 1 20 + else 21 + KEY="$(cat $KEYFILE)" 22 + fi 23 + 24 + ## Make cache dir 25 + if [[ ! -d "$cache_dir" ]]; then 26 + mkdir -p ${cache_dir} 27 + fi 28 + 29 + ## Get data 30 + get_weather_data() { 31 + weather=`curl -sf "http://api.openweathermap.org/data/2.5/weather?APPID="$KEY"&id="$ID"&units="$UNIT""` 32 + echo ${weather} 33 + 34 + if [ ! -z "$weather" ]; then 35 + weather_temp=`echo "$weather" | jq ".main.temp" | cut -d "." -f 1` 36 + weather_icon_code=`echo "$weather" | jq -r ".weather[].icon" | head -1` 37 + weather_description=`echo "$weather" | jq -r ".weather[].description" | head -1 | sed -e "s/\b\(.\)/\u\1/g"` 38 + 39 + #Big long if statement of doom 40 + if [ "$weather_icon_code" == "50d" ]; then 41 + weather_icon=" " 42 + weather_quote="Forecast says it's misty \nMake sure you don't get lost on your way..." 43 + weather_hex="#84afdb" 44 + elif [ "$weather_icon_code" == "50n" ]; then 45 + weather_icon=" " 46 + weather_quote="Forecast says it's a misty night \nDon't go anywhere tonight or you might get lost..." 47 + weather_hex="#84afdb" 48 + elif [ "$weather_icon_code" == "01d" ]; then 49 + weather_icon=" " 50 + weather_quote="It's a sunny day, gonna be fun! \nDon't go wandering all by yourself though..." 51 + weather_hex="#ffd86b" 52 + elif [ "$weather_icon_code" == "01n" ]; then 53 + weather_icon=" " 54 + weather_quote="It's a clear night \nYou might want to take a evening stroll to relax..." 55 + weather_hex="#fcdcf6" 56 + elif [ "$weather_icon_code" == "02d" ]; then 57 + weather_icon=" " 58 + weather_quote="It's cloudy, sort of gloomy \nYou'd better get a book to read..." 59 + weather_hex="#adadff" 60 + elif [ "$weather_icon_code" == "02n" ]; then 61 + weather_icon=" " 62 + weather_quote="It's a cloudy night \nHow about some hot chocolate and a warm bed?" 63 + weather_hex="#adadff" 64 + elif [ "$weather_icon_code" == "03d" ]; then 65 + weather_icon=" " 66 + weather_quote="It's cloudy, sort of gloomy \nYou'd better get a book to read..." 67 + weather_hex="#adadff" 68 + elif [ "$weather_icon_code" == "03n" ]; then 69 + weather_icon=" " 70 + weather_quote="It's a cloudy night \nHow about some hot chocolate and a warm bed?" 71 + weather_hex="#adadff" 72 + elif [ "$weather_icon_code" == "04d" ]; then 73 + weather_icon=" " 74 + weather_quote="It's cloudy, sort of gloomy \nYou'd better get a book to read..." 75 + weather_hex="#adadff" 76 + elif [ "$weather_icon_code" == "04n" ]; then 77 + weather_icon=" " 78 + weather_quote="It's a cloudy night \nHow about some hot chocolate and a warm bed?" 79 + weather_hex="#adadff" 80 + elif [ "$weather_icon_code" == "09d" ]; then 81 + weather_icon=" " 82 + weather_quote="It's rainy, it's a great day! \nGet some ramen and watch as the rain falls..." 83 + weather_hex="#6b95ff" 84 + elif [ "$weather_icon_code" == "09n" ]; then 85 + weather_icon=" " 86 + weather_quote=" It's gonna rain tonight it seems \nMake sure your clothes aren't still outside..." 87 + weather_hex="#6b95ff" 88 + elif [ "$weather_icon_code" == "10d" ]; then 89 + weather_icon=" " 90 + weather_quote="It's rainy, it's a great day! \nGet some ramen and watch as the rain falls..." 91 + weather_hex="#6b95ff" 92 + elif [ "$weather_icon_code" == "10n" ]; then 93 + weather_icon=" " 94 + weather_quote=" It's gonna rain tonight it seems \nMake sure your clothes aren't still outside..." 95 + weather_hex="#6b95ff" 96 + elif [ "$weather_icon_code" == "11d" ]; then 97 + weather_icon="" 98 + weather_quote="There's storm for forecast today \nMake sure you don't get blown away..." 99 + weather_hex="#ffeb57" 100 + elif [ "$weather_icon_code" == "11n" ]; then 101 + weather_icon="" 102 + weather_quote="There's gonna be storms tonight \nMake sure you're warm in bed and the windows are shut..." 103 + weather_hex="#ffeb57" 104 + elif [ "$weather_icon_code" == "13d" ]; then 105 + weather_icon=" " 106 + weather_quote="It's gonna snow today \nYou'd better wear thick clothes and make a snowman as well!" 107 + weather_hex="#e3e6fc" 108 + elif [ "$weather_icon_code" == "13n" ]; then 109 + weather_icon=" " 110 + weather_quote="It's gonna snow tonight \nMake sure you get up early tomorrow to see the sights..." 111 + weather_hex="#e3e6fc" 112 + elif [ "$weather_icon_code" == "40d" ]; then 113 + weather_icon=" " 114 + weather_quote="Forecast says it's misty \nMake sure you don't get lost on your way..." 115 + weather_hex="#84afdb" 116 + elif [ "$weather_icon_code" == "40n" ]; then 117 + weather_icon=" " 118 + weather_quote="Forecast says it's a misty night \nDon't go anywhere tonight or you might get lost..." 119 + weather_hex="#84afdb" 120 + else 121 + weather_icon=" " 122 + weather_quote="Sort of odd, I don't know what to forecast \nMake sure you have a good time!" 123 + weather_hex="#adadff" 124 + fi 125 + echo "$weather_icon" > ${cache_weather_icon} 126 + echo "$weather_description" > ${cache_weather_stat} 127 + echo "$weather_temp""°F" > ${cache_weather_degree} 128 + echo -e "$weather_quote" > ${cache_weather_quote} 129 + echo "$weather_hex" > ${cache_weather_hex} 130 + else 131 + echo "Weather Unavailable" > ${cache_weather_stat} 132 + echo " " > ${cache_weather_icon} 133 + echo -e "Ah well, no weather huh? \nEven if there's no weather, it's gonna be a great day!" > ${cache_weather_quote} 134 + echo "-" > ${cache_weather_degree} 135 + echo "#adadff" > ${tcache_weather_hex} 136 + fi 137 + } 138 + 139 + ## Execute 140 + if [[ "$1" == "--getdata" ]]; then 141 + get_weather_data 142 + elif [[ "$1" == "--icon" ]]; then 143 + cat ${cache_weather_icon} 144 + elif [[ "$1" == "--temp" ]]; then 145 + cat ${cache_weather_degree} 146 + elif [[ "$1" == "--hex" ]]; then 147 + cat ${cache_weather_hex} 148 + elif [[ "$1" == "--stat" ]]; then 149 + cat ${cache_weather_stat} 150 + elif [[ "$1" == "--quote" ]]; then 151 + cat ${cache_weather_quote} | head -n1 152 + elif [[ "$1" == "--quote2" ]]; then 153 + cat ${cache_weather_quote} | tail -n1 154 + fi