This commit is contained in:
sankalp committed 2023-04-24 15:41:27 +05:45
1 parent 0b17aa140b
commit dde4ef218a
136 files changed
+9796

No files matched your search

+153
View File
@@ -0,0 +1,153 @@
.actions {
background-color: $bg;
color: $fg;
font-family: Product Sans;
padding: 10px 18px;
}
.controlsbox {
background-color: $contrastbg;
border-radius: 7px;
padding: 7px 12px;
.vol-slider {
.vol-label {
font-size: 20px;
font-family: Iosevka Nerd Font;
margin-right: 15px;
color: $blue;
}
& scale trough {
all: unset;
border-radius: 10px;
background-color: $black;
border: none;
min-height: 8px;
min-width: 250px;
margin-left: 3px;
& highlight {
all: unset;
background: linear-gradient(to right, $blue, $cyan);
color: #000000;
border-radius: 10px;
}
}
}
.br-slider {
.br-label {
font-size: 20px;
font-family: Iosevka Nerd Font;
margin-right: 15px;
color: $yellow;
}
& scale trough {
all: unset;
border-radius: 10px;
background-color: $black;
border: none;
min-height: 8px;
min-width: 250px;
margin-left: 3px;
& highlight {
all: unset;
background: linear-gradient(to right, $red, $yellow);
color: #000000;
border-radius: 10px;
}
}
}
}
.userinfobox {
.time {
font-size: 42px;
}
.pfp {
background-position: center;
background-size: cover;
background-repeat: no-repeat;
border-radius: 50px;
min-width: 30px;
min-height: 30px;
}
.daybox {
margin-top: 8px;
font-size: 14px;
}
.username {
font-family: Product Sans;
}
.useractions {
.logout {
background-color: $black;
font-family: Iosevka Nerd Font;
font-size: 18px;
padding: 2px 12px 2px 7px;
border-radius: 4px;
transition: all ease .2s;
&:hover { background-color: $dimblack; }
&:active { background-color: $black; }
}
}
}
.sysbuttonsbox {
.block-container {
.block {
background-color: $contrastbg;
padding: 0px 6px;
border-radius: 50px;
transition: all ease .2s;
color: $fg;
&:hover { background-color: $bgSecondary; }
&:active { background-color: $contrastbg; }
&.active {
background-color: $black;
&:hover { background-color: $dimblack; }
&:active { background-color: $black; }
.sepbox .sep {
background-color: $lightblack;
}
}
.iconbox .icon {
font-family: Iosevka Nerd Font;
padding: 7px 17px 7px 8px;
}
.sepbox .sep {
background-color: $black;
margin: 0px 4px;
padding: 0px 1px;
}
.chevronbox {
font-family: Iosevka Nerd Font;
padding: 0px 12px;
}
}
.label {
font-family: Product Sans;
font-size: 14px;
}
}
}
.poweractionsbox {
.info {
font-size: 14px;
}
.buttons {
font-family: Iosevka Nerd Font;
font-size: 16px;
button {
padding: 0px 9px 0px 5px;
background-color: $bgSecondary;
border-radius: 50px;
transition: all ease .2s;
&:hover { background-color: $black; }
&:active { background-color: $bg; }
&.do-poweroff { color: $red; }
&.do-reboot { color: $magenta; }
&.do-logout { color: $yellow; }
}
}
}
+211
View File
@@ -0,0 +1,211 @@
(defwidget sysblock [icon onclick active label]
(box :class "block-container"
:orientation "v"
:space-evenly false
:spacing 5
(button :class "block ${active ? 'active' : ''}" :onclick "${onclick}"
(box :orientation "h"
:space-evenly false
(box :class "iconbox"
:halign "start"
:space-evenly true
:orientation "h"
(label :text "${icon}" :class "icon")
)
(box :class "sepbox"
:halign "center"
:space-evenly true
:orientation "h"
(box :class "sep")
)
(box :class "chevronbox"
:halign "end"
:space-evenly true
:orientation "h"
(label :text "")
)
)
)
(label :halign "center" :text "${label}" :class "label")
)
)
(defwidget sysbuttons []
(box :class "sysbuttonsbox"
:orientation "v"
:space-evenly false
:spacing 20
(box :class "firstrow"
:orientation "h"
:space-evenly true
(box :halign "start"
:orientation "h"
:space-evenly true
(sysblock :icon "${network_icon}"
:onclick "~/.config/polybar/widgets/scripts/network.sh toggle"
:active "${network_status == 'Connected' ? true : false}"
:label "${network_ssid}")
)
(box :halign "center"
:orientation "h"
:space-evenly true
(sysblock :icon "${bluetooth_state == 'on' ? '' : ''}"
:onclick "~/.config/polybar/widgets/scripts/bluetooth toggle"
:active "${bluetooth_state == 'on' ? true : false}"
:label "Bluetooth")
)
(box :halign "end"
:orientation "h"
:space-evenly true
(sysblock :icon "${network_radio == 'on' ? '' : ''}"
:onclick "~/.config/polybar/widgets/scripts/network.sh toggle-radio"
:active "${network_radio == 'on' ? false : true}"
:label "Airplane")
)
)
(box :class "lastrow"
:orientation "h"
:space-evenly true
(box :halign "start"
:orientation "h"
:space-evenly true
(sysblock :icon "${redshift_state == 'on' ? '' : ''}"
:onclick "~/.config/polybar/widgets/scripts/redshift toggle"
:active "${redshift_state == 'on' ? true : false}"
:label "Night Light")
)
(box :halign "center"
:orientation "h"
:space-evenly true
(sysblock :icon "${volume_icon}"
:onclick "~/.config/polybar/widgets/scripts/volume.sh toggle-muted"
:active "${is_muted == 'yes' ? false : true}"
:label "Volume")
)
(box :halign "end"
:orientation "h"
:space-evenly true
(sysblock :icon "${mic_status == 'yes' ? '' : ''}"
:onclick "~/.config/polybar/widgets/scripts/mic toggle"
:active "${mic_status == 'yes' ? true : false}"
:label "MicroPhone")
)
)
)
)
(defwidget controls []
(box :class "controlsbox"
:orientation "v"
:space-evenly false
:spacing 10
(box :orientation "h"
:space-evenly "false"
:class "vol-slider"
(box :class "vol-label"
volume_icon
)
(scale :value volume_value
:onchange "~/.config/polybar/widgets/scripts/volume.sh set {}"
:min 0
:max 101)
)
(box :orientation "h"
:space-evenly "false"
:class "br-slider"
(box :class "br-label"
br_icon
)
(scale :value br
:onchange "~/.config/polybar/widgets/scripts/brightness.sh set {}"
:min 0
:max 101)
)
)
)
(defwidget user []
(box :class "userinfobox"
:orientation "h"
:space-evenly false
(box :class "info"
:space-evenly false
:orientation "h"
:halign "start"
:valign "center"
:spacing 10
(label :text "${lithour}:${litmin}" :class "time")
(box :class "daybox"
:orientation "v"
:space-evenly false
(label :text "${shortday}" :halign "start")
(label :text "${weekday}" :halign "start")
)
)
(box :orientation "h"
:space-evenly false
:halign "end"
:valign "center"
:hexpand true
(box :class "pfp"
:style "background-image: url('${pfp}');")
)
)
)
(defwidget poweractions []
(box :class "poweractionsbox"
:orientation "h"
:space-evenly true
(box :class "buttons-container"
:space-evenly true
:halign "end"
:orientation "h"
(box :class "buttons"
:orientation "h"
:space-evenly true
:spacing 10
(button :class "do-poweroff"
:onclick "systemctl poweroff"
:tooltip "Shutdown Now"
:halign "start"
"襤"
)
(button :class "do-reboot"
:onclick "systemctl reboot"
:tooltip "Reboot"
:halign "center"
"勒"
)
(button :class "do-logout"
:onclick "bsp quit"
:tooltip "Logout"
:halign "end"
""
)
)
)
)
)
(defwidget actions []
(box :class "actions"
:orientation "v"
:space-evenly false
:spacing 20
(user)
(sysbuttons)
(controls)
(poweractions)
)
)
(defwindow actions
:geometry (geometry :x "-11px"
:y "48px"
:width "320px" ; this isn't respected btw, so it's auto-adjusted by eww lol.
:height "10px" ; automatically generated by eww.
:anchor "top right")
:type "dock"
:wm-ignore true
(actions))