feat: eww full bar
|
@ -12,7 +12,7 @@ declare -A PACKAGES=(
|
|||
["BASE_PACKAGES"]="inetutils v4l2loopback bind-utils zellij bat dust aria2 fzf neofetch bat zsh fish-shell brightnessctl bluez cronie git stow eza dbus seatd elogind polkit NetworkManager gnome-keyring polkit-gnome pipewire wireplumber inotify-tools xorg gnome-keyring polkit-gnome mtpfs ffmpeg libnotify"
|
||||
["DEVEL_PACKAGES"]="glib glib-devel gtk+3-devel gtk-layer-shell-devel base-devel startup-notification-devel cairo-devel xcb-util-devel xcb-util-cursor-devel xcb-util-xrm-devel xcb-util-wm-devel"
|
||||
["AMD_DRIVERS"]="opencv Vulkan-Headers Vulkan-Tools Vulkan-ValidationLayers-32bit mesa-vulkan-radeon mesa-vulkan-radeon-32bit vulkan-loader vulkan-loader-32bit libspa-vulkan libspa-vulkan-32bit amdvlk mesa-dri mesa-vaapi"
|
||||
["HYPRLAND_PACKAGES"]="Waybar avizo dunst swaybg mpvpaper grim jq slurp cliphist wl-clipboard swayidle pavucontrol nemo eog pavucontrol evince xorg-server-xwayland xdg-desktop-portal-gtk xdg-desktop-portal-wlr xdg-utils qt5-x11extras qt5-wayland qt6-wayland"
|
||||
["HYPRLAND_PACKAGES"]="eww nerd-fonts-symbols-ttf Waybar avizo dunst swaybg mpvpaper grim jq slurp cliphist wl-clipboard swayidle pavucontrol nemo eog pavucontrol evince xorg-server-xwayland xdg-desktop-portal-gtk xdg-desktop-portal-wlr xdg-utils qt5-x11extras qt5-wayland qt6-wayland"
|
||||
["SYSTEM_APPS"]="alacritty octoxbps blueman wifish wpa_gui glow"
|
||||
)
|
||||
|
||||
|
|
Before Width: | Height: | Size: 16 KiB |
|
@ -1,134 +1,160 @@
|
|||
* {
|
||||
all: unset;
|
||||
|
||||
.barwidget {
|
||||
background-color: $base;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.bar-widget {
|
||||
border-radius: 2px;
|
||||
background-color: $background;
|
||||
.icon {
|
||||
font-size: 20px;
|
||||
min-width: 1em;
|
||||
min-height: 1em;
|
||||
font-family: "Symbols Nerd Font";
|
||||
padding: 2px 0px;
|
||||
}
|
||||
|
||||
.apps {
|
||||
background-color: $bg-alt;
|
||||
}
|
||||
|
||||
.uptime {
|
||||
font-size: 0.9rem;
|
||||
color: $fg-alt;
|
||||
padding: 0.2rem;
|
||||
}
|
||||
|
||||
.launcher {
|
||||
color: $green;
|
||||
font-size: 1.4rem;
|
||||
padding: 0 0.3rem 0 0;
|
||||
}
|
||||
|
||||
.spotify {
|
||||
color: $green;
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
.central-icon {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
.bell {
|
||||
font-size: 1.5rem;
|
||||
color: $yellow;
|
||||
}
|
||||
|
||||
.firefox {
|
||||
color: $cyan;
|
||||
font-size: 1.5rem;
|
||||
padding: 0 0.2rem 0 0;
|
||||
.revealtouch {
|
||||
font-size: 20px;
|
||||
margin: 5px 0px;
|
||||
color: $surface2;
|
||||
}
|
||||
|
||||
.workspaces {
|
||||
font-size: 1.2rem;
|
||||
border-radius: 1rem;
|
||||
margin: 0 0 0 -0.3rem;
|
||||
|
||||
.icon {
|
||||
&.current {
|
||||
color: $green;
|
||||
}
|
||||
}
|
||||
|
||||
button {
|
||||
&.empty {
|
||||
color: $black;
|
||||
}
|
||||
|
||||
&.occupied {
|
||||
color: lighten($color: $fg-alt2, $amount: 10%);
|
||||
}
|
||||
|
||||
&.current {
|
||||
color: $green;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
&.empty {
|
||||
color: lighten($color: $black, $amount: 5%);
|
||||
}
|
||||
&.occupied {
|
||||
color: lighten($color: $black, $amount: 20%);
|
||||
}
|
||||
&.current {
|
||||
color: darken($color: $green, $amount: 10%);
|
||||
}
|
||||
}
|
||||
}
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.volume {
|
||||
font-size: 1.3rem;
|
||||
.volume-bar scale trough {
|
||||
all: unset;
|
||||
background-color: $black;
|
||||
border-radius: 1rem;
|
||||
min-width: 0.4rem;
|
||||
min-height: 3rem;
|
||||
margin-bottom: 0.5rem;
|
||||
box-shadow: 0 0 2px 1px rgba(black, 0.3);
|
||||
}
|
||||
|
||||
.volume-bar scale trough highlight {
|
||||
all: unset;
|
||||
background: $green;
|
||||
border-radius: 1rem;
|
||||
}
|
||||
.workspaces label {
|
||||
font-size: 18;
|
||||
padding-right: 5px;
|
||||
padding: 2px 5px 2px 0px;
|
||||
}
|
||||
|
||||
.clock {
|
||||
font-family: "SF Pro";
|
||||
font-size: 1.4rem;
|
||||
|
||||
&.hour {
|
||||
font-weight: bold;
|
||||
color: $fg;
|
||||
}
|
||||
|
||||
&.minute {
|
||||
color: $fg-alt;
|
||||
}
|
||||
|
||||
&.separator {
|
||||
color: $fg-alt;
|
||||
}
|
||||
.timebox {
|
||||
font-size: 0.5rem;
|
||||
|
||||
&.magenta {
|
||||
color: $magenta;
|
||||
}
|
||||
|
||||
&.green {
|
||||
color: $green;
|
||||
}
|
||||
|
||||
&.yellow {
|
||||
color: $yellow;
|
||||
}
|
||||
}
|
||||
.widget {
|
||||
padding: 5px 5px;
|
||||
border-radius: 5px;
|
||||
background-color: $surface0;
|
||||
margin: 5px 2px;
|
||||
color: $white0;
|
||||
// border-style: solid;
|
||||
// border-color: $white0;
|
||||
// border-width: 2px;
|
||||
}
|
||||
|
||||
.clock label {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.bat_scale trough{
|
||||
min-height: 50px;
|
||||
min-width: 18px;
|
||||
border-radius: 5px;
|
||||
slider {
|
||||
all: unset;
|
||||
}
|
||||
}
|
||||
|
||||
.bat_scale trough highlight{
|
||||
border-radius: 5px;
|
||||
background-color: $accent;
|
||||
}
|
||||
|
||||
.charging trough highlight {
|
||||
background-color: $green;
|
||||
}
|
||||
|
||||
.dying trough highlight {
|
||||
background-color: $red;
|
||||
}
|
||||
|
||||
// .mpd label {
|
||||
// color: $sky;
|
||||
// }
|
||||
//
|
||||
// .playerctl label {
|
||||
// color: $sapphire;
|
||||
// }
|
||||
|
||||
.mpd_controls label {
|
||||
font-family: "Symbols Nerd Font";
|
||||
min-width: 1em;
|
||||
min-height: 1em;
|
||||
font-size: 30px;
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
.seektime {
|
||||
trough {
|
||||
min-height: 10px;
|
||||
min-width: 180px;
|
||||
|
||||
slider {
|
||||
background-color: $white2;
|
||||
border-radius: 25px;
|
||||
min-height: 20px;
|
||||
min-width: 20px;
|
||||
margin: -10px;
|
||||
}
|
||||
|
||||
highlight {
|
||||
background-color: $red;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.sidempdctl {
|
||||
margin: 5px;
|
||||
label {
|
||||
font-size: 30px;
|
||||
padding-right: 5px;
|
||||
min-height: 1em;
|
||||
min-width: 1em;
|
||||
}
|
||||
}
|
||||
|
||||
.mpdvolumeseek {
|
||||
@extend .seektime;
|
||||
trough {
|
||||
min-height: 100px;
|
||||
min-width: 10px;
|
||||
highlight {
|
||||
background-color: $white0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.touch label {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.mtitle {
|
||||
color: $white0;
|
||||
font-size: 20px;
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
.launchicon {
|
||||
@extend .icon;
|
||||
color: $accent;
|
||||
}
|
||||
|
||||
.picon {
|
||||
@extend .icon;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.lightning {
|
||||
color: $surface0
|
||||
}
|
||||
|
||||
.workspacething, .workspacethingactive {
|
||||
transition: 500ms;
|
||||
border-radius: 5;
|
||||
margin: 6px;
|
||||
}
|
||||
|
||||
.workspacething {
|
||||
background-color: $surface2;
|
||||
}
|
||||
|
||||
.workspacethingactive {
|
||||
background-color: $accent;
|
||||
}
|
||||
|
|
|
@ -1,257 +1,330 @@
|
|||
(defwidget bar []
|
||||
(box :class "bar-widget" :orientation "v" :space-evenly true :halign "center"
|
||||
(start)
|
||||
(center)
|
||||
(apps)
|
||||
(and)
|
||||
|
||||
(defwindow bar
|
||||
:geometry (geometry
|
||||
:x "0%"
|
||||
:y "0%"
|
||||
:width "42"
|
||||
:height "1080"
|
||||
:anchor "center left")
|
||||
;; :reserve (struts :distance "60" :side "left")
|
||||
;; :stacking "bg"
|
||||
:exclusive true
|
||||
:monitor 0
|
||||
;; :windowtype "dock"
|
||||
:wm-ignore false
|
||||
(barstruct))
|
||||
|
||||
(defwidget barstruct []
|
||||
(box
|
||||
:orientation "h"
|
||||
:space-evenly false
|
||||
(revealer
|
||||
:transition "slideright"
|
||||
:reveal revealcontrolpanel
|
||||
(control_widget))
|
||||
(centerbox
|
||||
:class "barwidget"
|
||||
:orientation "v"
|
||||
:height "1080"
|
||||
;; :space-evenly true
|
||||
(top)
|
||||
(middle)
|
||||
(bottom)
|
||||
)))
|
||||
|
||||
(defwidget top []
|
||||
(box
|
||||
:orientation "v"
|
||||
:space-evenly false
|
||||
:valign "start"
|
||||
:class "top_modules"
|
||||
:height "450"
|
||||
:vexpand false
|
||||
(home)
|
||||
(workspaces)
|
||||
(hiddenctl)
|
||||
))
|
||||
|
||||
(defwidget middle []
|
||||
(box
|
||||
:orientation "v"
|
||||
:space-evenly false
|
||||
:valign "center"
|
||||
:vexpand false
|
||||
:class "center_modules"
|
||||
:height "180"
|
||||
(playerctl)
|
||||
))
|
||||
|
||||
(defwidget start []
|
||||
(box :class "start" :orientation "v" :halign "center" :valign "start"
|
||||
(launcher)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defwidget center []
|
||||
(box :class "center" :halign "center" :orientation "v"
|
||||
(workspaces)
|
||||
)
|
||||
)
|
||||
|
||||
(defwidget apps []
|
||||
(box :class "apps" :spacing 10 :space-evenly false :valign "end" :halign "center" :orientation "v"
|
||||
(volume)
|
||||
(spotify)
|
||||
(firefox)
|
||||
)
|
||||
)
|
||||
|
||||
(defwidget and []
|
||||
(box :class "" :valign "end":orientation "v" :space-evenly false :spacing 15
|
||||
(bell)
|
||||
(central-icon)
|
||||
(defwidget bottom []
|
||||
(box
|
||||
:orientation "v"
|
||||
:space-evenly false
|
||||
:valign "end"
|
||||
:class "bottom_modules"
|
||||
:vexpand false
|
||||
:hexpand false
|
||||
(stray)
|
||||
(sliders)
|
||||
(battery)
|
||||
(clock)
|
||||
)
|
||||
)
|
||||
|
||||
(defwidget launcher []
|
||||
(eventbox
|
||||
:cursor "pointer"
|
||||
:halign "center"
|
||||
(button
|
||||
:class "launcher"
|
||||
:valign "start"
|
||||
:onclick "actions --launcher"
|
||||
:width 25
|
||||
"" )))
|
||||
|
||||
(defwidget spotify []
|
||||
(eventbox
|
||||
:cursor "pointer"
|
||||
:halign "center"
|
||||
(button
|
||||
:class "launcher"
|
||||
:valign "start"
|
||||
:onclick "env LD_PRELOAD=/usr/lib/spotify-adblock.so spotify --uri=%U &"
|
||||
:width 25
|
||||
"" )))
|
||||
|
||||
(defwidget firefox []
|
||||
(eventbox
|
||||
:cursor "pointer"
|
||||
:halign "center"
|
||||
(button
|
||||
:class "firefox"
|
||||
:valign "start"
|
||||
:onclick "firefox &"
|
||||
:width 25
|
||||
"" )))
|
||||
|
||||
(defwidget central-icon []
|
||||
(eventbox
|
||||
:cursor "pointer"
|
||||
:halign "center"
|
||||
(button
|
||||
:class "central-icon"
|
||||
:valign "start"
|
||||
:onclick "eww open --toggle central"
|
||||
:width 20
|
||||
"" )))
|
||||
|
||||
|
||||
(defwidget bell []
|
||||
(eventbox
|
||||
:cursor "pointer"
|
||||
:halign "center"
|
||||
(button
|
||||
:class "bell"
|
||||
:valign "start"
|
||||
:onclick "eww open --toggle notifications"
|
||||
:width 20
|
||||
"" )))
|
||||
))
|
||||
|
||||
(defwidget workspaces []
|
||||
(box
|
||||
:class "workspaces"
|
||||
:halign "start"
|
||||
:spacing 10
|
||||
:orientation "v"
|
||||
:space-evenly false
|
||||
(for workspace in hyprland
|
||||
(eventbox
|
||||
:cursor "pointer"
|
||||
:onscroll "echo {} | sed -e 's/up/-1/g' -e 's/down/+1/g' | xargs hyprctl dispatch workspace"
|
||||
:halign "center"
|
||||
(button
|
||||
:class "${workspace.current ? "current" : ""} ${workspace.windows > 0 ? "occupied" : "empty"}"
|
||||
:onclick "hyprctl dispatch workspace ${workspace.id}"
|
||||
(button
|
||||
:width 25
|
||||
:class "icon ${workspace.current ? "current" : ""} ${workspace.windows > 0 ? "occupied" : "empty"}"
|
||||
{workspace.current ? "" : ""}
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defwidget music []
|
||||
(eventbox
|
||||
:onhover "eww update music-rev=true"
|
||||
:onhoverlost "eww update music-rev=false"
|
||||
:cursor "pointer"
|
||||
(box
|
||||
:space-evenly false
|
||||
:spacing 10
|
||||
:class "workspaces widget"
|
||||
:orientation "v"
|
||||
(eventbox
|
||||
:cursor "pointer"
|
||||
:space-evenly false
|
||||
(for workspace in {workspacejson}
|
||||
(button
|
||||
:class "musicbar-art"
|
||||
:orientation "v"
|
||||
:onclick "eww open-many --toggle player-closer player"
|
||||
:style "background-image: url('${music-art}');"
|
||||
)
|
||||
)
|
||||
(label
|
||||
:class "musicbar-title"
|
||||
:orientation "v"
|
||||
:limit-height 10
|
||||
:limit-width 35
|
||||
:text music-title
|
||||
)
|
||||
(revealer
|
||||
:transition "slideright"
|
||||
:reveal music-rev
|
||||
:duration "500ms"
|
||||
(box
|
||||
:spacing 10
|
||||
:orientation "h"
|
||||
(eventbox
|
||||
:cursor "pointer"
|
||||
(button
|
||||
:class "musicbar-previous-icon"
|
||||
:onclick "./scripts/mediacontrol --previous"
|
||||
""
|
||||
)
|
||||
)
|
||||
(eventbox
|
||||
:cursor "pointer"
|
||||
(button
|
||||
:class "musicbar-toggle-icon"
|
||||
:onclick "./scripts/mediacontrol --toggle"
|
||||
music-toggle
|
||||
)
|
||||
)
|
||||
(eventbox
|
||||
:cursor "pointer"
|
||||
(button
|
||||
:class "musicbar-next-icon"
|
||||
:onclick "./scripts/mediacontrol --next"
|
||||
""
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:onclick "swaymsg -t command workspace number ${workspace.name}"
|
||||
(box
|
||||
:hexpand false
|
||||
:width 10
|
||||
:height { workspace.focused ? 60 : !workspace.empty ? 40 : 30}
|
||||
:class { workspace.focused ? "workspacethingactive" : "workspacething"}))))))
|
||||
|
||||
(defwidget volume []
|
||||
(eventbox
|
||||
:onhover "eww update volume_rev=true"
|
||||
:onhoverlost "eww update volume_rev=false"
|
||||
(defwidget home []
|
||||
(box
|
||||
:class "volume"
|
||||
:space-evenly false
|
||||
:orientation "v"
|
||||
(revealer
|
||||
:class "volume-bar"
|
||||
:transition "slideup"
|
||||
:reveal volume_rev
|
||||
:class "widget"
|
||||
:hexpand false
|
||||
:vexpand false
|
||||
(eventbox
|
||||
:cursor "pointer"
|
||||
:halign "center"
|
||||
(scale
|
||||
:orientation "v"
|
||||
:tooltip {volume == "muted" ? "Muted" : "${volume}%"}
|
||||
:value {volume == "muted" ? "0" : volume}
|
||||
:min 0
|
||||
:max 101
|
||||
:onchange "pamixer -u && pamixer --set-volume {}"
|
||||
:flipped true
|
||||
)
|
||||
)
|
||||
)
|
||||
(eventbox
|
||||
:cursor "pointer"
|
||||
:onscroll "echo {} | sed -e 's/up/--up/g' -e 's/down/--down/g' | xargs volume"
|
||||
(button
|
||||
:class "volume icon"
|
||||
:style {volume == 0 || volume == "muted" ? "color: #dd6777;" : "color: #cacaca;"}
|
||||
:tooltip {volume == "muted" ? "Muted" : "${volume}%" }
|
||||
:onclick "volume --toggle"
|
||||
{volume == 0 || volume == "muted" ? "" :
|
||||
volume < 30 ? "" :
|
||||
volume < 75 ? "" : ""}
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
;; :onclick "~/.config/eww/meowidgets/scripts/launch"
|
||||
;; :onclick "~/.config/eww/meowayland/scripts/launch"
|
||||
;; :onclick "./scripts/pop control"
|
||||
:onclick "${EWW_CMD} update revealcontrolpanel=${ !revealcontrolpanel }"
|
||||
:onrightclick "${EWW_CMD} open wallpaperselect --toggle"
|
||||
:cursor "pointer"
|
||||
(label :text "" :halign "center" :class "launchicon" :style "padding: 2px 0px;"))))
|
||||
|
||||
|
||||
|
||||
(defwidget clock []
|
||||
(box
|
||||
:class "clock"
|
||||
:orientation "v"
|
||||
(defwidget stray []
|
||||
(box
|
||||
:class "widget"
|
||||
:space-evenly false
|
||||
:spacing 4
|
||||
:halign "center"
|
||||
:valign "end"
|
||||
(label
|
||||
:class "clock hour"
|
||||
:text hour
|
||||
)
|
||||
(box :class "timebox" :spacing 4
|
||||
)
|
||||
(label
|
||||
:class "clock minute"
|
||||
:text minute)
|
||||
)
|
||||
)
|
||||
:orientation "v"
|
||||
(eventbox
|
||||
:onclick "${EWW_CMD} update revealsystray=${!revealsystray}"
|
||||
(label :angle {!revealsystray ? 90 : 270} :class "revealtouch" :tooltip "reveal systray" :text ""))
|
||||
(revealer
|
||||
:reveal revealsystray
|
||||
:transition "slideup"
|
||||
(systray
|
||||
:icon_size 20
|
||||
:pack-direction "down"
|
||||
:hexpand true
|
||||
:vexpand true))
|
||||
))
|
||||
|
||||
(defwidget clock []
|
||||
(eventbox
|
||||
:cursor "pointer"
|
||||
:onclick "${EWW_CMD} open calendar --toggle"
|
||||
(box
|
||||
:orientation "v"
|
||||
:space-evenly false
|
||||
:class "widget clock"
|
||||
|
||||
(defwindow bar
|
||||
(label :text thour)
|
||||
(label :text tmin)
|
||||
(label :text tpm))))
|
||||
|
||||
(defwidget battery []
|
||||
(box
|
||||
:orientation "v"
|
||||
:space-evenly false
|
||||
:class "widget"
|
||||
(overlay
|
||||
(scale
|
||||
:class "${EWW_BATTERY.BAT0.status == 'Charging' ? 'charging': bat0 < 16 ? 'dying': 'normal'} bat_scale"
|
||||
:value "${bat0}"
|
||||
:orientation "v"
|
||||
:max 100
|
||||
:min 0
|
||||
:active false
|
||||
:flipped true)
|
||||
(label
|
||||
:class "lightning"
|
||||
:visible {EWW_BATTERY.BAT0.status == "Charging"}
|
||||
:text ""))
|
||||
(label :text "${EWW_BATTERY.BAT0.capacity}%" :limit-width 3 :show-truncated false)))
|
||||
|
||||
(defwidget hiddenctl []
|
||||
(eventbox
|
||||
:cursor "pointer"
|
||||
:onclick {reveal3 ? "${EWW_CMD} update reveal3=false" : "${EWW_CMD} update reveal3=true"}
|
||||
(box
|
||||
:orientation "v"
|
||||
:class "widget"
|
||||
:space-evenly false
|
||||
(revealer
|
||||
:reveal reveal3
|
||||
:transition "slideup"
|
||||
:duration "500ms"
|
||||
(box
|
||||
:class "touch"
|
||||
:orientation "v"
|
||||
:spacing 5
|
||||
(button :onclick "swaymsg kill"
|
||||
(label :class "icon" :text ""))
|
||||
(button :onclick "wofi --show=drun -i -I"
|
||||
(label :class "icon" :text ""))
|
||||
(button :onclick "./scripts/touchkey.sh"
|
||||
(label :class "icon" :text ""))))
|
||||
(label :angle {reveal3 ? 90 : 270} :class "revealtouch" :tooltip "touch control" :text "")
|
||||
(revealer
|
||||
:reveal {!reveal3}
|
||||
:transition "slidedown"
|
||||
;; (tasklist)))))
|
||||
))))
|
||||
|
||||
(defwidget playerctl []
|
||||
(eventbox
|
||||
:cursor "pointer"
|
||||
(box
|
||||
:class "playerctl widget"
|
||||
:orientation "v"
|
||||
:space-evenly true
|
||||
:spacing 5
|
||||
(eventbox
|
||||
:onclick "${EWW_CMD} open music --toggle"
|
||||
(image :path { pcover == "" ? "./image/emptympd.png" : pcover } :image-width 20 :image-height 20))
|
||||
(button :onclick "playerctl previous"
|
||||
(label :class "picon" :text ""))
|
||||
(button :onclick "playerctl play-pause"
|
||||
(label :class "picon" :text { pstatus == "Playing" ? "" : "" }))
|
||||
(button :onclick "playerctl next"
|
||||
(label :class "picon" :text ""))
|
||||
)))
|
||||
|
||||
(defwidget sliders []
|
||||
(box
|
||||
:class "widget"
|
||||
:orientation "v"
|
||||
:space-evenly false
|
||||
:spacing 5
|
||||
:valign "end"
|
||||
(button :onclick "alacritty -e nmtui" :tooltip wifi_essid
|
||||
(label :class "icon" :style "font-size: 18px;" :text wifi_icon))
|
||||
(reveal_on_hover
|
||||
:revealval reveal1
|
||||
:revealvalstr "reveal1"
|
||||
(box
|
||||
:orientation "v"
|
||||
:space-evenly false
|
||||
:class "sound"
|
||||
(label :class "icon" :text {volumemute == 'false' ? "" : ""})
|
||||
;; {volumemute == 'no' ? volume : " Muted"})
|
||||
)
|
||||
(scale
|
||||
:class "volslide"
|
||||
:value volume
|
||||
:onchange "pamixer --set-volume {}"
|
||||
:orientation "v"
|
||||
:tooltip "${volume}%"
|
||||
:max 100
|
||||
:min 0
|
||||
:flipped true))
|
||||
(reveal_on_hover
|
||||
:revealval reveal2
|
||||
:revealvalstr "reveal2"
|
||||
(box
|
||||
:orientation "v"
|
||||
:space-evenly false
|
||||
:class "bright"
|
||||
(label :class "icon" :text ""))
|
||||
(scale
|
||||
:class "brislide"
|
||||
:value brightness
|
||||
:onchange "brightnessctl set {}%"
|
||||
:orientation "v"
|
||||
:tooltip "${brightness}%"
|
||||
:max 100
|
||||
:min 0
|
||||
:flipped true))
|
||||
))
|
||||
|
||||
(defwidget reveal_on_hover [revealval revealvalstr ?class ?transition]
|
||||
(box
|
||||
:class "reveal_on_hover ${class}"
|
||||
:orientation "v"
|
||||
:space-evenly false
|
||||
:valign "end"
|
||||
(eventbox
|
||||
:onhover "${EWW_CMD} update ${revealvalstr}=true"
|
||||
:onhoverlost "${EWW_CMD} update ${revealvalstr}=false"
|
||||
(box
|
||||
:space-evenly false
|
||||
:orientation "v"
|
||||
(children :nth 0)
|
||||
(revealer
|
||||
:reveal revealval
|
||||
:transition {transition ?:"slidedown"}
|
||||
:duration "500ms"
|
||||
(children :nth 1))))))
|
||||
|
||||
;; other windows
|
||||
(defwindow calendar
|
||||
:geometry (geometry :x "0"
|
||||
:y "0"
|
||||
:width "100"
|
||||
:height "35"
|
||||
:anchor "bottom left")
|
||||
:stacking "overlay"
|
||||
:monitor 0
|
||||
(box
|
||||
:class "popup"
|
||||
(box
|
||||
:class "unbarwidget"
|
||||
(calendar :day calendar_day :year calendar_year :class "cal"))))
|
||||
|
||||
(defwindow music
|
||||
:geometry (geometry :x "0"
|
||||
:y "0"
|
||||
:width "440"
|
||||
:height "200"
|
||||
:anchor "center left")
|
||||
:stacking "overlay"
|
||||
:monitor 0
|
||||
:exclusive true
|
||||
:geometry (geometry :x "0%"
|
||||
:y "0%"
|
||||
:height "99%"
|
||||
:width "4%"
|
||||
:anchor "center left")
|
||||
:reserve (struts :side "top" :distance "4%")
|
||||
(bar))
|
||||
(box
|
||||
:class "popup"
|
||||
(box
|
||||
:orientation "h"
|
||||
:class "unbarwidget"
|
||||
:space-evenly false
|
||||
:spacing 20
|
||||
(image :style "margin: 5px;" :image-height 190 :image-width 190 :path { pcover == "" ? "./image/emptympd.png" : pcover })
|
||||
(box
|
||||
:orientation "v"
|
||||
:space-evenly false
|
||||
:width 210
|
||||
:height 200
|
||||
(scroll
|
||||
:hscroll true
|
||||
:vscroll false
|
||||
(label :class "mtitle" :text psong))
|
||||
(scroll
|
||||
:hscroll true
|
||||
:vscroll false
|
||||
(label :class "mauthor" :text partist))
|
||||
(box
|
||||
:orientation "h"
|
||||
:class "mpd_controls"
|
||||
:style "margin-top: 10px;"
|
||||
(button :onclick "playerctl previous"
|
||||
(label :text ""))
|
||||
(button :style "padding-right: 3px;" :onclick "playerctl play-pause"
|
||||
(label :text { pstatus == "Playing" ? "" : ""} ))
|
||||
(button :onclick "playerctl next" (label :text "")))
|
||||
(scale
|
||||
:class "seektime"
|
||||
:value { ptime.position }
|
||||
:orientation "h"
|
||||
;; :onchange "playerctl position {}"
|
||||
:min 0
|
||||
:max { ptime.duration }
|
||||
:tooltip { ptime.readable }))
|
||||
)))
|
||||
|
|
214
hypr-configs/hyprland/eww/bottom_bar/bar.scss
Normal file
|
@ -0,0 +1,214 @@
|
|||
|
||||
.barwidget {
|
||||
background-color: $base;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.widget {
|
||||
padding: 5px;
|
||||
margin: 5px;
|
||||
border-radius: 5px;
|
||||
background-color: $surface0;
|
||||
color: $white0;
|
||||
}
|
||||
|
||||
.icon {
|
||||
font-size: 20px;
|
||||
min-width: 1em;
|
||||
min-height: 1em;
|
||||
font-family: "Symbols Nerd Font";
|
||||
padding: 0px 2px;
|
||||
}
|
||||
|
||||
.largetouchicon {
|
||||
font-size: 30px;
|
||||
min-width: 1em;
|
||||
min-height: 1em;
|
||||
font-family: "Symbols Nerd Font";
|
||||
margin: 5px;
|
||||
padding: 5px;
|
||||
color: $white0;
|
||||
background-color: $surface1;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.workspaces {
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.workspacething, .workspacethingactive {
|
||||
transition: 500ms ease;
|
||||
border-radius: 5;
|
||||
margin: 6px;
|
||||
}
|
||||
|
||||
.workspacething {
|
||||
background-color: $surface2;
|
||||
}
|
||||
|
||||
.workspacethingactive {
|
||||
background-color: $accent;
|
||||
}
|
||||
|
||||
.clock label {
|
||||
font-size: 20px;
|
||||
// font-weight: bold;
|
||||
}
|
||||
|
||||
.bat_scale {
|
||||
trough {
|
||||
min-height: 20px;
|
||||
min-width: 50px;
|
||||
border-radius: 5px;
|
||||
slider {
|
||||
all: unset;
|
||||
}
|
||||
highlight {
|
||||
border-radius: 5px;
|
||||
background-color: $accent;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.charging trough highlight {
|
||||
background-color: $green;
|
||||
}
|
||||
|
||||
.dying trough highlight {
|
||||
background-color: $red;
|
||||
}
|
||||
|
||||
.lightning {
|
||||
color: $surface0
|
||||
}
|
||||
|
||||
// for the music popup
|
||||
.mpd_controls label {
|
||||
font-family: "Symbols Nerd Font";
|
||||
min-width: 1em;
|
||||
min-height: 1em;
|
||||
font-size: 30px;
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
.seektime {
|
||||
trough {
|
||||
min-height: 10px;
|
||||
min-width: 180px;
|
||||
|
||||
slider {
|
||||
background-color: $white2;
|
||||
border-radius: 25px;
|
||||
min-height: 20px;
|
||||
min-width: 20px;
|
||||
margin: -10px;
|
||||
}
|
||||
|
||||
highlight {
|
||||
background-color: $accent;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.sidempdctl {
|
||||
margin: 5px;
|
||||
label {
|
||||
font-size: 30px;
|
||||
padding-right: 5px;
|
||||
min-height: 1em;
|
||||
min-width: 1em;
|
||||
}
|
||||
}
|
||||
|
||||
.mpdvolumeseek {
|
||||
@extend .seektime;
|
||||
trough {
|
||||
min-height: 100px;
|
||||
min-width: 10px;
|
||||
highlight {
|
||||
background-color: $white0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.mtitle {
|
||||
color: $white0;
|
||||
font-size: 20px;
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
.sliderctl {
|
||||
@extend .seektime;
|
||||
trough {
|
||||
min-height: 10px;
|
||||
min-width: 350px;
|
||||
}
|
||||
}
|
||||
|
||||
.cavascale {
|
||||
all: unset;
|
||||
trough {
|
||||
all: unset;
|
||||
border-radius: 24px;
|
||||
min-height: 18px;
|
||||
min-width: 5px;
|
||||
margin: 1px;
|
||||
highlight {
|
||||
background-color: $white0;
|
||||
border-radius: 24px;
|
||||
}
|
||||
slider {
|
||||
all:unset;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.icontitle {
|
||||
min-width: 1em;
|
||||
min-height: 1em;
|
||||
margin: 5px;
|
||||
padding: 5px;
|
||||
label {
|
||||
color: $white0;
|
||||
margin: 0px 5px;
|
||||
}
|
||||
background-color: $surface1;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.icontitlesel {
|
||||
min-width: 1em;
|
||||
min-height: 1em;
|
||||
margin: 5px;
|
||||
padding: 5px;
|
||||
label {
|
||||
color: $surface0;
|
||||
margin: 0px 5px;
|
||||
// font-weight: bold;
|
||||
}
|
||||
background-color: $accent;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.launchicon {
|
||||
@extend .icon;
|
||||
color: $accent;
|
||||
}
|
||||
|
||||
.overbat {
|
||||
all: unset;
|
||||
trough {
|
||||
min-height: 8px;
|
||||
min-width: 10px;
|
||||
border-radius: 0px;
|
||||
padding: 0px 2px 1px 0px;
|
||||
background-color: unset;
|
||||
slider {
|
||||
all: unset;
|
||||
}
|
||||
highlight {
|
||||
// background-color: $white0;
|
||||
border-radius: 0px;
|
||||
}
|
||||
}
|
||||
}
|
215
hypr-configs/hyprland/eww/bottom_bar/bar.yuck
Normal file
|
@ -0,0 +1,215 @@
|
|||
(defwindow bar
|
||||
:geometry (geometry
|
||||
:x "0%"
|
||||
:y "0%"
|
||||
:width "100%"
|
||||
:height 40
|
||||
:anchor "bottom center")
|
||||
:exclusive true
|
||||
:monitor 0
|
||||
:wm-ignore false
|
||||
(barstruct))
|
||||
|
||||
(defwidget barstruct []
|
||||
;; (box
|
||||
;; :orientation "v"
|
||||
;; :space-evenly false
|
||||
(centerbox
|
||||
:class "barwidget"
|
||||
:orientation "h"
|
||||
:height 60
|
||||
(left)
|
||||
(middle)
|
||||
(right))
|
||||
;; (revealer
|
||||
;; :transition "slideup"
|
||||
;; :reveal revealcontrolpanel
|
||||
;; (box
|
||||
;; :class "barwidget"
|
||||
;; :orientation "h"
|
||||
;; :space-evenly false
|
||||
;; (box
|
||||
;; :orientation "v"
|
||||
;; :space-evenly false
|
||||
;; (user)
|
||||
;; (chooser))
|
||||
;; (overview)
|
||||
;; (timer)
|
||||
;; (touchpad)
|
||||
;; )))
|
||||
)
|
||||
|
||||
(defwidget left []
|
||||
(box
|
||||
:orientation "h"
|
||||
:space-evenly false
|
||||
:halign "start"
|
||||
:valign "fill"
|
||||
(home)
|
||||
(workspaces)
|
||||
;; (cavapipe)
|
||||
))
|
||||
|
||||
(defwidget middle []
|
||||
(box
|
||||
:orientation "h"
|
||||
:space-evenly false
|
||||
:halign "center"
|
||||
:valign "fill"
|
||||
(tasklist :iconsize 42)
|
||||
))
|
||||
|
||||
(defwidget right []
|
||||
(box
|
||||
:orientation "h"
|
||||
:space-evenly false
|
||||
:halign "end"
|
||||
:valign "fill"
|
||||
(button :class "widget" :onclick "./scripts/touchkey.sh && ${EWW_CMD} update revealcontrolpanel=false"
|
||||
(label :class "icon" :style "padding-left: 3px;" :text ""))
|
||||
(playerctl)
|
||||
(sysicons)
|
||||
;; (battery)
|
||||
(clock)
|
||||
))
|
||||
|
||||
(defwidget workspaces []
|
||||
(eventbox
|
||||
:cursor "pointer"
|
||||
(box
|
||||
:class "workspaces widget"
|
||||
:orientation "h"
|
||||
:space-evenly false
|
||||
(for i in {"[0, 1, 2, 3, 4]"}
|
||||
(button
|
||||
:onclick "swaymsg -t command workspace number ${workspacejson[i].name}"
|
||||
(box
|
||||
:hexpand false
|
||||
:height 10
|
||||
;; :width { workspace.focused ? 100 : !workspace.empty ? 80 : 50}
|
||||
:class { workspacejson[i].focused ? "workspacethingactive" : "workspacething"}
|
||||
:orientation "h"
|
||||
:space-evenly false
|
||||
(box
|
||||
:width 50)
|
||||
(revealer
|
||||
:reveal { !workspacejson[i].empty || workspacejson[i].focused }
|
||||
:transition "slideright"
|
||||
(box
|
||||
:width 30))
|
||||
(revealer
|
||||
:reveal { workspacejson[i].focused }
|
||||
:transition "slideright"
|
||||
(box
|
||||
:width 20))
|
||||
))))))
|
||||
|
||||
(defwidget clock []
|
||||
(box
|
||||
:orientation "h"
|
||||
:class "clock widget"
|
||||
:space-evenly false
|
||||
(button
|
||||
:onclick "${EWW_CMD} update reveal1=${!reveal1} reveal2=false reveal3=false"
|
||||
(label :text "${thour}:${tmin} ${tpm}"))))
|
||||
|
||||
(defwidget sysicons []
|
||||
(box
|
||||
:class "widget"
|
||||
:valign "fill"
|
||||
(button
|
||||
:onclick "${EWW_CMD} update reveal1=false reveal2=${!reveal2} reveal3=false"
|
||||
:class "icon"
|
||||
(box
|
||||
:orientation "h"
|
||||
:space-evenly false
|
||||
:spacing 5
|
||||
(label :tooltip wifi_essid :class "icon" :text wifi_icon)
|
||||
(label :tooltip "${volume}%" :class "icon" :text {volumemute == 'false' ? "" : ""})
|
||||
(overlay
|
||||
:tooltip "${bat0}%"
|
||||
(label :class "icon" :text "")
|
||||
(scale
|
||||
:hexpand false
|
||||
:orientation "h"
|
||||
:active false
|
||||
:min 0
|
||||
:max 100
|
||||
:value bat0
|
||||
:class "overbat ${EWW_BATTERY.BAT0.status == 'Charging' ? 'charging' : ''}"))
|
||||
))))
|
||||
|
||||
(defwidget battery []
|
||||
(box
|
||||
:orientation "h"
|
||||
:space-evenly false
|
||||
:class "widget"
|
||||
(overlay
|
||||
(scale
|
||||
:class "${EWW_BATTERY.BAT0.status == 'Charging' ? 'charging': bat0 < 16 ? 'dying': 'normal'} bat_scale"
|
||||
:value "${bat0}"
|
||||
:orientation "h"
|
||||
:max 100
|
||||
:min 0
|
||||
:flipped true
|
||||
:active false)
|
||||
(label
|
||||
:class "lightning"
|
||||
:visible {EWW_BATTERY.BAT0.status == "Charging"}
|
||||
:text ""))
|
||||
(label :text "${bat0}%")))
|
||||
|
||||
(defwidget playerctl []
|
||||
(overlay
|
||||
(box
|
||||
:halign "fill"
|
||||
:width 150
|
||||
:class { pcover != "" ? "mpdcover" : "widget"}
|
||||
:style "background-image: url('${pcover}')")
|
||||
(box
|
||||
;; :class "widget"
|
||||
:orientation "h"
|
||||
:space-evenly false
|
||||
:spacing 5
|
||||
:halign "center"
|
||||
:valign "center"
|
||||
(eventbox
|
||||
:onclick "${EWW_CMD} update reveal1=false reveal2=false reveal3=${!reveal3}"
|
||||
(image :path { pcover == "" ? "./image/emptympd.png" : pcover } :image-width 30 :image-height 30 :style "padding: 0px 5px;"))
|
||||
(button :onclick "playerctl previous"
|
||||
(label :class "icon" :text ""))
|
||||
(button :onclick "playerctl play-pause"
|
||||
(label :class "icon" :text { pstatus == "Playing" ? "" : "" }))
|
||||
(button :onclick "playerctl next"
|
||||
(label :class "icon" :text ""))
|
||||
)))
|
||||
|
||||
(defwidget home []
|
||||
(box
|
||||
:class "widget"
|
||||
:hexpand false
|
||||
:vexpand false
|
||||
(eventbox
|
||||
;; :onclick "~/.config/eww/meowidgets/scripts/launch"
|
||||
;; :onclick "~/.config/eww/meowayland/scripts/launch"
|
||||
;; :onclick "./scripts/pop control"
|
||||
:onclick "${EWW_CMD} update revealcontrolpanel=${ !revealcontrolpanel }"
|
||||
:onrightclick "${EWW_CMD} open wallpaperselect --toggle"
|
||||
:cursor "pointer"
|
||||
(label :text "" :halign "center" :class "launchicon" :style "padding: 0px 4px;"))))
|
||||
|
||||
;; (defwidget cavapipe []
|
||||
;; (box
|
||||
;; :class "widget"
|
||||
;; :orientation "h"
|
||||
;; :space-evenly true
|
||||
;; (for bar in {cavajson}
|
||||
;; (scale
|
||||
;; :class "cavascale"
|
||||
;; :orientation "v"
|
||||
;; :value bar
|
||||
;; :min 0
|
||||
;; :max 100
|
||||
;; :flipped true))))
|
||||
|
||||
(include "./bottom_bar/sidectl.yuck")
|
272
hypr-configs/hyprland/eww/bottom_bar/sidectl.yuck
Normal file
|
@ -0,0 +1,272 @@
|
|||
|
||||
(defwindow sidectl1
|
||||
:geometry (geometry
|
||||
:x "0%"
|
||||
:y "0%"
|
||||
:width 320
|
||||
:height 0
|
||||
:anchor "bottom right")
|
||||
:monitor 0
|
||||
:stacking "overlay"
|
||||
(revealer
|
||||
:reveal reveal1
|
||||
:transition "slideup"
|
||||
(box
|
||||
:orientation "v"
|
||||
:valign "end"
|
||||
:space-evenly false
|
||||
(box
|
||||
:height 700
|
||||
:class "popup"
|
||||
(notiweathertoggle))
|
||||
|
||||
(box
|
||||
:class "popup"
|
||||
(box
|
||||
:class "unbarwidget"
|
||||
(calendar
|
||||
:day calendar_day
|
||||
:year calendar_year
|
||||
:class "")))
|
||||
)))
|
||||
|
||||
(defwindow sidectl2
|
||||
:geometry (geometry
|
||||
:x 50
|
||||
:y 0
|
||||
:width 200
|
||||
:height 0
|
||||
:anchor "bottom right")
|
||||
:monitor 0
|
||||
:stacking "overlay"
|
||||
(revealer
|
||||
:reveal reveal2
|
||||
:transition "slideup"
|
||||
(box
|
||||
:class "popup"
|
||||
:orientation "v"
|
||||
:space-evenly false
|
||||
(box
|
||||
:orientation "v"
|
||||
:class "widget"
|
||||
:spacing 20
|
||||
:space-evenly false
|
||||
|
||||
(box
|
||||
:orientation "v"
|
||||
:height 150
|
||||
(box
|
||||
:orientation "h"
|
||||
(togglebuttons
|
||||
:icon wifi_icon
|
||||
:class {wifi_radio == "enabled" ? "icontitlesel" : "icontitle"}
|
||||
:text {wifi_radio == "enabled" ? wifi_essid == "" ? "Disconnected" : "Connected" : "Off"}
|
||||
:subtext { wifi_essid == "" ? "..." : wifi_essid}
|
||||
:toggle {wifi_radio == "enabled" ? "nmcli radio wifi off" : "nmcli radio wifi on"})
|
||||
|
||||
(togglebuttons
|
||||
:icon ""
|
||||
:class {caffeine ? "icontitlesel" : "icontitle"}
|
||||
:text "Caffeine"
|
||||
:subtext {caffeine ? "on" : "off"}
|
||||
:toggle {caffeine ? "swaymsg [app_id='.*'] inhibit_idle none && ${EWW_CMD} update caffeine=false" : "swaymsg [app_id='.*'] inhibit_idle open && ${EWW_CMD} update caffeine=true"}))
|
||||
|
||||
(box
|
||||
:orientation "h"
|
||||
(togglebuttons
|
||||
:icon ""
|
||||
:class "icontitle"
|
||||
:text "Theme"
|
||||
:subtext theme
|
||||
:toggle "${EWW_CMD} update reveal2=false && ~/.config/eww/themeswitch/scripts/pop")
|
||||
|
||||
(togglebuttons
|
||||
:icon ""
|
||||
:class {notifications.dnd ? "icontitlesel" : "icontitle"}
|
||||
:text "Do not disturb"
|
||||
:subtext {notifications.dnd ? "on" : "off"}
|
||||
:toggle "./scripts/notifManage --toggle")
|
||||
))
|
||||
|
||||
(sliderctl :icon {volumemute == 'false' ? "" : ""} :value volume :onchange "pamixer --set-volume {}")
|
||||
(sliderctl :icon "" :value brightness :onchange "brightnessctl set {}%")
|
||||
|
||||
(box
|
||||
:orientation "h"
|
||||
:space-evenly false
|
||||
:halign "end"
|
||||
(overlay
|
||||
(scale
|
||||
:class "${EWW_BATTERY.BAT0.status == 'Charging' ? 'charging': bat0 < 16 ? 'dying': 'normal'} bat_scale"
|
||||
:value "${bat0}"
|
||||
:orientation "h"
|
||||
:max 100
|
||||
:min 0
|
||||
:active false)
|
||||
(label
|
||||
:class "lightning"
|
||||
:visible {EWW_BATTERY.BAT0.status == "Charging"}
|
||||
:text ""))
|
||||
(label :text "${bat0}%"))
|
||||
))))
|
||||
|
||||
(defwidget togglebuttons [icon class text ?subtext toggle]
|
||||
(button
|
||||
:onclick toggle
|
||||
(box
|
||||
:orientation "h"
|
||||
:class class
|
||||
:space-evenly false
|
||||
(label
|
||||
:class "icon"
|
||||
:halign "start"
|
||||
:text icon)
|
||||
(box
|
||||
:orientation "v"
|
||||
:hexpand true
|
||||
:halign "center"
|
||||
(label
|
||||
:text text)
|
||||
(label
|
||||
:limit-width 17
|
||||
:text subtext)))))
|
||||
|
||||
(defwidget sliderctl [icon value onchange]
|
||||
(box
|
||||
:orientation "h"
|
||||
:space-evenly false
|
||||
:hexpand true
|
||||
:spacing 5
|
||||
|
||||
(label
|
||||
:class "icon"
|
||||
:text icon
|
||||
:style "margin-left: 5px;")
|
||||
|
||||
(scale
|
||||
:class "sliderctl"
|
||||
:orientation "h"
|
||||
:value value
|
||||
:tooltip "${value}%"
|
||||
:min 0
|
||||
:max 100
|
||||
:onchange onchange)))
|
||||
|
||||
(defwindow sidectl3
|
||||
:geometry (geometry
|
||||
:x 150
|
||||
:y 0
|
||||
:width 440
|
||||
:height 0
|
||||
:anchor "bottom right")
|
||||
:monitor 0
|
||||
:stacking "overlay"
|
||||
(revealer
|
||||
:reveal reveal3
|
||||
:transition "slideup"
|
||||
(box
|
||||
:class "popup"
|
||||
(box
|
||||
:orientation "h"
|
||||
:class "unbarwidget"
|
||||
:space-evenly false
|
||||
:spacing 20
|
||||
(image :style "margin: 5px;" :image-height 190 :image-width 190 :path { pcover == "" ? "./image/emptympd.png" : pcover })
|
||||
(box
|
||||
:orientation "v"
|
||||
:space-evenly false
|
||||
:width 210
|
||||
:height 200
|
||||
(scroll
|
||||
:hscroll true
|
||||
:vscroll false
|
||||
(label :class "mtitle" :text psong))
|
||||
(scroll
|
||||
:hscroll true
|
||||
:vscroll false
|
||||
(label :class "mauthor" :text partist))
|
||||
(box
|
||||
:orientation "h"
|
||||
:class "mpd_controls"
|
||||
:style "margin-top: 10px;"
|
||||
(button :onclick "playerctl previous" (label :text ""))
|
||||
(button :onclick "playerctl play-pause"
|
||||
(label :text { pstatus == "Playing" ? "" : ""} ))
|
||||
(button :onclick "playerctl next"
|
||||
(label :text "")))
|
||||
(scale
|
||||
:class "seektime"
|
||||
:value { ptime.position }
|
||||
:orientation "h"
|
||||
:onchange "playerctl position {}"
|
||||
:min 0
|
||||
:max { ptime.duration }
|
||||
:tooltip { ptime.readable }))
|
||||
;; (box
|
||||
;; :orientation "v"
|
||||
;; :space-evenly false
|
||||
;; :valign "center"
|
||||
;; :halign "end"
|
||||
;; :class "sidempdctl"
|
||||
;; (scale
|
||||
;; :value { pside.volume }
|
||||
;; :orientation "v"
|
||||
;; :class "mpdvolumeseek"
|
||||
;; :onchange "playerctl volume {}"
|
||||
;; :min 0
|
||||
;; :max 100
|
||||
;; :flipped true
|
||||
;; :tooltip "volume: ${pside.volume}")
|
||||
;; (button
|
||||
;; :onclick "playerctl shuffle toggle"
|
||||
;; (label
|
||||
;; :text {pside.shuffle == "true" ? "" : ""}))
|
||||
;; (button
|
||||
;; :onclick "playerctl loop ${pside.loop == 'Track' ? 'Playlist' : 'Track'}"
|
||||
;; (label
|
||||
;; :text {pside.loop == "Track" ? "" : ""}))
|
||||
;; )
|
||||
))))
|
||||
|
||||
(defwindow sidectl4
|
||||
:geometry (geometry
|
||||
:x 0
|
||||
:y 0
|
||||
:width 340
|
||||
:height 0
|
||||
:anchor "bottom left"
|
||||
)
|
||||
:stacking "overlay"
|
||||
:monitor 0
|
||||
(revealer
|
||||
:reveal revealcontrolpanel
|
||||
:transition "slideup"
|
||||
(box
|
||||
:class "popup"
|
||||
(control_widget :short true))))
|
||||
|
||||
(defwidget touchpad []
|
||||
(box
|
||||
:class "unbarwidget"
|
||||
:orientation "h"
|
||||
:width 180
|
||||
(box
|
||||
:orientation "h"
|
||||
(box
|
||||
:orientation "v"
|
||||
(button :onclick "swaymsg floating toggle"
|
||||
(label :class "largetouchicon" :text ""))
|
||||
(button :onclick "foot -D ~"
|
||||
(label :class "largetouchicon" :text ""))
|
||||
(button :onclick "./scripts/pop scrop"
|
||||
(label :class "largetouchicon" :text ""))
|
||||
)
|
||||
(box
|
||||
:orientation "v"
|
||||
(button :onclick "swaymsg kill"
|
||||
(label :class "largetouchicon" :text ""))
|
||||
(button :onclick "${EWW_CMD} update revealcontrolpanel=false && (cd && wofi --show=drun -i -I)"
|
||||
(label :class "largetouchicon" :text ""))
|
||||
(button :onclick "./scripts/touchkey.sh && ${EWW_CMD} update revealcontrolpanel=false"
|
||||
(label :class "largetouchicon" :text ""))
|
||||
))))
|
|
@ -1,242 +0,0 @@
|
|||
.central-widget {
|
||||
@include window;
|
||||
background-color: $bg;
|
||||
color: $fg;
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
.profile {
|
||||
background-color: $bg-alt;
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
min-height: 4rem;
|
||||
min-width: 4rem;
|
||||
border-radius: .4rem;
|
||||
}
|
||||
|
||||
.name {
|
||||
color: $fg;
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
.wm {
|
||||
color: $fg-alt;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.lock, .exit {
|
||||
font-size: 1.2rem;
|
||||
background-color: $bg-alt;
|
||||
padding: .7rem 1.2rem .7rem 1rem;
|
||||
border-radius: .4rem;
|
||||
}
|
||||
|
||||
.system-info {
|
||||
background-color: $bg-alt;
|
||||
}
|
||||
|
||||
|
||||
.music {
|
||||
background-color: $bg-alt;
|
||||
|
||||
border-radius: .4rem;
|
||||
padding: .8rem;
|
||||
}
|
||||
|
||||
.player {
|
||||
font-family: "JetBrainsMono Nerd Font";
|
||||
min-height: 1rem;
|
||||
border-radius: .1rem;
|
||||
margin: .1rem .8rem;
|
||||
}
|
||||
|
||||
.player-art {
|
||||
background-color: $bg-alt;
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
min-height: 4rem;
|
||||
min-width: 4rem;
|
||||
border-radius: .4rem;
|
||||
}
|
||||
|
||||
.player-info {
|
||||
border-radius: .4rem;
|
||||
|
||||
}
|
||||
|
||||
.player-title {
|
||||
font-size: 1rem;
|
||||
padding: .1rem 0;
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
.player-artist {
|
||||
color: $white;
|
||||
padding: .2rem 0;
|
||||
}
|
||||
|
||||
.player-bar scale trough highlight {
|
||||
background-image: linear-gradient(to right, $bg-alt, $green);
|
||||
border-radius: .4rem;
|
||||
}
|
||||
|
||||
.player-bar scale trough {
|
||||
all: unset;
|
||||
background-color: rgba($fg-alt, 0.3);
|
||||
box-shadow: 0px 0px 2px 1px rgba(0, 0, 0, 0.5);
|
||||
border-radius: .4rem;
|
||||
min-height: .25rem;
|
||||
min-width: 18rem;
|
||||
margin: .2rem 0;
|
||||
}
|
||||
|
||||
.player-position {
|
||||
font-size: .9rem;
|
||||
font-weight: 500;
|
||||
color: $fg-alt;
|
||||
}
|
||||
|
||||
.player-controls {
|
||||
font-size: 5rem;
|
||||
background-color: $bg-alt;
|
||||
}
|
||||
|
||||
.player-toggle {
|
||||
font-size: 1.4rem;
|
||||
color: $fg;
|
||||
}
|
||||
|
||||
.player-previous,
|
||||
.player-next {
|
||||
font-size: 1.2rem;
|
||||
color: $fg-alt;
|
||||
}
|
||||
|
||||
.player-toggle:hover,
|
||||
.player-previous:hover,
|
||||
.player-next:hover {
|
||||
color: $green;
|
||||
}
|
||||
|
||||
.player-shuffle,
|
||||
.player-loop {
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.spotify-icon {
|
||||
font-family: "Font Awesome 6 Brands";
|
||||
font-size: 1.25rem;
|
||||
color: $green;
|
||||
border-radius: .4rem;
|
||||
}
|
||||
.box-control {
|
||||
background-color: $bg-alt;
|
||||
padding: 1.5rem;
|
||||
margin: 1rem 1.5rem;
|
||||
border-radius: .4rem;
|
||||
|
||||
}
|
||||
|
||||
.time {
|
||||
font-size: 4rem;
|
||||
}
|
||||
|
||||
.date {
|
||||
font-size: 1.3rem;
|
||||
}
|
||||
|
||||
.timeboxes {
|
||||
font-size: .6rem;
|
||||
margin: -.1rem 0;
|
||||
|
||||
.magenta {
|
||||
color: $magenta;
|
||||
}
|
||||
|
||||
.green {
|
||||
color: $green;
|
||||
}
|
||||
|
||||
.yellow {
|
||||
color: $yellow;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.calendar {
|
||||
font-size: 1.1rem;
|
||||
font-weight: 500;
|
||||
background-color: $bg-alt;
|
||||
border-radius: .4rem;
|
||||
padding: .4rem;
|
||||
|
||||
calendar {
|
||||
|
||||
&.button {
|
||||
color: $fg-alt;
|
||||
|
||||
&:hover {
|
||||
background-color: $black;
|
||||
border-radius: 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
&:selected {
|
||||
color: $green;
|
||||
text-shadow: 0 0 3px lighten($color: $bg-alt, $amount: 10%);
|
||||
border-radius: 1rem;
|
||||
}
|
||||
|
||||
&.header {
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
}
|
||||
|
||||
&.highlight {
|
||||
color: $green;
|
||||
}
|
||||
|
||||
&:indeterminate {
|
||||
color: $gray;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.system {
|
||||
.progress {
|
||||
background-color: $bg-alt;
|
||||
padding: .4rem;
|
||||
border-radius: .4rem;
|
||||
|
||||
circular-progress {
|
||||
background-color: $black;
|
||||
|
||||
&.ram {
|
||||
color: $magenta;
|
||||
}
|
||||
|
||||
&.cpu {
|
||||
color: $yellow;
|
||||
label { margin-left: 1px;}
|
||||
}
|
||||
|
||||
&.temp {
|
||||
color: $red;
|
||||
label { margin: .2rem .5rem .2rem .2rem;}
|
||||
|
||||
}
|
||||
|
||||
&.disk {
|
||||
color: $green;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.icon {
|
||||
font-size: 1.2rem;
|
||||
padding: 1.2rem;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,273 +0,0 @@
|
|||
(defwidget central []
|
||||
(box :class "central-widget" :space-evenly false :orientation "v" :spacing 10
|
||||
(box-profile)
|
||||
(box-calendar)
|
||||
(box-system)
|
||||
(music)
|
||||
)
|
||||
)
|
||||
|
||||
(defwidget box-profile []
|
||||
(box
|
||||
:class "box-profile"
|
||||
:space-evenly false
|
||||
:hexpand false
|
||||
:spacing 10
|
||||
(box :class "profile"
|
||||
:style "background-image: url('${perfil}')"
|
||||
:valign "start"
|
||||
)
|
||||
(box
|
||||
:class "box-about"
|
||||
:halign "start"
|
||||
:spacing 5
|
||||
(box
|
||||
:orientation "v" :space-evenly false :halign "start"
|
||||
(label :class "name" :halign "start" :text {name})
|
||||
(label :class "wm" :halign "start" :text {wm})
|
||||
(box
|
||||
(label :class "uptime" :text `Uptime: ${uptime}`)
|
||||
)))
|
||||
(box
|
||||
:halign "end"
|
||||
:valign "center"
|
||||
:hexpand true
|
||||
:spacing 10
|
||||
(eventbox
|
||||
:cursor "pointer"
|
||||
(button
|
||||
:class "lock"
|
||||
:onclick "poweroff&"
|
||||
""
|
||||
))
|
||||
(eventbox
|
||||
:cursor "pointer"
|
||||
(button
|
||||
:class "exit"
|
||||
:onclick "eww open --toggle powercontrol && eww close central"
|
||||
"⏻"
|
||||
)))))
|
||||
|
||||
(defwidget box-system []
|
||||
(box
|
||||
:class "system"
|
||||
:spacing 10
|
||||
(ram)
|
||||
(cpu)
|
||||
(temp)
|
||||
(disk)
|
||||
)
|
||||
)
|
||||
|
||||
(defwidget system_progress [data icon css tip]
|
||||
(box
|
||||
:class "progress"
|
||||
(circular-progress
|
||||
:class css
|
||||
:value data
|
||||
:thickness 7
|
||||
:tooltip tip
|
||||
(overlay
|
||||
:valign "center"
|
||||
(label
|
||||
:class "icon"
|
||||
:text icon
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defwidget cpu []
|
||||
(system_progress
|
||||
:css "cpu"
|
||||
:tip "CPU ${round(EWW_CPU.avg,0)}%"
|
||||
:data {round(EWW_CPU.avg, 0)}
|
||||
:icon ""
|
||||
)
|
||||
)
|
||||
|
||||
(defwidget ram []
|
||||
(system_progress
|
||||
:css "ram"
|
||||
:tip "RAM ${round(EWW_RAM.used_mem / 1048576, 2)}MB"
|
||||
:data {round(EWW_RAM.used_mem_perc, 0)}
|
||||
:icon ""
|
||||
)
|
||||
)
|
||||
|
||||
(defwidget temp []
|
||||
(system_progress
|
||||
:css "temp"
|
||||
:tip "Temperature ${EWW_TEMPS["AMDGPU_EDGE"]}°C"
|
||||
:data {round(EWW_TEMPS.AMDGPU_EDGE, 0)}
|
||||
:icon ""
|
||||
)
|
||||
)
|
||||
|
||||
(defwidget disk []
|
||||
(system_progress
|
||||
:css "disk"
|
||||
:tip "SSD ${round(EWW_DISK["/"].used_perc, 2)}%"
|
||||
:data {round(EWW_DISK["/"].used_perc, 0)}
|
||||
:icon ""
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defwidget music []
|
||||
(box
|
||||
:class "music"
|
||||
:space-evenly false
|
||||
:spacing 15
|
||||
:halign "start"
|
||||
(box
|
||||
:class "player-art"
|
||||
:style "background-image: url('${music-art}')"
|
||||
)
|
||||
(box
|
||||
:class "player-info"
|
||||
:space-evenly false
|
||||
:orientation "v"
|
||||
(label :class "player-title" :halign "start" :valign "center" :text music-title :limit-width 30 )
|
||||
(label :class "player-artist" :halign "start" :valign "center" :text music-artist :limit-width 30 )
|
||||
(box
|
||||
:space-evenly false
|
||||
:orientation "v"
|
||||
:valign "end"
|
||||
(box
|
||||
:class "player-bar"
|
||||
:halign "center"
|
||||
:valign "end"
|
||||
:hexpand true
|
||||
(eventbox
|
||||
:cursor "pointer"
|
||||
(scale
|
||||
:onchange "playerctl -p spotify position {}"
|
||||
:min 0
|
||||
:max music-lengths
|
||||
:value music-positions
|
||||
)
|
||||
)
|
||||
)
|
||||
(box
|
||||
:class "player-position"
|
||||
:space-evenly true
|
||||
:valign "start"
|
||||
|
||||
(label
|
||||
:class "player-time"
|
||||
:halign "start"
|
||||
:text "${music-position} / ${music-length}"
|
||||
)
|
||||
(box
|
||||
:class "player-controls"
|
||||
:valign "center"
|
||||
:space-evenly false
|
||||
:halign "end"
|
||||
:spacing 10
|
||||
(eventbox
|
||||
:cursor "pointer"
|
||||
(button
|
||||
:class "player-previous"
|
||||
:onclick "scripts/mediacontrol --previous"
|
||||
""
|
||||
)
|
||||
)
|
||||
(eventbox
|
||||
:cursor "pointer"
|
||||
(button
|
||||
:class "player-toggle"
|
||||
:onclick "scripts/mediacontrol --toggle"
|
||||
music-toggle
|
||||
)
|
||||
)
|
||||
(eventbox
|
||||
:cursor "pointer"
|
||||
(button
|
||||
:class "player-next"
|
||||
:onclick "scripts/mediacontrol --next"
|
||||
""
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defwidget box-calendar []
|
||||
(box
|
||||
:class "calendar-main-box"
|
||||
:space-evenly false
|
||||
:orientation "v"
|
||||
:spacing 20
|
||||
(box
|
||||
:class "date"
|
||||
:space-evenly false
|
||||
:orientation "v"
|
||||
(box
|
||||
:space-evenly false
|
||||
:halign "center"
|
||||
:spacing 10
|
||||
(label
|
||||
:class "time"
|
||||
:text hour)
|
||||
(box
|
||||
:class "timeboxes"
|
||||
:space-evenly false
|
||||
:valign "center"
|
||||
:orientation "v"
|
||||
:spacing 5
|
||||
(box
|
||||
:class "timebox-1"
|
||||
""
|
||||
)
|
||||
(box
|
||||
:class "timebox green"
|
||||
""
|
||||
)
|
||||
)
|
||||
(label
|
||||
:class "time"
|
||||
:text minute
|
||||
)
|
||||
)
|
||||
(box
|
||||
:halign "center"
|
||||
:valign "start"
|
||||
(label
|
||||
:class "today"
|
||||
:text date
|
||||
)
|
||||
)
|
||||
)
|
||||
(box
|
||||
:class "cal"
|
||||
:orientation "v"
|
||||
(box
|
||||
:class "cal-inner-box"
|
||||
(calendar
|
||||
:class "calendar"
|
||||
:day calendar-day
|
||||
:month calendar-month
|
||||
:year calendar-year
|
||||
:show-day-names true
|
||||
:show-heading true
|
||||
:show-details true
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defwindow central
|
||||
:monitor 0
|
||||
:geometry (geometry :x "-1%"
|
||||
:y "0%"
|
||||
:height "85%"
|
||||
:anchor "center left")
|
||||
:reserve (struts :side "top" :distance "4%")
|
||||
(central))
|
1
hypr-configs/hyprland/eww/colors.scss
Normal file
|
@ -0,0 +1 @@
|
|||
@import "./themes/oxocarbon.scss"
|
167
hypr-configs/hyprland/eww/control_panel/control_panel.scss
Normal file
|
@ -0,0 +1,167 @@
|
|||
|
||||
.controlpanelwindow {
|
||||
background-color: $base;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.userinfo label {
|
||||
font-size: 18px;
|
||||
color: $white0;
|
||||
}
|
||||
|
||||
.titlesel {
|
||||
font-size: 20px;
|
||||
// font-weight: bold;
|
||||
margin: 5px;
|
||||
padding: 5px;
|
||||
color: $base;
|
||||
background-color: $accent;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 20px;
|
||||
margin: 5px;
|
||||
padding: 5px;
|
||||
color: $white0;
|
||||
background-color: $surface1;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.tricontrol label {
|
||||
@extend .title;
|
||||
font-size: 22px;
|
||||
font-family: "Symbols Nerd font";
|
||||
padding: 5px;
|
||||
}
|
||||
.timer {
|
||||
font-size: 40px;
|
||||
}
|
||||
|
||||
.timer_butt button {
|
||||
background-color: $accent;
|
||||
margin: 5px;
|
||||
padding: 10px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.timer_butt label {
|
||||
color: $base;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.bigslide trough {
|
||||
border-radius: 5px;
|
||||
margin: 5px;
|
||||
min-width: 60px;
|
||||
background-color: $surface1;
|
||||
slider {
|
||||
all: unset;
|
||||
min-width: 20px;
|
||||
min-height: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.bigslide trough highlight{
|
||||
background-color: $surface2;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.slideicon {
|
||||
min-width: 1em;
|
||||
min-height: 1em;
|
||||
font-family: "Symbols Nerd Font";
|
||||
font-size: 30px;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.unbarwidget {
|
||||
padding: 5px;
|
||||
border-radius: 5px;
|
||||
background-color: $surface0;
|
||||
margin: 5px;
|
||||
color: $white0;
|
||||
}
|
||||
|
||||
.quoteauthor {
|
||||
color: $white0;
|
||||
font-size: 14px;
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
.quote {
|
||||
// color: $light_blue;
|
||||
font-size: 18px;
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
.coolmpd label {
|
||||
color: $white0;
|
||||
}
|
||||
|
||||
.mpdcover {
|
||||
transition: 500ms ease;
|
||||
background-color: $surface0;
|
||||
margin: 5px;
|
||||
border-radius: 5px;
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
opacity: 0.3;
|
||||
}
|
||||
|
||||
.circiconcontain {
|
||||
border-radius: 70px;
|
||||
background-color: $surface0;
|
||||
}
|
||||
|
||||
.circiconcontain label {
|
||||
font-family: "Symbols Nerd Font";
|
||||
font-size: 30px;
|
||||
min-width: 1em;
|
||||
min-height: 1em;
|
||||
border-radius: 70px;
|
||||
color: $white0;
|
||||
}
|
||||
|
||||
.circsys {
|
||||
color: $accent;
|
||||
background-color: $surface1;
|
||||
}
|
||||
|
||||
.revcal {
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.wmctrlslide {
|
||||
trough {
|
||||
min-width: 160px;
|
||||
min-height: 10px;
|
||||
slider {
|
||||
background-color: $white2;
|
||||
min-height: 15px;
|
||||
min-width: 15px;
|
||||
margin: -10px;
|
||||
border-radius: 25px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.fadeoutbox {
|
||||
background-image: linear-gradient(180deg, transparent, $surface0);
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
// stupid window overview thing
|
||||
.overviewworkspace {
|
||||
background-color: $surface1;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.overviewwindow {
|
||||
background-color: $base;
|
||||
border-radius: 5px;
|
||||
border-style: solid;
|
||||
border-color: $surface2;
|
||||
border-width: 2px;
|
||||
}
|
503
hypr-configs/hyprland/eww/control_panel/control_panel.yuck
Normal file
|
@ -0,0 +1,503 @@
|
|||
(defwindow control_panel
|
||||
:geometry (geometry
|
||||
:x 10
|
||||
:y 10
|
||||
:width 340
|
||||
:height 1000
|
||||
:anchor "top left"
|
||||
)
|
||||
:stacking "overlay"
|
||||
:monitor 0
|
||||
(control_widget))
|
||||
|
||||
(defwidget control_widget[?short]
|
||||
(box
|
||||
:class "controlpanelwindow"
|
||||
:space-evenly false
|
||||
:orientation "v"
|
||||
:valign "fill"
|
||||
:vexpand true
|
||||
(user)
|
||||
(chooser)
|
||||
;; (weather)
|
||||
(coolmpd :h 150 :permashow true)
|
||||
(box
|
||||
:orientation "h"
|
||||
:space-evenly false
|
||||
:height 160
|
||||
:halign "fill"
|
||||
(timer)
|
||||
(bigslide))
|
||||
(box
|
||||
:space-evenly false
|
||||
:orientation "v"
|
||||
:vexpand true
|
||||
:visible {!short}
|
||||
(tricontrol)
|
||||
(notiweathertoggle))
|
||||
))
|
||||
|
||||
(defwidget tricontrol[]
|
||||
(eventbox
|
||||
:cursor "pointer"
|
||||
(box
|
||||
:class "tricontrol unbarwidget"
|
||||
:orientation "h"
|
||||
:space-evenly true
|
||||
:height 60
|
||||
:halign "fill"
|
||||
(button :onclick "./scripts/pop colourpick" (label :text ""))
|
||||
(button :onclick "./scripts/pop scrop" (label :text ""))
|
||||
(button :onclick "~/.config/eww/themeswitch/scripts/pop" (label :text "")))))
|
||||
|
||||
(defwidget chooser []
|
||||
(box
|
||||
:orientation "v"
|
||||
:halign "fill"
|
||||
:height 60
|
||||
:class "unbarwidget"
|
||||
:space-evenly false
|
||||
(box
|
||||
:orientation "h"
|
||||
|
||||
(button
|
||||
:onclick "${EWW_CMD} update reveal4=${!reveal4} reveal5=false reveal6=false"
|
||||
:onrightclick "foot nvim ~/Documents/fuck.txt"
|
||||
(label :class {reveal4 ? "titlesel" : "title"} :text "Notes"))
|
||||
(button
|
||||
:onclick "${EWW_CMD} update reveal5=${!reveal5} reveal4=false reveal6=false"
|
||||
(label :class {reveal5 ? "titlesel" : "title"} :text "System"))
|
||||
(button
|
||||
:onclick "${EWW_CMD} update reveal6=${!reveal6} reveal5=false reveal4=false"
|
||||
(label :class {reveal6 ? "titlesel" : "title"} :text "Sway")))
|
||||
|
||||
(notes)
|
||||
(sysinfo)
|
||||
(wmctrl)))
|
||||
|
||||
|
||||
(defwidget notes []
|
||||
(revealer
|
||||
:reveal reveal4
|
||||
:transition "slideup"
|
||||
(box
|
||||
:height 140
|
||||
(box
|
||||
:orientation "h"
|
||||
(scroll
|
||||
:hscroll true
|
||||
:vscroll true
|
||||
(label :text notesc))))))
|
||||
|
||||
(defwidget wmctrl []
|
||||
(revealer
|
||||
:reveal reveal6
|
||||
:transition "slideup"
|
||||
(scroll
|
||||
:hscroll false
|
||||
:vscroll true
|
||||
:height 140
|
||||
(box
|
||||
:orientation "v"
|
||||
:valign "fill"
|
||||
:space-evenly false
|
||||
:spacing 5
|
||||
(wmslider
|
||||
:name "gaps outer"
|
||||
:val gapsouter
|
||||
:onchange "swaymsg gaps outer all set {}"
|
||||
:max 300
|
||||
:reset "${EWW_CMD} update gapsouter=0 && swaymsg gaps outer all set 0")
|
||||
(wmslider
|
||||
:name "gaps inner"
|
||||
:val gapsinner
|
||||
:onchange "swaymsg gaps inner all set {}"
|
||||
:max 150
|
||||
:reset "${EWW_CMD} update gapsinner=15 && swaymsg gaps inner all set 15")
|
||||
(wmslider
|
||||
:name "border size"
|
||||
:val borderpixel
|
||||
:onchange "swaymsg default_border pixel {} && swaymsg '[app_id=\".*\"] border pixel {}'"
|
||||
:max 50
|
||||
:reset "${EWW_CMD} update borderpixel=2 && swaymsg default_border pixel 2 && swaymsg '[app_id=\".*\"] border pixel 2'")
|
||||
(box
|
||||
:orientation "h"
|
||||
:space-evenly false
|
||||
:halign "center"
|
||||
:spacing 10
|
||||
(label :text "natural scrolling")
|
||||
(checkbox
|
||||
:onchecked "swaymsg input \"type:touchpad\" natural_scroll enable"
|
||||
:onunchecked "swaymsg input \"type:touchpad\" natural_scroll disable"))
|
||||
(box
|
||||
:orientation "h"
|
||||
:space-evenly false
|
||||
:halign "center"
|
||||
:spacing 10
|
||||
(label :text "disable when typing")
|
||||
(checkbox
|
||||
:onchecked "swaymsg input \"type:touchpad\" dwt enable"
|
||||
:onunchecked "swaymsg input \"type:touchpad\" dwt disable"
|
||||
))
|
||||
|
||||
(box
|
||||
:orientation "h"
|
||||
:space-evenly false
|
||||
:halign "center"
|
||||
:spacing 10
|
||||
(label :text "caffeine")
|
||||
(checkbox
|
||||
:onchecked "swaymsg [app_id='.*'] inhibit_idle open && ${EWW_CMD} update caffeine=true"
|
||||
:onunchecked "swaymsg [app_id='.*'] inhibit_idle none && ${EWW_CMD} update caffeine=false"
|
||||
))
|
||||
))))
|
||||
|
||||
(defwidget sysinfo []
|
||||
(revealer
|
||||
:reveal reveal5
|
||||
:transition "slideup"
|
||||
(box
|
||||
:orientation "h"
|
||||
:height 140
|
||||
(systat :icon "" :val { EWW_CPU.avg })
|
||||
(systat :icon "" :val { EWW_RAM.used_mem_perc })
|
||||
(systat :icon "" :val { EWW_BATTERY.BAT0.capacity })
|
||||
)))
|
||||
|
||||
(defwidget wmslider [name val onchange max reset]
|
||||
(box
|
||||
:orientation "h"
|
||||
:space-evenly false
|
||||
:halign "center"
|
||||
:width 20
|
||||
:vexpand false
|
||||
:valign "center"
|
||||
:spacing 10
|
||||
(label
|
||||
:text name)
|
||||
(scale
|
||||
:min 0
|
||||
:max max
|
||||
:class "wmctrlslide"
|
||||
:tooltip val
|
||||
:value val
|
||||
:onchange onchange)
|
||||
(button
|
||||
:onclick reset
|
||||
:style "padding: 0px 8px 0px 3px;"
|
||||
"")))
|
||||
|
||||
(defwidget systat [icon val]
|
||||
(overlay
|
||||
(circular-progress
|
||||
:halign "center"
|
||||
:valign "center"
|
||||
:class "circsys"
|
||||
:thickness 40
|
||||
:value val)
|
||||
|
||||
(box
|
||||
:class "circiconcontain"
|
||||
:halign "center"
|
||||
:valign "center"
|
||||
:height 55
|
||||
:width 55
|
||||
(label :text icon))))
|
||||
|
||||
(defwidget user[]
|
||||
(revealer
|
||||
:reveal {!reveal4 && !reveal5 && !reveal6}
|
||||
:transition "slideup"
|
||||
(box
|
||||
:orientation "h"
|
||||
:space-evenly false
|
||||
:height 140
|
||||
:width 320
|
||||
:class "unbarwidget"
|
||||
:valign "start"
|
||||
:halign "fill"
|
||||
:hexpand true
|
||||
(image :style "margin: 10px;" :image-width 80 :image-height 80 :path "./image/fieshidle.gif")
|
||||
(scroll
|
||||
:hscroll true
|
||||
:vscroll false
|
||||
:hexpand true
|
||||
(box
|
||||
:orientation "v"
|
||||
:class "userinfo"
|
||||
:space-evenly false
|
||||
:valign "center"
|
||||
:halign "center"
|
||||
(label :halign "start" :text "${datehour < 12 ? 'Good morning' : datehour < 18 ? 'Good afternoon' : datehour < 22 ? 'Good evening' : 'Good night'} ${hostname}")
|
||||
(label :halign "start" :text uptime :style "font-size: 12px;"))))))
|
||||
|
||||
(defwidget notiweathertoggle[]
|
||||
(box
|
||||
:orientation "v"
|
||||
:halign "fill"
|
||||
:valign "fill"
|
||||
:vexpand true
|
||||
:class "unbarwidget"
|
||||
:space-evenly false
|
||||
(box
|
||||
:orientation "h"
|
||||
(button
|
||||
:onclick "${EWW_CMD} update revealweather=false"
|
||||
(label :class {!revealweather ? "titlesel" : "title"} :text "Notifications"))
|
||||
(button
|
||||
:onclick "${EWW_CMD} update revealweather=true"
|
||||
(label :class {revealweather ? "titlesel" : "title"} :text "Weather")))
|
||||
|
||||
(box
|
||||
:orientation "h"
|
||||
:vexpand true
|
||||
:hexpand true
|
||||
:space-evenly false
|
||||
(revealer
|
||||
:reveal {!revealweather}
|
||||
:transition "slideright"
|
||||
(notificationlog))
|
||||
(revealer
|
||||
:reveal revealweather
|
||||
:transition "slideleft"
|
||||
(weather)))))
|
||||
|
||||
(defwidget weather[]
|
||||
(overlay
|
||||
(box
|
||||
:orientation "v"
|
||||
:halign "fill"
|
||||
:valign "fill"
|
||||
:width 320
|
||||
:vexpand true
|
||||
:space-evenly false
|
||||
(weathermain)
|
||||
(scroll
|
||||
:hscroll false
|
||||
:vscroll true
|
||||
:vexpand true
|
||||
(box
|
||||
:orientation "v"
|
||||
:valign "start"
|
||||
:space-evenly false
|
||||
(for hour in {weatherjson.hourly}
|
||||
(weatherhour :hour hour)))))
|
||||
(box
|
||||
:valign "end"
|
||||
:hexpand true
|
||||
:vexpand false
|
||||
:height 80
|
||||
:class "fadeoutbox")
|
||||
))
|
||||
|
||||
(defwidget weatherhour[hour]
|
||||
(box
|
||||
:class "smallentry"
|
||||
:orientation "h"
|
||||
:height 80
|
||||
:halign "fill"
|
||||
:valign "center"
|
||||
:vexpand false
|
||||
:space-evenly true
|
||||
:spacing 10
|
||||
(label :style "font-size: 20px;" :text {hour.time})
|
||||
(image
|
||||
:image-width 50
|
||||
:image-height 50
|
||||
:path "./image/weather/${hour.icon}.svg")
|
||||
(box
|
||||
:orientation "v"
|
||||
:space-evenly false
|
||||
:valign "center"
|
||||
:spacing 10
|
||||
(label :halign "start" :text "${hour.FeelsLikeC}°C")
|
||||
(label :halign "start" :text "rain: ${hour.chanceofrain}%"))))
|
||||
|
||||
(defwidget weathermain[]
|
||||
(box
|
||||
:class "mainentry"
|
||||
:orientation "h"
|
||||
:halign "fill"
|
||||
:height 150
|
||||
:space-evenly false
|
||||
:spacing 10
|
||||
(image
|
||||
:image-width 100
|
||||
:image-height 100
|
||||
:style "margin: 10px;"
|
||||
:path "./image/weather/${weatherjson.icon}.svg")
|
||||
(scroll
|
||||
:hscroll true
|
||||
:vscroll false
|
||||
:valign "fill"
|
||||
:hexpand true
|
||||
(box
|
||||
:orientation "v"
|
||||
(label :halign "start" :text {weatherjson.weatherDesc[0].value})
|
||||
(label :halign "start" :text "Feels like ${weatherjson.FeelsLikeC}°C")
|
||||
(label :halign "start" :text "← ${weatherjson.windspeedKmph} km/h")
|
||||
;; (label :halign "start" :text "${weatherjson.visibility} km")
|
||||
;; (label :halign "start" :text "${weatherjson.precipMM} mm")
|
||||
))))
|
||||
|
||||
(defwidget timer[]
|
||||
(box
|
||||
:orientation "v"
|
||||
:class "unbarwidget"
|
||||
:space-evenly false
|
||||
:width 180
|
||||
:valign "fill"
|
||||
(label :class "timer" :valign "center" :vexpand true :text timerdis)
|
||||
(box
|
||||
:orientation "h"
|
||||
:class "timer_butt"
|
||||
:valign "end"
|
||||
(button :onclick "./scripts/timer.py timedec" (label :text "-"))
|
||||
(button :onclick "./scripts/timer.py toggle" (label :style "padding-right: 3px;" :text { !matches(timerdis, ":") ? "" : ""}))
|
||||
(button :onclick "./scripts/timer.py timeinc" (label :text "+")))))
|
||||
|
||||
(defwidget bigslide []
|
||||
(box
|
||||
:valign "fill"
|
||||
:halign "fill"
|
||||
:class "unbarwidget"
|
||||
:hexpand true
|
||||
:space-evenly true
|
||||
(bigvol)
|
||||
(bigbright)))
|
||||
|
||||
(defwidget bigvol []
|
||||
(overlay
|
||||
(scale
|
||||
:width 50
|
||||
:class "bigslide"
|
||||
:value volume
|
||||
:onchange "pamixer --set-volume {}"
|
||||
:orientation "v"
|
||||
:tooltip "${volume}%"
|
||||
:max 100
|
||||
:min 0
|
||||
:flipped true)
|
||||
(label
|
||||
:class "slideicon"
|
||||
:valign "end"
|
||||
:text {volumemute == 'false' ? "" : ""})))
|
||||
|
||||
(defwidget bigbright []
|
||||
(overlay
|
||||
(scale
|
||||
:width 50
|
||||
:class "bigslide"
|
||||
:value brightness
|
||||
:onchange "brightnessctl set {}%"
|
||||
:orientation "v"
|
||||
:tooltip "${brightness}%"
|
||||
:max 100
|
||||
:min 0
|
||||
:flipped true)
|
||||
(label
|
||||
:class "slideicon"
|
||||
:valign "end"
|
||||
:text "")))
|
||||
|
||||
(defwidget notificationlog []
|
||||
(box
|
||||
:halign "fill"
|
||||
:valign "fill"
|
||||
:width 320
|
||||
:vexpand true
|
||||
:space-evenly false
|
||||
:orientation "v"
|
||||
(overlay
|
||||
:vexpand true
|
||||
(scroll
|
||||
:hscroll false
|
||||
:vscroll true
|
||||
:vexpand true
|
||||
:valign "fill"
|
||||
(box
|
||||
:orientation "v"
|
||||
:valign "start"
|
||||
:space-evenly false
|
||||
(for noti in {notifications.notifications}
|
||||
(singlenotif :noti noti :initial false))))
|
||||
|
||||
(box
|
||||
:valign "end"
|
||||
:hexpand true
|
||||
:vexpand false
|
||||
:height 80
|
||||
:class "fadeoutbox"))
|
||||
(box
|
||||
:orientation "h"
|
||||
(button
|
||||
:onclick "./scripts/notifManage --clear"
|
||||
(label
|
||||
:class "title"
|
||||
:text "Clear All"))
|
||||
(button
|
||||
:onclick "./scripts/notifManage --toggle"
|
||||
(label
|
||||
:class { notifications.dnd ? "titlesel" : "title"}
|
||||
:text "Do Not Disturb")))))
|
||||
|
||||
(defwidget quote []
|
||||
(box
|
||||
:class "quotewid unbarwidget"
|
||||
:halign "fill"
|
||||
:valign "fill"
|
||||
:vexpand true
|
||||
:space-evenly false
|
||||
:orientation "v"
|
||||
(scroll :vexpand true :hscroll true :vscroll true
|
||||
(label
|
||||
:class "quote"
|
||||
:text {quotejson.content}
|
||||
:wrap true
|
||||
:width 300))
|
||||
(label
|
||||
:class "quoteauthor"
|
||||
:text "- ${quotejson.author}")))
|
||||
|
||||
(defwidget coolmpd [h permashow]
|
||||
(overlay
|
||||
(box
|
||||
:orientation "v"
|
||||
:halign "fill"
|
||||
:height h
|
||||
:class { pcover != "" ? "mpdcover" : "unbarwidget"}
|
||||
:style "background-image: url('${pcover}')"
|
||||
:visible {permashow ? true : pcover != "" })
|
||||
(box
|
||||
:orientation "h"
|
||||
:space-evenly false
|
||||
:halign "center"
|
||||
:valign "center"
|
||||
:spacing 10
|
||||
(image :image-width 100 :image-height 100 :path { pcover == "" ? "./image/emptympd.png" : pcover })
|
||||
(box
|
||||
:orientation "v"
|
||||
:space-evenly false
|
||||
:width 200
|
||||
:halign "center"
|
||||
:valign "center"
|
||||
:class "coolmpd"
|
||||
(scroll
|
||||
:hscroll true
|
||||
:vscroll false
|
||||
(label :style "font-size: 20px;" :text psong))
|
||||
(scroll
|
||||
:hscroll true
|
||||
:vscroll false
|
||||
(label :text partist))
|
||||
(box
|
||||
:orientation "h"
|
||||
:class "mpd_controls"
|
||||
(button :onclick "playerctl previous"
|
||||
(label :text ""))
|
||||
(button :style "padding-right: 3px;" :onclick "playerctl play-pause"
|
||||
(label :text { pstatus == "Playing" ? "" : ""} ))
|
||||
(button :onclick "playerctl next"
|
||||
(label :text "")))))))
|
||||
|
||||
(include "./control_panel/windowswitcher.yuck")
|
58
hypr-configs/hyprland/eww/control_panel/windowswitcher.yuck
Normal file
|
@ -0,0 +1,58 @@
|
|||
|
||||
;; Credits to T0kyob0y
|
||||
|
||||
(defwidget overview[]
|
||||
(box
|
||||
:space-evenly false
|
||||
:class "unbarwidget"
|
||||
:orientation "h"
|
||||
:hexpand true
|
||||
(scroll
|
||||
:hscroll true
|
||||
:vscroll false
|
||||
:hexpand true
|
||||
(box
|
||||
:orientation "h"
|
||||
:space-evenly true
|
||||
:spacing 10
|
||||
(for i in {[0, 1, 2, 3, 4]}
|
||||
(button
|
||||
;; :ondropped "notify-send 'real'"
|
||||
:onclick "${EWW_CMD} update revealcontrolpanel=false && swaymsg -t command workspace number ${i+1}"
|
||||
;; :onclick "swaymsg -t command workspace number ${i+1}"
|
||||
(box
|
||||
:class "overviewworkspace"
|
||||
:space-evenly false
|
||||
;; :height {round(1080/5.8, 0)}
|
||||
:vexpand true
|
||||
:width {round(1920/5.8, 0)}
|
||||
(for j in {windows[i]}
|
||||
(windowapp :w j)
|
||||
))
|
||||
))))))
|
||||
|
||||
(defwidget windowapp [w]
|
||||
(box
|
||||
:style "
|
||||
margin-left: ${round(((w.rect.x)/5.8), 0)}px;
|
||||
margin-top: ${round(w.rect.y/5.8, 0)}px;
|
||||
margin-right: -${round((w.rect.x + w.rect.width)/5.8, 0)}px;
|
||||
margin-bottom: -${round(((w.rect.y + w.rect.height)/5.8), 0)}px;
|
||||
"
|
||||
:hexpand false
|
||||
:vexpand false
|
||||
:halign "start"
|
||||
:valign "start"
|
||||
:class "overviewwindow"
|
||||
(eventbox
|
||||
:valign "center"
|
||||
:halign "center"
|
||||
:dragvalue "${w.pid}"
|
||||
:dragtype "text"
|
||||
(image
|
||||
:valign "center"
|
||||
:halign "center"
|
||||
:image-height {round(w.rect.width/5.8 * 45/100, 0)}
|
||||
:image-width {round(w.rect.height/5.8 * 45/100, 0)}
|
||||
:path {w.path}
|
||||
))))
|
20
hypr-configs/hyprland/eww/dashboard/dashboard.scss
Normal file
|
@ -0,0 +1,20 @@
|
|||
|
||||
.heading {
|
||||
font-size: 25px;
|
||||
color: $accent;
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
.dmpdcontrol {
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
.dmpdcontrol label {
|
||||
font-size: 20px;
|
||||
margin: 0px 8px;
|
||||
}
|
||||
|
||||
.dicons label {
|
||||
font-size: 25px;
|
||||
margin-right: 6px;
|
||||
}
|
160
hypr-configs/hyprland/eww/dashboard/dashboard.yuck
Normal file
|
@ -0,0 +1,160 @@
|
|||
|
||||
;; Dashboard design is made by tsukki9696
|
||||
(defwindow dashboard
|
||||
:geometry (geometry
|
||||
:x 0
|
||||
:y 0
|
||||
:width 800
|
||||
:height 420
|
||||
:anchor "center")
|
||||
:stacking "overlay"
|
||||
:monitor 0
|
||||
(structure))
|
||||
|
||||
(defwidget structure[]
|
||||
(box
|
||||
:class "popup"
|
||||
:space-evenly false
|
||||
:orientation "v"
|
||||
(duser :name "Failed" :tag "failed.sh" :pfp "./image/roundpfp.png")
|
||||
(box
|
||||
:space-evenly true
|
||||
:orientation "h"
|
||||
:vexpand true
|
||||
(box
|
||||
:space-evenly false
|
||||
:orientation "v"
|
||||
(coolmpd :h 150 :permashow true)
|
||||
(box
|
||||
:space-evenly false
|
||||
:orientation "h"
|
||||
(box
|
||||
:width 130
|
||||
:space-evenly false
|
||||
:orientation "v"
|
||||
(dbutt)
|
||||
(theme))
|
||||
(dcal)
|
||||
))
|
||||
(box
|
||||
:orientation "v"
|
||||
:space-evenly false
|
||||
(dnotes)
|
||||
(quote))
|
||||
)))
|
||||
|
||||
(defwidget duser [name tag pfp]
|
||||
(box
|
||||
:orientation "h"
|
||||
:space-evenly false
|
||||
:halign "start"
|
||||
:hexpand true
|
||||
:class "unbarwidget"
|
||||
:style "background-color: inherit;"
|
||||
:spacing 15
|
||||
(image :image-width 50 :image-height 50 :path pfp)
|
||||
(label :text "|" :style "color: #262626; font-size: 30px;")
|
||||
(box
|
||||
:orientation "v"
|
||||
:space-evenly true
|
||||
:halign "start"
|
||||
(label :style "font-weight: bold; font-size: 18px;" :text "Hello, ${name}")
|
||||
(label :halign "start" :text tag))))
|
||||
|
||||
(defwidget dnotes []
|
||||
(box
|
||||
:class "notes unbarwidget"
|
||||
:space-evenly false
|
||||
:orientation "v"
|
||||
:vexpand true
|
||||
(label :class "heading" :text "Agenda")
|
||||
(box
|
||||
:vexpand true
|
||||
:width 350
|
||||
(scroll
|
||||
:hscroll true
|
||||
:vscroll true
|
||||
(label :style "font-size: 16px;" :text notesc)))))
|
||||
|
||||
(defwidget dmpd []
|
||||
(overlay
|
||||
(box
|
||||
:class "mpdcover"
|
||||
:style "background-image: url('${pcover}')"
|
||||
:height 150)
|
||||
(box
|
||||
:orientation "v"
|
||||
:space-evenly false
|
||||
:spacing 10
|
||||
:valign "center"
|
||||
(scroll
|
||||
:hscroll true
|
||||
:vscroll false
|
||||
(label :style "font-size: 18px;" :text psong))
|
||||
(scroll
|
||||
:hscroll true
|
||||
:vscroll false
|
||||
(label :text partist))
|
||||
;; (scale
|
||||
;; :hexpand false
|
||||
;; :width 60
|
||||
;; :class "seektime"
|
||||
;; :value current
|
||||
;; :orientation "h"
|
||||
;; :min -5
|
||||
;; :max 100
|
||||
;; :onscroll "mpc -q seek +1"
|
||||
;; :tooltip "${ctime}/${ttime}")
|
||||
(box
|
||||
:orientation "h"
|
||||
:space-evenly false
|
||||
:spacing 40
|
||||
:halign "center"
|
||||
:class "dmpdcontrol"
|
||||
(button :onclick "./scripts/music_info --prev" (label :text ""))
|
||||
(button :onclick "./scripts/music_info --toggle" (label :text { pstatus == "Playing" ? "" : ""}))
|
||||
(button :onclick "./scripts/music_info --next" (label :text ""))))))
|
||||
|
||||
(defwidget dcal []
|
||||
(box
|
||||
:class "unbarwidget mincal"
|
||||
:height 190
|
||||
:hexpand true
|
||||
(calendar
|
||||
:show-details false
|
||||
:show-heading true
|
||||
:show-day-names false
|
||||
:show-week-numbers false
|
||||
:day calendar_day
|
||||
:year calendar_year)))
|
||||
|
||||
(defwidget dbutt[]
|
||||
(box
|
||||
:space-evenly true
|
||||
:orientation "h"
|
||||
:height 130
|
||||
(box
|
||||
:space-evenly true
|
||||
:orientation "v"
|
||||
(button :class "dicons unbarwidget" :onclick "notify-send 'shutdown' 'but its impractical'" (label :text ""))
|
||||
(button :class "dicons unbarwidget" :onclick "notify-send 'restart' 'but its impractical'" (label :text "")))
|
||||
(box
|
||||
:space-evenly true
|
||||
:orientation "v"
|
||||
(button :class "dicons unbarwidget" :onclick "notify-send 'lock' 'but its impractical'" (label :text ""))
|
||||
(button :class "dicons unbarwidget" :onclick "notify-send 'log out' 'but its impractical'" (label :text "")))))
|
||||
|
||||
(defwidget theme []
|
||||
(button
|
||||
:class "unbarwidget"
|
||||
:vexpand true
|
||||
:onclick "./scripts/toggletheme toggle"
|
||||
(label :style "font-size: 18px;" :text "")))
|
||||
|
||||
;; (defwidget dquote []
|
||||
;; (box
|
||||
;; :class "unbarwidget"
|
||||
;; :height "120"
|
||||
;; :valign "center"
|
||||
;; (literal
|
||||
;; :content quoteliteral)))
|
11
hypr-configs/hyprland/eww/desktop/desktop.scss
Normal file
|
@ -0,0 +1,11 @@
|
|||
|
||||
.desktoptext {
|
||||
font-size: 18px;
|
||||
color: $white0;
|
||||
text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
|
||||
}
|
||||
|
||||
.desktopbox:hover {
|
||||
border: solid 2px;
|
||||
border-color: $surface2;
|
||||
}
|
41
hypr-configs/hyprland/eww/desktop/desktop.yuck
Normal file
|
@ -0,0 +1,41 @@
|
|||
(defwindow desktopicons
|
||||
:geometry (geometry
|
||||
:x 20
|
||||
:y 20
|
||||
:width 100
|
||||
:height 600
|
||||
:anchor "top right")
|
||||
:stacking "bottom"
|
||||
:monitor 0
|
||||
(box
|
||||
:orientation "v"
|
||||
:space-evenly "false"
|
||||
:spacing 10
|
||||
|
||||
(eventbox
|
||||
:dragtype "file"
|
||||
:class "desktopbox"
|
||||
:onclick "thunar ${homedir}/.local/share/Trash/files"
|
||||
:ondropped "notify-send {}"
|
||||
(box
|
||||
:orientation "v"
|
||||
:space-evenly false
|
||||
:height 100
|
||||
:valign "end"
|
||||
(image :width 100 :height 100 :image-width 80 :image-height 80 :path trashcanpath)
|
||||
(label :class "desktoptext" :text "Trash")))
|
||||
|
||||
(for i in '["amogus"]'
|
||||
(imagesicon :name i))))
|
||||
|
||||
(defwidget imagesicon [name]
|
||||
(eventbox
|
||||
:onclick "feh ./image/desktop/${name}.png"
|
||||
:class "desktopbox"
|
||||
(box
|
||||
:orientation "v"
|
||||
:space-evenly false
|
||||
:height 100
|
||||
:valign "end"
|
||||
(image :width 100 :height 100 :image-width 80 :image-height 80 :path "./image/desktop/${name}.png")
|
||||
(label :class "desktoptext" :text "${name}.png"))))
|
6
hypr-configs/hyprland/eww/dock/dock.scss
Normal file
|
@ -0,0 +1,6 @@
|
|||
|
||||
.dockindicate {
|
||||
transition: 500ms ease;
|
||||
background-color: $white0;
|
||||
border-radius: 5px;
|
||||
}
|
64
hypr-configs/hyprland/eww/dock/dock.yuck
Normal file
|
@ -0,0 +1,64 @@
|
|||
(defwindow dock
|
||||
:geometry (geometry
|
||||
:x 0
|
||||
:y 0
|
||||
:width 10
|
||||
:height 54
|
||||
:anchor "bottom center")
|
||||
:stacking "overlay"
|
||||
:monitor 0
|
||||
(dockstruct))
|
||||
|
||||
(defwidget dockstruct []
|
||||
(eventbox
|
||||
:onhover "${EWW_CMD} update revealdock=true"
|
||||
:onhoverlost "${EWW_CMD} update revealdock=false"
|
||||
(box
|
||||
:orientation "v"
|
||||
:space-evenly false
|
||||
:valign "end"
|
||||
(box
|
||||
:height 4)
|
||||
(revealer
|
||||
:reveal revealdock
|
||||
:transition "slideup"
|
||||
(box
|
||||
:class "popup"
|
||||
:height 60
|
||||
:orientation "h"
|
||||
:halign "center"
|
||||
(tasklist :iconsize 50))))))
|
||||
|
||||
(defwidget tasklist [iconsize]
|
||||
(box
|
||||
:orientation "h"
|
||||
:space-evenly true
|
||||
:spacing 10
|
||||
(for task in {tasksjson}
|
||||
(button
|
||||
:tooltip { task.name }
|
||||
:onclick { task.pid != 'null' ? 'swaymsg "[pid=${task.pid}] focus"' : '(cd && gtk-launch ${task.app_id}) &'}
|
||||
(box
|
||||
:orientation "v"
|
||||
:space-evenly false
|
||||
(image
|
||||
:image-width iconsize
|
||||
:image-height iconsize
|
||||
:path {task.path})
|
||||
|
||||
(scroll
|
||||
:hscroll true
|
||||
:vscroll false
|
||||
(box
|
||||
:orientation "h"
|
||||
:halign "center"
|
||||
:space-evenly false
|
||||
:spacing 3
|
||||
(for focus in {task.focused}
|
||||
(box
|
||||
:class "dockindicate"
|
||||
:hexpand false
|
||||
:width { focus ? 10 : 5 }
|
||||
:height 3))))
|
||||
)))))
|
||||
|
|
@ -1,31 +1,139 @@
|
|||
@import './colors.scss';
|
||||
@import './bar/bar.scss';
|
||||
// @import './bottom_bar/bar.scss';
|
||||
@import './control_panel/control_panel.scss';
|
||||
@import './dashboard/dashboard.scss';
|
||||
@import './dock/dock.scss';
|
||||
@import './desktop/desktop.scss';
|
||||
@import './notification/notification.scss';
|
||||
|
||||
* {
|
||||
all: unset;
|
||||
transition: 200ms;
|
||||
all: unset;
|
||||
color: $white0;
|
||||
font-size: 15px;
|
||||
font-family: "Iosevka Nerd Font";
|
||||
// font-weight: bold;
|
||||
// font-smooth: never;
|
||||
}
|
||||
|
||||
@mixin window {
|
||||
background-color: $background;
|
||||
margin: 0.2rem;
|
||||
tooltip {
|
||||
background-color: $surface0;
|
||||
color: $white0;
|
||||
border-radius: 5px;
|
||||
border-style: solid;
|
||||
border-width: 2px;
|
||||
border-color: $surface2;
|
||||
}
|
||||
|
||||
$shadow: #151515;
|
||||
$background: #171717;
|
||||
$bg-alt: #171518;
|
||||
$bg-alt2: #312f32;
|
||||
$fg: #f0f0f0;
|
||||
$fg-alt: #cacaca;
|
||||
$fg-alt2: #a0a0a0;
|
||||
$black: #262626;
|
||||
$gray: #bababa;
|
||||
$red: #fa8e89;
|
||||
$green: #9ec49f;
|
||||
$yellow: #faf889;
|
||||
$blue: #89b4fa;
|
||||
$magenta: #e889fa;
|
||||
$cyan: #89eafa;
|
||||
$white: #ffffff;
|
||||
scale {
|
||||
all: unset;
|
||||
trough {
|
||||
background-color: $surface2;
|
||||
border-radius: 24px;
|
||||
min-height: 80px;
|
||||
min-width: 10px;
|
||||
margin : 5px;
|
||||
|
||||
@import "bar/bar.scss";
|
||||
@import "central/central.scss";
|
||||
@import "notifications/notifications.scss";
|
||||
@import "volume/volume.scss";
|
||||
slider {
|
||||
background-color: $white2;
|
||||
border-radius: 25px;
|
||||
min-height: 15px;
|
||||
min-width: 15px;
|
||||
margin: -10px;
|
||||
}
|
||||
|
||||
highlight {
|
||||
background-color: $white0;
|
||||
border-radius: 24px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
button {
|
||||
transition-duration: 0.5s;
|
||||
border-radius: 5px;
|
||||
}
|
||||
button:hover {
|
||||
background-color: $surface2;
|
||||
}
|
||||
|
||||
|
||||
calendar {
|
||||
all: unset;
|
||||
background-color: $surface0;
|
||||
font-size: 20;
|
||||
color: $white0;
|
||||
}
|
||||
|
||||
calendar:selected {
|
||||
color: $base;
|
||||
background-color: $accent;
|
||||
border-radius: 25px;
|
||||
}
|
||||
|
||||
calendar.header {
|
||||
color: $accent;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
calendar:indeterminate {
|
||||
color: $surface2;
|
||||
}
|
||||
|
||||
checkbutton {
|
||||
border-radius: 24px;
|
||||
background-color: $surface1;
|
||||
padding: 4px;
|
||||
check {
|
||||
min-height: 15px;
|
||||
min-width: 15px;
|
||||
color: $white0;
|
||||
}
|
||||
}
|
||||
|
||||
checkbutton:checked {
|
||||
check{
|
||||
border-radius: 24px;
|
||||
background-color: $white0;
|
||||
}
|
||||
}
|
||||
|
||||
.popup {
|
||||
background-color: $base;
|
||||
padding: 5px;
|
||||
border-radius: 5px;
|
||||
border-style: solid;
|
||||
border-color: $surface2;
|
||||
border-width: 2px;
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
entry {
|
||||
// image: url('./image/screenshot.png');
|
||||
padding: 5px;
|
||||
margin: 5px;
|
||||
border-radius: 5px;
|
||||
border-style: solid;
|
||||
border-color: $surface2;
|
||||
background-color: $surface1;
|
||||
color: $white0;
|
||||
}
|
||||
|
||||
.mainentry {
|
||||
background-color: $surface1;
|
||||
padding: 5px;
|
||||
border-radius: 5px;
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
.mainentry label {
|
||||
font-size: 18px;
|
||||
color: $white0;
|
||||
}
|
||||
|
||||
.smallentry {
|
||||
@extend .mainentry;
|
||||
label {
|
||||
font-size: 15px;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,42 +1,127 @@
|
|||
(include "bar/bar.yuck")
|
||||
(include "central/central.yuck")
|
||||
(include "notifications/notifications.yuck")
|
||||
(include "volume/volume.yuck")
|
||||
(defpoll thour :initial "0" :interval "60s" "date +'%I'")
|
||||
(defpoll tmin :initial "0" :interval "60s" "date +'%M'")
|
||||
(defpoll tpm :initial "0" :interval "60s" "date +'%p'")
|
||||
(defpoll volumemute :initial "false" :interval "1s" "pamixer --get-mute")
|
||||
(defpoll volume :initial "0" :interval "1s" "pamixer --get-volume")
|
||||
(defpoll brightness :initial "0" :interval "2s" "brightnessctl -m | awk -F, '{print substr($4, 0, length($4)-1)}' | tr -d '%'")
|
||||
(defpoll wifi_icon :initial "" :interval "30s" "./scripts/wifi --ICON")
|
||||
(defpoll wifi_essid :initial "" :interval "30s" "./scripts/wifi --ESSID")
|
||||
(defpoll wifi_radio :initial "off" :interval "2s" "nmcli radio wifi")
|
||||
(defpoll calendar_day :initial "1" :interval "20h" "date '+%d'")
|
||||
(defpoll calendar_year :initial "2000" :interval "20h" "date '+%Y'")
|
||||
(defpoll bat0 :initial "0" :interval "30s" "bash ./scripts/sys_info --bat")
|
||||
;; (defpoll baticon :initial "" :interval "30s" "bash ./scripts/sys_info --baticon")
|
||||
;; (defpoll batstat :interval "30s" "cat /sys/class/power_supply/BAT0/status")
|
||||
(defpoll homedir :initial "" :interval "24h" "echo ~")
|
||||
|
||||
(deflisten hyprland `scripts/workspace`)
|
||||
(deflisten name `scripts/sysinfo.sh --name`)
|
||||
(deflisten kernel `scripts/sysinfo.sh --kernel`)
|
||||
(deflisten os `scripts/sysinfo.sh --os`)
|
||||
(deflisten wm `scripts/sysinfo.sh --wm`)
|
||||
(deflisten uptime `scripts/sysinfo.sh --uptime`)
|
||||
(deflisten workspacejson
|
||||
:initial '[{"focused": true, "empty": false, "name": 1}, {"focused": false, "empty": true, "name": 2}, {"focused": false, "empty": true, "name": 3}, {"focused": false, "empty": true, "name": 4}, {"focused": false, "empty": true, "name": 5}]'
|
||||
"./scripts/workspace.py")
|
||||
|
||||
(defvar perfil "assets/perfil.png")
|
||||
;; used mainly in control panel and dashboard
|
||||
(defpoll hostname :initial "idk" :interval "24h" 'echo "$(whoami)"')
|
||||
(defpoll uptime :initial "idk" :interval "1m" "uptime -p")
|
||||
(defpoll weatherjson
|
||||
:initial '{
|
||||
"FeelsLikeC": "0",
|
||||
"FeelsLikeF": "0",
|
||||
"cloudcover": "0",
|
||||
"humidity": "0",
|
||||
"localObsDateTime": "2000-00-00 07:27 AM",
|
||||
"observation_time": "07:27 AM",
|
||||
"precipInches": "0.0",
|
||||
"precipMM": "0.0",
|
||||
"pressure": "0",
|
||||
"pressureInches": "0",
|
||||
"temp_C": "0",
|
||||
"temp_F": "0",
|
||||
"uvIndex": "0",
|
||||
"visibility": "0",
|
||||
"visibilityMiles": "0",
|
||||
"weatherCode": "727",
|
||||
"weatherDesc": [{"value": "Idk"}],
|
||||
"weatherIconUrl": [{"value": ""}],
|
||||
"winddir16Point": "",
|
||||
"winddirDegree": "0",
|
||||
"windspeedKmph": "0",
|
||||
"windspeedMiles": "0",
|
||||
"icon": "idk",
|
||||
"hourly": []
|
||||
}'
|
||||
:interval "1h"
|
||||
:run-while revealcontrolpanel
|
||||
"./scripts/weather.py")
|
||||
(defpoll datehour :initial "12" :interval "30m" "date +'%H'")
|
||||
(defpoll notesc :interval "2s" :run-while reveal4 "cat -s ~/Documents/fuck.txt")
|
||||
(deflisten timerdis `./scripts/timer.py subscribe`)
|
||||
(defpoll quotejson :interval "1h" `./scripts/quote.py`)
|
||||
|
||||
;; Music
|
||||
(defpoll music-art :interval "1s" "scripts/mediacontrol coverloc")
|
||||
(defpoll music-title :interval "1s" "scripts/mediacontrol title")
|
||||
(defpoll music-artist :interval "1s" "scripts/mediacontrol artist")
|
||||
(defpoll music-toggle :interval "1s" "scripts/mediacontrol statusicon")
|
||||
(defpoll music-status :interval "1s" "scripts/mediacontrol status")
|
||||
(defpoll music-position :interval "1s" "scripts/mediacontrol position")
|
||||
(defpoll music-length :interval "1s" "scripts/mediacontrol length")
|
||||
(defpoll music-positions :interval "1s" "scripts/mediacontrol positions")
|
||||
(defpoll music-lengths :interval "1s" "scripts/mediacontrol lengths")
|
||||
(defpoll music-shuffle-color :interval "1s" "scripts/mediacontrol shufflecolor")
|
||||
(defpoll music-shuffle-status :interval "1s" "playerctl -p spotify shuffle")
|
||||
(defpoll music-loop-icon :interval "1s" "scripts/mediacontrol loopicon")
|
||||
(defpoll music-loop-color :interval "1s" "scripts/mediacontrol loopcolor")
|
||||
(defpoll music-loop-status :interval "1s" "playerctl -p spotify loop")
|
||||
(defvar music-rev false)
|
||||
;; dock
|
||||
(deflisten tasksjson :initial "[]" "./scripts/tasklist.py")
|
||||
(defvar revealdock false)
|
||||
|
||||
;; Volume
|
||||
(deflisten volume `scripts/volume`)
|
||||
(defvar volume_rev false)
|
||||
;; fucking desktop icons
|
||||
(defpoll trashcanpath :interval "24h" "./scripts/iconfetch.py trashcan_empty")
|
||||
|
||||
;; Date
|
||||
(defpoll hour :interval "1s" "date '+%H'")
|
||||
(defpoll minute :interval "1s" "date '+%M'")
|
||||
(defpoll date :interval "1h" "date '+%a, %d %B'")
|
||||
(defpoll calendar-day :interval "1h" "date '+%d'")
|
||||
(defpoll calendar-month :interval "1h" "date '+%m'")
|
||||
(defpoll calendar-year :interval "1h" "date '+%Y'")
|
||||
;; sys info
|
||||
;; (defpoll cpu :interval "1s" :run-while reveal5 "bash ./scripts/sys_info --cpu")
|
||||
;; (defpoll mem :interval "1s" :run-while reveal5 "bash ./scripts/sys_info --mem")
|
||||
(defvar gapsouter 0)
|
||||
(defvar gapsinner 10)
|
||||
(defvar borderpixel 2)
|
||||
(defvar caffeine false)
|
||||
|
||||
; Notifications
|
||||
(deflisten notifications :initial '{
|
||||
"count": 0,
|
||||
"dnd": false,
|
||||
"notifications": [],
|
||||
"popups": []
|
||||
}'
|
||||
"./scripts/notifCatch"
|
||||
)
|
||||
|
||||
;; cava pipe ("borrowed from tail-r")
|
||||
;; (deflisten cavajson :initial "[]" "./scripts/cava_pipe.sh")
|
||||
|
||||
;; playerctl
|
||||
(deflisten psong "playerctl metadata --format '{{ title }}' -F")
|
||||
(deflisten partist "playerctl metadata --format '{{ artist }}' -F")
|
||||
(deflisten pcover "./scripts/pollcover.sh")
|
||||
(deflisten pstatus "playerctl status -F")
|
||||
(deflisten ptime
|
||||
:initial '{
|
||||
"position": 0,
|
||||
"duration": 0,
|
||||
"readable": "0:00"
|
||||
}'
|
||||
"playerctl -F metadata -f '{ \"position\": {{position/1000000}}, \"duration\": {{mpris:length/1000000}}, \"readable\": \"{{duration(position)}}/{{duration(mpris:length)}}\" }'")
|
||||
;; (deflisten pside "playerctl -F metadata -f '{ \"volume\": {{volume*100}}, \"shuffle\": \"{{shuffle}}\", \"loop\": \"{{loop}}\" }'")
|
||||
|
||||
;; wallpaper thing
|
||||
(defvar wallpapers "[]")
|
||||
|
||||
;; windows for workspace switching
|
||||
(defvar windows "[[], [], [], [], []]")
|
||||
|
||||
(defvar reveal1 false)
|
||||
(defvar reveal2 false)
|
||||
(defvar reveal3 false)
|
||||
(defvar reveal4 false)
|
||||
(defvar reveal5 false)
|
||||
(defvar reveal6 false)
|
||||
(defvar revealweather false)
|
||||
(defvar revealsystray false)
|
||||
(defvar revealcontrolpanel false)
|
||||
|
||||
(defpoll theme :interval "24h" "./scripts/toggletheme")
|
||||
|
||||
|
||||
(include "./bar/bar.yuck")
|
||||
;; (include "./bottom_bar/bar.yuck")
|
||||
(include "./control_panel/control_panel.yuck")
|
||||
(include "./dashboard/dashboard.yuck")
|
||||
(include "./dock/dock.yuck")
|
||||
(include "./desktop/desktop.yuck")
|
||||
(include "./notification/notification.yuck")
|
||||
(include "./wallpapers/wallpapers.yuck")
|
||||
|
|
BIN
hypr-configs/hyprland/eww/image/desktop/amogus.png
Normal file
After Width: | Height: | Size: 85 KiB |
BIN
hypr-configs/hyprland/eww/image/desktop/cirno.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
hypr-configs/hyprland/eww/image/desktop/koishi.png
Normal file
After Width: | Height: | Size: 256 KiB |
BIN
hypr-configs/hyprland/eww/image/desktop/marisa.png
Normal file
After Width: | Height: | Size: 251 KiB |
BIN
hypr-configs/hyprland/eww/image/desktop/reisen.png
Normal file
After Width: | Height: | Size: 147 KiB |
BIN
hypr-configs/hyprland/eww/image/emptympd.png
Normal file
After Width: | Height: | Size: 9.4 KiB |
BIN
hypr-configs/hyprland/eww/image/eyedropper.png
Normal file
After Width: | Height: | Size: 7.1 KiB |
BIN
hypr-configs/hyprland/eww/image/fieshidle.gif
Normal file
After Width: | Height: | Size: 9.6 KiB |
7
hypr-configs/hyprland/eww/image/idk.svg
Normal file
|
@ -0,0 +1,7 @@
|
|||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Transformed by: SVG Repo Mixer Tools -->
|
||||
<svg fill="#ffffff" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="800px" height="800px" viewBox="0 0 973.1 973.1" xml:space="preserve">
|
||||
<g id="SVGRepo_bgCarrier" stroke-width="0"/>
|
||||
<g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<g id="SVGRepo_iconCarrier"> <g> <path d="M502.29,788.199h-47c-33.1,0-60,26.9-60,60v64.9c0,33.1,26.9,60,60,60h47c33.101,0,60-26.9,60-60v-64.9 C562.29,815,535.391,788.199,502.29,788.199z"/> <path d="M170.89,285.8l86.7,10.8c27.5,3.4,53.6-12.4,63.5-38.3c12.5-32.7,29.9-58.5,52.2-77.3c31.601-26.6,70.9-40,117.9-40 c48.7,0,87.5,12.8,116.3,38.3c28.8,25.6,43.1,56.2,43.1,92.1c0,25.8-8.1,49.4-24.3,70.8c-10.5,13.6-42.8,42.2-96.7,85.9 c-54,43.7-89.899,83.099-107.899,118.099c-18.4,35.801-24.8,75.5-26.4,115.301c-1.399,34.1,25.8,62.5,60,62.5h49 c31.2,0,57-23.9,59.8-54.9c2-22.299,5.7-39.199,11.301-50.699c9.399-19.701,33.699-45.701,72.699-78.1 C723.59,477.8,772.79,428.4,795.891,392c23-36.3,34.6-74.8,34.6-115.5c0-73.5-31.3-138-94-193.4c-62.6-55.4-147-83.1-253-83.1 c-100.8,0-182.1,27.3-244.1,82c-52.8,46.6-84.9,101.8-96.2,165.5C139.69,266.1,152.39,283.5,170.89,285.8z"/> </g> </g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.4 KiB |
BIN
hypr-configs/hyprland/eww/image/loading.gif
Normal file
After Width: | Height: | Size: 32 KiB |
BIN
hypr-configs/hyprland/eww/image/roundpfp.png
Normal file
After Width: | Height: | Size: 26 KiB |
BIN
hypr-configs/hyprland/eww/image/screenshot.png
Normal file
After Width: | Height: | Size: 5.3 KiB |
1
hypr-configs/hyprland/eww/image/weather/clear-n.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg fill = "#ffffff" xmlns="http://www.w3.org/2000/svg" height="48" viewBox="0 -960 960 960" width="48"><path d="M524-34q-85 0-159.5-32T234-154q-56-56-88-130.5T114-444q0-151 96-264.5T456-848q-17 99 10.5 194.5T566-487q71 72 166.5 99.5T928-377q-25 149-139 246T524-34Z"/></svg>
|
After Width: | Height: | Size: 276 B |
1
hypr-configs/hyprland/eww/image/weather/clear.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg fill = "#ffffff" xmlns="http://www.w3.org/2000/svg" height="48" viewBox="0 -960 960 960" width="48"><path d="M444-764v-163h73v163h-73Zm262 109-51-51 115-116 51 52-115 115Zm58 211v-73h163v73H764ZM444-34v-163h73v163h-73ZM253-656 139-770l52-51 114 115-52 50Zm519 516L655-254l50-50 117 113-50 51ZM34-444v-73h163v73H34Zm157 305-51-52 113-113 27 24 26 26-115 115Zm289-101q-100 0-170-70t-70-170q0-100 70-170t170-70q100 0 170 70t70 170q0 100-70 170t-170 70Z"/></svg>
|
After Width: | Height: | Size: 464 B |
1
hypr-configs/hyprland/eww/image/weather/clouds.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg fill = "#ffffff" xmlns="http://www.w3.org/2000/svg" height="48" viewBox="0 -960 960 960" width="48"><path d="M249-145q-93.795 0-159.898-65.369Q23-275.739 23-370.495 23-451 74-513.5T204-591q24-99 101.551-161T482-814q114 0 194.5 81.5T763-534v24q74 3 124 54t50 128q0 75.167-53.917 129.083Q829.167-145 754-145H249Z"/></svg>
|
After Width: | Height: | Size: 325 B |
1
hypr-configs/hyprland/eww/image/weather/few-clouds-n.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg fill = "#ffffff" xmlns="http://www.w3.org/2000/svg" height="48" viewBox="0 -960 960 960" width="48"><path d="M240-402q48 0 88 26.5t60 71.5l9 22h25q41 0 70.5 30t29.5 72q0 43-30 72t-72 29H240q-67 0-114-47T79-240q0-67 47-114.5T240-402Zm216-446q-17 99 10.5 194.5T566-487q71 72 166.5 99.5T928-377q-25 151-140.5 248T520-34q-11 0-21-.5T479-36q44-18 71-57t27-87q0-62-41-106t-101-50q-28-55-80-88t-115-33q-34 0-66 10.5T115-416q-1-7-1-13v-13q-1-152 95.5-266T456-848Z"/></svg>
|
After Width: | Height: | Size: 470 B |
1
hypr-configs/hyprland/eww/image/weather/few-clouds.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg fill = "#ffffff" xmlns="http://www.w3.org/2000/svg" height="48" viewBox="0 -960 960 960" width="48"><path d="M240-180q-58 0-99-41t-41-99q0-58 41-99t99-41q39 0 71.5 21t47.5 56l18 41h43q33 0 56.5 24t23.5 58q0 33-23.5 56.5T420-180H240Zm318-73q-2-61-42.5-105T416-402q-17-57-66.5-90T240-520q14-88 82.5-144T480-720q100 0 170 70t70 170q0 78-44.5 140T558-253ZM444-764v-163h73v163h-73Zm262 109-51-52 115-115 51 52-115 115Zm58 211v-73h163v73H764Zm7 305L656-254l52-52 115 115-52 52ZM254-655 139-770l51-51 115 115-51 51Z"/></svg>
|
After Width: | Height: | Size: 523 B |
1
hypr-configs/hyprland/eww/image/weather/fog.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg fill = "#ffffff" xmlns="http://www.w3.org/2000/svg" height="48" viewBox="0 -960 960 960" width="48"><path d="M160-204q-14.775 0-25.387-10.658Q124-225.316 124-240.158T134.613-266q10.612-11 25.387-11h400q15.2 0 26.1 10.95 10.9 10.951 10.9 26.225 0 14.85-10.9 25.337Q575.2-204 560-204H160Zm560 0q-14.775 0-25.388-10.658Q684-225.316 684-240.158T694.612-266q10.613-11 25.388-11h80q15.2 0 26.1 10.95 10.9 10.951 10.9 26.225 0 14.85-10.9 25.337Q815.2-204 800-204h-80ZM160-364q-14.775 0-25.387-10.658Q124-385.316 124-400.158T134.613-426q10.612-11 25.387-11h80q15.2 0 26.1 10.95 10.9 10.951 10.9 26.225 0 14.85-10.9 25.338Q255.2-364 240-364h-80Zm240 0q-14.775 0-25.388-10.658Q364-385.316 364-400.158T374.612-426q10.613-11 25.388-11h400q15.2 0 26.1 10.95 10.9 10.951 10.9 26.225 0 14.85-10.9 25.338Q815.2-364 800-364H400ZM160-524q-14.775 0-25.387-10.658Q124-545.316 124-560.158T134.613-586q10.612-11 25.387-11h440q15.2 0 26.1 10.95 10.9 10.951 10.9 26.225 0 14.85-10.9 25.338Q615.2-524 600-524H160Zm600 0q-14.775 0-25.388-10.658Q724-545.316 724-560.158T734.612-586q10.613-11 25.388-11h40q15.2 0 26.1 10.95 10.9 10.951 10.9 26.225 0 14.85-10.9 25.338Q815.2-524 800-524h-40ZM160-684q-14.775 0-25.387-10.658Q124-705.316 124-720.158T134.613-746q10.612-11 25.387-11h200q15.2 0 26.1 10.95 10.9 10.951 10.9 26.225 0 14.85-10.9 25.338Q375.2-684 360-684H160Zm360 0q-14.775 0-25.388-10.658Q484-705.316 484-720.158T494.612-746q10.613-11 25.388-11h280q15.2 0 26.1 10.95 10.9 10.951 10.9 26.225 0 14.85-10.9 25.338Q815.2-684 800-684H520Z"/></svg>
|
After Width: | Height: | Size: 1.5 KiB |
7
hypr-configs/hyprland/eww/image/weather/idk.svg
Normal file
|
@ -0,0 +1,7 @@
|
|||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Transformed by: SVG Repo Mixer Tools -->
|
||||
<svg fill="#ffffff" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="800px" height="800px" viewBox="0 0 973.1 973.1" xml:space="preserve">
|
||||
<g id="SVGRepo_bgCarrier" stroke-width="0"/>
|
||||
<g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<g id="SVGRepo_iconCarrier"> <g> <path d="M502.29,788.199h-47c-33.1,0-60,26.9-60,60v64.9c0,33.1,26.9,60,60,60h47c33.101,0,60-26.9,60-60v-64.9 C562.29,815,535.391,788.199,502.29,788.199z"/> <path d="M170.89,285.8l86.7,10.8c27.5,3.4,53.6-12.4,63.5-38.3c12.5-32.7,29.9-58.5,52.2-77.3c31.601-26.6,70.9-40,117.9-40 c48.7,0,87.5,12.8,116.3,38.3c28.8,25.6,43.1,56.2,43.1,92.1c0,25.8-8.1,49.4-24.3,70.8c-10.5,13.6-42.8,42.2-96.7,85.9 c-54,43.7-89.899,83.099-107.899,118.099c-18.4,35.801-24.8,75.5-26.4,115.301c-1.399,34.1,25.8,62.5,60,62.5h49 c31.2,0,57-23.9,59.8-54.9c2-22.299,5.7-39.199,11.301-50.699c9.399-19.701,33.699-45.701,72.699-78.1 C723.59,477.8,772.79,428.4,795.891,392c23-36.3,34.6-74.8,34.6-115.5c0-73.5-31.3-138-94-193.4c-62.6-55.4-147-83.1-253-83.1 c-100.8,0-182.1,27.3-244.1,82c-52.8,46.6-84.9,101.8-96.2,165.5C139.69,266.1,152.39,283.5,170.89,285.8z"/> </g> </g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.4 KiB |
1
hypr-configs/hyprland/eww/image/weather/rain-light.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg fill = "#ffffff" xmlns="http://www.w3.org/2000/svg" height="48" viewBox="0 -960 960 960" width="48"><path d="M194-493q-14 8-28.5 3.5T145-508L48-703q-7-14-3-28.5T63-753q14-6 28.5-2t21.5 18l97 195q6 14 1.5 28.5T194-493Zm142 285q-14 8-28 2.5T287-225l-77-155q-7-13-2-27t19-21q13-6 27-2t21 18l78 155q6 14 1.5 28T336-208Zm80-205q-14 8-28.5 3.5T367-428L229-703q-6-14-2-28.5t18-21.5q14-6 28-2t22 18l137 275q6 14 1.5 28.5T416-413Zm87-200q-14 8-28.5 3.5T453-628l-37-77q-6-13-2-27t18-21q14-6 28-2t21 18l38 75q6 14 2 28t-18 21Zm25 405q-14 8-28 2.5T479-225l-37-75q-7-13-2.5-27t18.5-21q13-6 27.5-1.5T507-331l38 74q6 14 1.5 27.5T528-208Zm188 0q-14 8-28.5 2.5T666-225L528-500q-6-13-1.5-27t18.5-21q14-6 27.5-2t21.5 18l137 275q6 14 2 28t-17 21Zm58-245q-14 8-28 2.5T725-470L607-705q-6-13-2-27t18-21q14-6 28-2t22 18l117 235q6 14 1.5 28.5T774-453Zm122 245q-14 8-28 2.5T847-225l-57-115q-7-13-2.5-27t18.5-21q13-6 27.5-2t21.5 18l58 115q6 14 1.5 28.5T896-208Z"/></svg>
|
After Width: | Height: | Size: 949 B |
1
hypr-configs/hyprland/eww/image/weather/rain.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg fill = "#ffffff" xmlns="http://www.w3.org/2000/svg" height="48" viewBox="0 -960 960 960" width="48"><path d="M561-77q-14 6-29 1.5T511-94l-69-138q-6-14-2-29t18-21q14-6 29-1.5t21 18.5l69 138q6 14 2 29t-18 21Zm240-1q-14 6-29 1.5T751-95l-69-138q-6-14-2-29t18-21q14-6 29-1.5t21 18.5l69 138q6 14 2 29t-18 21Zm-480 0q-14 6-29 2t-21-18l-69-138q-6-14-1.5-29t18.5-21q14-6 29-2t21 18l69 139q6 14 1.5 28.5T321-78Zm-31-261q-89 0-152.5-63.5T74-555q0-81 57-144t142-71q33-57 86.5-89.5T480-892q91 0 154 58t80 143q79 6 126 56.5T887-515q0 73-51.5 124.5T710-339H290Z"/></svg>
|
After Width: | Height: | Size: 561 B |
1
hypr-configs/hyprland/eww/image/weather/snow.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg fill = "#ffffff" xmlns="http://www.w3.org/2000/svg" height="48" viewBox="0 -960 960 960" width="48"><path d="M259.859-204q-19.379 0-32.619-13.369Q214-230.737 214-250.099q0-19.361 13.369-33.131Q240.737-297 260.099-297q19.361 0 33.131 13.671t13.77 33.47q0 19.379-13.671 32.619Q279.658-204 259.859-204Zm120 153q-19.379 0-32.619-13.369Q334-77.737 334-97.099q0-19.361 13.369-33.131Q360.737-144 380.099-144q19.361 0 33.131 13.671T427-96.859q0 19.379-13.671 32.619Q399.658-51 379.859-51Zm120-153q-19.379 0-32.619-13.369Q454-230.737 454-250.099q0-19.361 13.369-33.131Q480.737-297 500.099-297q19.361 0 33.131 13.671t13.77 33.47q0 19.379-13.671 32.619Q519.658-204 499.859-204Zm240 0q-19.379 0-32.619-13.369Q694-230.737 694-250.099q0-19.361 13.369-33.131Q720.737-297 740.099-297q19.361 0 33.131 13.671t13.77 33.47q0 19.379-13.671 32.619Q759.658-204 739.859-204Zm-120 153q-19.379 0-32.619-13.369Q574-77.737 574-97.099q0-19.361 13.369-33.131Q600.737-144 620.099-144q19.361 0 33.131 13.671T667-96.859q0 19.379-13.671 32.619Q639.658-51 619.859-51ZM290-379q-88.864 0-152.432-63.52Q74-506.04 74-594.835 74-676 131-739q57-63 142-71 33-57 86.5-89.5T480.423-932q90.366 0 153.472 58Q697-816 714-731q79 6 126 56.358 47 50.359 47 118.806 0 74.253-51.625 125.544Q783.75-379 710-379H290Z"/></svg>
|
After Width: | Height: | Size: 1.2 KiB |
1
hypr-configs/hyprland/eww/image/weather/storm.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg fill = "#ffffff" xmlns="http://www.w3.org/2000/svg" height="48" viewBox="0 -960 960 960" width="48"><path d="m479-4 94-107-80-40 109-126h71l-95 108 80 40L549-4h-70ZM238-4l95-107-80-40 109-126h71l-95 108 80 40L309-4h-71Zm52-335q-89 0-152.5-63.5T74-555q0-81 57-144t142-71q33-57 86.5-89.5T480-892q91 0 154 58t80 143q79 6 126 56.5T887-515q0 73-51.5 124.5T710-339H290Z"/></svg>
|
After Width: | Height: | Size: 378 B |
36
hypr-configs/hyprland/eww/notification/notification.scss
Normal file
|
@ -0,0 +1,36 @@
|
|||
|
||||
.notifbox {
|
||||
background-color: $surface1;
|
||||
border-radius: 5px;
|
||||
padding: 5px;
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
.notiftitle {
|
||||
font-size: 18px;
|
||||
color: $white0;
|
||||
}
|
||||
|
||||
.notifbody {
|
||||
font-size: 15px;
|
||||
color: $white0;
|
||||
}
|
||||
|
||||
.notifclose {
|
||||
font-family: "Symbols Nerd Font";
|
||||
font-size: 25px;
|
||||
min-width: 1em;
|
||||
min-height: 1em;
|
||||
color: $red;
|
||||
}
|
||||
|
||||
.notiflabel {
|
||||
font-size: 18px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.notifactions {
|
||||
font-size: 15px;
|
||||
margin: 5px;
|
||||
color: $white0;
|
||||
}
|
90
hypr-configs/hyprland/eww/notification/notification.yuck
Normal file
|
@ -0,0 +1,90 @@
|
|||
|
||||
(defwindow notifypopup
|
||||
:geometry (geometry
|
||||
:x 0
|
||||
:y 0
|
||||
:width 480
|
||||
:height 0
|
||||
:anchor "top right")
|
||||
:stacking "overlay"
|
||||
:monitor 0
|
||||
(revealer
|
||||
:reveal { arraylength(notifications.popups) > 0 }
|
||||
:transition "slidedown"
|
||||
(box
|
||||
:orientation "v"
|
||||
:space-evenly false
|
||||
:spacing 5
|
||||
(for noti in {notifications.popups}
|
||||
(singlenotif :noti noti :initial true)))))
|
||||
|
||||
(defwidget singlenotif [noti initial]
|
||||
(box
|
||||
:orientation "v"
|
||||
:class "${initial ? 'popup' : 'notifbox'}"
|
||||
:space-evenly false
|
||||
|
||||
(centerbox
|
||||
:orientation "h"
|
||||
:class "notifbar"
|
||||
(image :halign "start" :image-width 30 :image-height 30 :path {noti.icon != "null" ? noti.icon : "./image/idk.svg"})
|
||||
(scroll
|
||||
:halign "center"
|
||||
:valign "center"
|
||||
:hexpand true
|
||||
:hscroll true
|
||||
:vscroll false
|
||||
:width 200
|
||||
(label
|
||||
:class "notiflabel"
|
||||
:text {noti.app}))
|
||||
(button
|
||||
:halign "end"
|
||||
:onclick "./scripts/notifManage --close ${noti.id}"
|
||||
(label
|
||||
:class "notifclose"
|
||||
:text "")))
|
||||
|
||||
(box
|
||||
:orientation "h"
|
||||
:halign "fill"
|
||||
:height 80
|
||||
:space-evenly false
|
||||
:spacing 10
|
||||
(image :image-width 80 :image-height 80 :visible {noti.image != "null"} :path {noti.image != "null" ? noti.image : "./image/idk.svg"})
|
||||
|
||||
(button
|
||||
:onclick "./scripts/notifManage --dismiss ${noti.id}"
|
||||
:onrightclick "./scripts/notifManage --close ${noti.id}"
|
||||
:tooltip "${noti.time}"
|
||||
:hexpand true
|
||||
:vexpand true
|
||||
(box
|
||||
:orientation "v"
|
||||
:space-evenly false
|
||||
:valign "center"
|
||||
(scroll
|
||||
:hscroll true
|
||||
:vscroll false
|
||||
:hexpand true
|
||||
(label
|
||||
:class "notiftitle"
|
||||
:text {noti.summary}))
|
||||
(scroll
|
||||
:hscroll true
|
||||
:vscroll false
|
||||
:hexpand true
|
||||
(label
|
||||
:class "notifbody"
|
||||
:visible {noti.body != "null"}
|
||||
:text {noti.body})))))
|
||||
|
||||
(box
|
||||
:orientation "h"
|
||||
(for action in {noti.actions}
|
||||
(button
|
||||
:onclick "./scripts/notifManage --action ${noti.id} ${action[0]} && ./scripts/notifManage --close ${noti.id}"
|
||||
(label
|
||||
:class "notifactions"
|
||||
:text {action[1]}))
|
||||
))))
|
|
@ -1,12 +0,0 @@
|
|||
|
||||
.notifications {
|
||||
background-color: $bg;
|
||||
color: $fg-alt;
|
||||
margin: 1rem;
|
||||
border-radius: .4rem;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 1.5rem;
|
||||
color: $fg;
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
(defwidget notifications []
|
||||
(box
|
||||
:class "notifications"
|
||||
(box
|
||||
:class "title"
|
||||
:space-evenly false
|
||||
:valign "start"
|
||||
:halign "center"
|
||||
(label :text "Notifications")
|
||||
)
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
(defwindow notifications
|
||||
:monitor 0
|
||||
:geometry (geometry :x "1%"
|
||||
:y "0%"
|
||||
:height "75%"
|
||||
:width "25%"
|
||||
:anchor "center left")
|
||||
:reserve (struts :side "top" :distance "4%")
|
||||
(notifications))
|
|
@ -1,90 +0,0 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import glob
|
||||
import sys
|
||||
import os
|
||||
import json
|
||||
import subprocess
|
||||
import gi
|
||||
|
||||
gi.require_version("Gtk", "3.0")
|
||||
|
||||
from gi.repository import Gtk
|
||||
from configparser import ConfigParser
|
||||
|
||||
cache_file = os.path.expandvars("$XDG_CACHE_HOME/apps.json")
|
||||
|
||||
def get_gtk_icon(icon_name):
|
||||
theme = Gtk.IconTheme.get_default()
|
||||
icon_info = theme.lookup_icon(icon_name, 128, 0)
|
||||
|
||||
if icon_info is not None:
|
||||
return icon_info.get_filename()
|
||||
|
||||
def get_desktop_entries(query=None):
|
||||
desktop_files = glob.glob(os.path.join("/usr/share/applications", "*.desktop"))
|
||||
entries = []
|
||||
|
||||
for file_path in desktop_files:
|
||||
parser = ConfigParser()
|
||||
parser.read(file_path)
|
||||
|
||||
if parser.getboolean("Desktop Entry", "NoDisplay", fallback=False):
|
||||
continue # Skip entries with NoDisplay=true
|
||||
|
||||
app_name = parser.get("Desktop Entry", "Name")
|
||||
icon_path = get_gtk_icon(parser.get("Desktop Entry", "Icon", fallback=""))
|
||||
comment = parser.get("Desktop Entry", "Comment", fallback="")
|
||||
|
||||
entry = {
|
||||
"name": app_name,
|
||||
"icon": icon_path,
|
||||
"comment": comment,
|
||||
"desktop": os.path.basename(file_path),
|
||||
}
|
||||
entries.append(entry)
|
||||
return entries
|
||||
|
||||
def update_cache(entries):
|
||||
with open(cache_file, "w") as file:
|
||||
file.write(json.dumps(entries, indent=2))
|
||||
|
||||
def get_cached_entries():
|
||||
if os.path.exists(cache_file):
|
||||
with open(cache_file, "r") as file:
|
||||
content = file.read().strip()
|
||||
if content:
|
||||
try:
|
||||
return json.loads(content)
|
||||
except json.JSONDecodeError:
|
||||
pass
|
||||
|
||||
entries = get_desktop_entries()
|
||||
update_cache(entries)
|
||||
return entries
|
||||
|
||||
def filter_entries(entries, query):
|
||||
filtered_data = [
|
||||
entry for entry in entries
|
||||
if query.lower() in entry["name"].lower()
|
||||
or (entry["comment"] and query.lower() in entry["comment"].lower())
|
||||
]
|
||||
return filtered_data
|
||||
|
||||
def update_eww(entries):
|
||||
update = ["eww", "update", "apps={}".format(json.dumps(entries))]
|
||||
subprocess.run(update)
|
||||
|
||||
if __name__ == "__main__":
|
||||
if len(sys.argv) > 2 and sys.argv[1] == "--query":
|
||||
query = sys.argv[2]
|
||||
else:
|
||||
query = None
|
||||
|
||||
entries = get_cached_entries()
|
||||
|
||||
if query is not None:
|
||||
filtered = filter_entries(entries, query)
|
||||
update_eww(filtered)
|
||||
else:
|
||||
update_eww(entries)
|
|
@ -1,30 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
current_brightness=1.0
|
||||
|
||||
function set_brightness() {
|
||||
gdbus call -e -d de.mherzberg -o /de/mherzberg/wlrbrightness -m de.mherzberg.wlrbrightness.set $1 &> /dev/null
|
||||
}
|
||||
|
||||
echo "Ajuste o brilho com o scroll do mouse."
|
||||
echo "Gire o scroll para cima para aumentar o brilho e para baixo para diminuir."
|
||||
echo "Pressione Ctrl+C para sair."
|
||||
|
||||
while true; do
|
||||
read -r -n 1 scroll
|
||||
if [[ "$scroll" == $'\x1b[A' ]]; then
|
||||
# Scroll para cima
|
||||
current_brightness=$(echo "$current_brightness + 0.1" | bc)
|
||||
if (( $(echo "$current_brightness > 1.0" | bc -l) )); then
|
||||
current_brightness=1.0
|
||||
fi
|
||||
sudo bash -c "set_brightness $current_brightness"
|
||||
elif [[ "$scroll" == $'\x1b[B' ]]; then
|
||||
# Scroll para baixo
|
||||
current_brightness=$(echo "$current_brightness - 0.1" | bc)
|
||||
if (( $(echo "$current_brightness < 0.0" | bc -l) )); then
|
||||
current_brightness=0.0
|
||||
fi
|
||||
sudo bash -c "set_brightness $current_brightness"
|
||||
fi
|
||||
done
|
12
hypr-configs/hyprland/eww/scripts/cava_config
Normal file
|
@ -0,0 +1,12 @@
|
|||
[general]
|
||||
|
||||
framerate = 20
|
||||
bars = 30
|
||||
|
||||
[output]
|
||||
|
||||
method = raw
|
||||
raw_target = /dev/stdout
|
||||
data_format = ascii
|
||||
bit_format = 8bit
|
||||
ascii_max_range = 100
|
5
hypr-configs/hyprland/eww/scripts/cava_pipe.sh
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/bin/bash
|
||||
confPath="$HOME/.config/eww/carbonmonoxide/scripts/cava_config"
|
||||
|
||||
# Main
|
||||
cava -p $confPath | while read -r line; do echo $line| sed -e 's/;/,/g'; done | while read -r line; do echo "["`echo ${line/%?/}`"]"; done
|
|
@ -1,26 +0,0 @@
|
|||
#!/usr/bin/bash
|
||||
|
||||
if [[ $1 == "--name" ]]; then
|
||||
fullname=$(getent passwd "$(whoami)" | cut -d ':' -f 5 | cut -d ',' -f 1 | tr -d "\n")
|
||||
if [ -z "$fullname" ]; then
|
||||
echo "$(whoami)@$(hostnamectl | awk 'FNR==1 {print $3}')"
|
||||
else
|
||||
echo "$fullname"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ $1 == "--kernel" ]]; then
|
||||
echo "$(uname -r)"
|
||||
fi
|
||||
|
||||
if [[ $1 == "--os" ]]; then
|
||||
echo "$(cat /etc/os-release | awk 'NR==1' | awk -F '"' '{print $2}')"
|
||||
fi
|
||||
|
||||
if [[ $1 == "--pkgs" ]]; then
|
||||
echo "$(yay -Q | wc -l)"
|
||||
fi
|
||||
|
||||
if [[ $1 == "--wm" ]]; then
|
||||
echo "$XDG_CURRENT_DESKTOP"
|
||||
fi
|
16
hypr-configs/hyprland/eww/scripts/iconfetch.py
Executable file
|
@ -0,0 +1,16 @@
|
|||
#!/usr/bin/env python3
|
||||
import gi
|
||||
gi.require_version('Gtk', '3.0')
|
||||
from gi.repository import Gtk
|
||||
import sys
|
||||
|
||||
def fetch(icon_name):
|
||||
icon_theme = Gtk.IconTheme.get_default()
|
||||
icon = icon_theme.lookup_icon(icon_name, 48, 0)
|
||||
if icon:
|
||||
return icon.get_filename()
|
||||
else:
|
||||
return
|
||||
|
||||
if __name__ == "__main__":
|
||||
print(fetch(sys.argv[1]))
|
|
@ -1,242 +0,0 @@
|
|||
#!/usr/bin/bash
|
||||
|
||||
# ╔╦╗ ╦ ╦ ╔═╗ ╦ ╔═╗
|
||||
# ║║║ ║ ║ ╚═╗ ║ ║
|
||||
# ╩ ╩ ╚═╝ ╚═╝ ╩ ╚═╝
|
||||
|
||||
# author Niraj
|
||||
# github niraj998
|
||||
|
||||
# ┌─┐┌─┐┌┐┌┌─┐┬┌─┐┬ ┬┬─┐┌─┐┌┬┐┬┌─┐┌┐┌┌─┐
|
||||
# │ │ ││││├┤ ││ ┬│ │├┬┘├─┤ │ ││ ││││└─┐
|
||||
# └─┘└─┘┘└┘└ ┴└─┘└─┘┴└─┴ ┴ ┴ ┴└─┘┘└┘└─┘
|
||||
|
||||
# uncomment your music players below.
|
||||
#
|
||||
|
||||
[ -n "$(pgrep spotify)" ] && Control="spotify"
|
||||
#[ -n "$(pgrep firefox)" ] && Control="firefox"
|
||||
# [ -n "$(pgrep rhythmbox)" ] && Control="rhythmbox"
|
||||
# [ -n "$(pgrep audacious)" ] && Control="audacious"
|
||||
# [ -n "$(pgrep clementine)" ] && Control="clementine"
|
||||
# [ -n "$(pgrep strawberry)" ] && Control="strawberry"
|
||||
|
||||
# saves covers here
|
||||
Cover=/tmp/cover.png
|
||||
# if cover not found in metadata use this instead
|
||||
bkpCover=~/.config/bspwm/assets/fallback.webp
|
||||
|
||||
# ┌─┐┬ ┌─┐┬ ┬┌─┐┬─┐┌─┐┌┬┐┬ ┌─┐┌─┐┬─┐┬┌─┐┌┬┐┌─┐
|
||||
# ├─┘│ ├─┤└┬┘├┤ ├┬┘│ │ │ └─┐│ ├┬┘│├─┘ │ └─┐
|
||||
# ┴ ┴─┘┴ ┴ ┴ └─┘┴└─└─┘ ┴ ┴─┘ └─┘└─┘┴└─┴┴ ┴ └─┘
|
||||
|
||||
########################## Title ##########################
|
||||
title() {
|
||||
title=$(playerctl --player=$Control metadata --format {{title}})
|
||||
[ -z "$title" ] && title="Eagerly awaiting the music."
|
||||
echo "$title"
|
||||
}
|
||||
|
||||
########################## Artist ##########################
|
||||
artist() {
|
||||
artist=$(playerctl --player=$Control metadata --format {{artist}})
|
||||
[ -z "$artist" ] && artist="Artist"
|
||||
echo "$artist"
|
||||
}
|
||||
|
||||
########################## Album ##########################
|
||||
album() {
|
||||
album=$(playerctl --player=$Control metadata --format {{album}})
|
||||
[ -z "$album" ] && album="Album"
|
||||
echo "$album"
|
||||
}
|
||||
|
||||
########################## Status ##########################
|
||||
status() {
|
||||
status=$(playerctl --player=$Control status)
|
||||
[ -z "$status" ] && status="Stopped"
|
||||
echo "$status"
|
||||
}
|
||||
|
||||
########################## Time ##########################
|
||||
position() {
|
||||
time=$(playerctl --player=$Control position --format "{{ duration(position) }}")
|
||||
[ -z "$time" ] && time="0:00"
|
||||
echo "$time"
|
||||
}
|
||||
|
||||
positions() {
|
||||
position=$(playerctl --player=$Control metadata --format "{{ duration(position) }}")
|
||||
[ -z "$position" ] && position="0:00"
|
||||
time=$position
|
||||
if [[ $time == *:* ]]; then
|
||||
minutes=${time%%:*}
|
||||
seconds=${time#*:}
|
||||
seconds=$((${seconds#0}))
|
||||
else
|
||||
minutes=${time:0:1}
|
||||
seconds=${time:2:2}
|
||||
fi
|
||||
total_seconds=$((minutes * 60 + seconds))
|
||||
echo $total_seconds
|
||||
}
|
||||
|
||||
########################## Length ##########################
|
||||
length() {
|
||||
length=$(playerctl --player=$Control metadata --format "{{ duration(mpris:length) }}")
|
||||
[ -z "$length" ] && length="0:00"
|
||||
echo "$length"
|
||||
}
|
||||
|
||||
lengths() {
|
||||
length=$(playerctl --player=$Control metadata --format "{{ duration(mpris:length) }}")
|
||||
[ -z "$length" ] && length="0:00"
|
||||
time=$length
|
||||
if [[ $time == *:* ]]; then
|
||||
minutes=${time%%:*}
|
||||
seconds=${time#*:}
|
||||
seconds=$((${seconds#0}))
|
||||
else
|
||||
minutes=${time:0:1}
|
||||
seconds=${time:2:2}
|
||||
fi
|
||||
total_seconds=$((minutes * 60 + seconds))
|
||||
echo $total_seconds
|
||||
}
|
||||
|
||||
########################## trackNumber ##########################
|
||||
playlist() {
|
||||
playlist=$(playerctl --player=$Control metadata xesam:trackNumber)
|
||||
[ -z "$playlist" ] && playlist="0"
|
||||
echo "$playlist"
|
||||
}
|
||||
|
||||
########################## Cover ##########################
|
||||
cover() {
|
||||
albumart="$(playerctl --player=$Control metadata mpris:artUrl | sed -e 's/open.spotify.com/i.scdn.co/g')"
|
||||
[ $(playerctl --player=$Control metadata mpris:artUrl) ] && curl -s "$albumart" --output $Cover || cp $bkpCover $Cover
|
||||
echo "$Cover"
|
||||
}
|
||||
|
||||
########################## Statusicon ##########################
|
||||
statusicon() {
|
||||
icon=""
|
||||
[ $(playerctl --player=$Control status) = "Playing" ] && icon=""
|
||||
[ $(playerctl --player=$Control status) = "Paused" ] && icon=""
|
||||
echo "$icon"
|
||||
}
|
||||
|
||||
########################## Shuffle ##########################
|
||||
shufflecolor() {
|
||||
color="#a0a0a0"
|
||||
[ $(playerctl --player=$Control shuffle) = "On" ] && color="#9ec49f"
|
||||
[ $(playerctl --player=$Control shuffle) = "Off" ] && color"#a0a0a0"
|
||||
echo "$color"
|
||||
}
|
||||
|
||||
########################## Loop ##########################
|
||||
loopicon() {
|
||||
icon=" "
|
||||
[ $(playerctl --player=$Control loop) = "None" ] && icon=" "
|
||||
[ $(playerctl --player=$Control loop) = "Track" ] && icon" "
|
||||
[ $(playerctl --player=$Control loop) = "Playlist" ] && icon=" "
|
||||
echo "$icon"
|
||||
}
|
||||
|
||||
loopcheck() {
|
||||
command=$(playerctl -p spotify loop)
|
||||
|
||||
if [[ $command == "None" ]]; then
|
||||
playerctl -p spotify loop Playlist
|
||||
fi
|
||||
|
||||
if [[ $command == "Playlist" ]]; then
|
||||
playerctl -p spotify loop Track
|
||||
fi
|
||||
|
||||
if [[ $command == "Track" ]]; then
|
||||
playerctl -p spotify loop None
|
||||
fi
|
||||
}
|
||||
|
||||
loopcolor() {
|
||||
color="#9ec49f"
|
||||
[ $(playerctl --player=$Control loop) = "None" ] && color="#a0a0a0"
|
||||
[ $(playerctl --player=$Control loop) = "Track" ] && color"#9ec49f"
|
||||
[ $(playerctl --player=$Control loop) = "Playlist" ] && color"#9ec49f"
|
||||
echo "$color"
|
||||
}
|
||||
|
||||
########################## Lyrics ##########################
|
||||
lyrics() {
|
||||
Title=$(playerctl --player=$Control metadata --format {{title}})
|
||||
Artist=$(playerctl --player=$Control metadata --format {{artist}})
|
||||
URL="https://api.lyrics.ovh/v1/$Artist/$Title"
|
||||
lyrics=$(curl -s "$(echo "$URL" | sed s/" "/%20/g | sed s/"&"/%26/g | sed s/,/%2C/g | sed s/-/%2D/g)" | jq '.lyrics')
|
||||
[ "$lyrics" = "null" ] && lyrics=$(curl -s --get "https://makeitpersonal.co/lyrics" --data-urlencode "artist=$Artist" --data-urlencode "title=$Title")
|
||||
printf "$lyrics" | less
|
||||
}
|
||||
|
||||
# ┬ ┬┌─┐┬ ┌─┐
|
||||
# ├─┤├┤ │ ├─┘
|
||||
# ┴ ┴└─┘┴─┘┴
|
||||
|
||||
doc() {
|
||||
echo "Usage:
|
||||
MediaControl [Options]
|
||||
|
||||
Options:
|
||||
--previous previous song
|
||||
--next next song
|
||||
--toggle toggle between play-pause song
|
||||
--stop stop song
|
||||
--shuffle shuffle playlist
|
||||
--loop loop toggle
|
||||
title shows title of current song
|
||||
album shows album of current song
|
||||
artist shows artist of current song
|
||||
status music status (playing/paused/stopped)
|
||||
statusicon music status icons (playing/paused/stopped)
|
||||
shufflecolor huffle status color
|
||||
loopicon loop status icon
|
||||
loopcolor loop status color
|
||||
coverloc saves cover and shows location to cover of current song
|
||||
showcover opens cover using feh
|
||||
position shows current position of song
|
||||
positions shows current position of song in seconds
|
||||
length shows length of song
|
||||
lengths shows length of song in seconds
|
||||
playlist shows playlist position of current song
|
||||
lyrics shows lyrics"
|
||||
}
|
||||
|
||||
# ┌─┐┌─┐┌┬┐┬┌─┐┌┐┌┌─┐
|
||||
# │ │├─┘ │ ││ ││││└─┐
|
||||
# └─┘┴ ┴ ┴└─┘┘└┘└─┘
|
||||
|
||||
case $1 in
|
||||
--next) playerctl --player=$Control next ;;
|
||||
--previous) playerctl --player=$Control previous ;;
|
||||
--toggle) playerctl --player=$Control play-pause ;;
|
||||
--stop) playerctl --player=$Control stop ;;
|
||||
--shuffle) playerctl --player=$Control shuffle toggle ;;
|
||||
--loop) loopcheck ;;
|
||||
title) title ;;
|
||||
artist) artist ;;
|
||||
album) album ;;
|
||||
status) status ;;
|
||||
statusicon) statusicon ;;
|
||||
shufflecolor) shufflecolor ;;
|
||||
loopicon) loopicon ;;
|
||||
loopcolor) loopcolor ;;
|
||||
player) echo "$Control" ;;
|
||||
coverloc) cover ;;
|
||||
showcover) cover | xargs feh ;;
|
||||
position) position ;;
|
||||
positions) positions ;;
|
||||
length) length ;;
|
||||
lengths) lengths ;;
|
||||
playlist) playlist ;;
|
||||
lyrics) lyrics ;;
|
||||
*) doc ;;
|
||||
esac
|
150
hypr-configs/hyprland/eww/scripts/music_info
Executable file
|
@ -0,0 +1,150 @@
|
|||
#!/bin/bash
|
||||
|
||||
# got this script from adi1090x, I did not make this
|
||||
|
||||
## Get data
|
||||
STATUS="$(mpc status)"
|
||||
COVER="/tmp/.music_cover.jpg"
|
||||
MUSIC_DIR="$HOME/Music"
|
||||
|
||||
## Get status
|
||||
get_status() {
|
||||
if [[ $STATUS == *"[playing]"* ]]; then
|
||||
echo ""
|
||||
else
|
||||
echo ""
|
||||
fi
|
||||
}
|
||||
|
||||
poll() {
|
||||
while [[ 1 == 1 ]]; do
|
||||
STATUS="$(mpc status)"
|
||||
if [[ -z $STATUS ]]; then
|
||||
sleep 30
|
||||
fi
|
||||
$1
|
||||
mpc idle >/dev/null
|
||||
done
|
||||
}
|
||||
|
||||
## Get song
|
||||
get_song() {
|
||||
song=$(mpc -f %title% current)
|
||||
if [[ -z "$song" ]]; then
|
||||
echo "Offline"
|
||||
else
|
||||
echo "$song"
|
||||
fi
|
||||
}
|
||||
|
||||
## Get artist
|
||||
get_artist() {
|
||||
artist=$(mpc -f %artist% current)
|
||||
if [[ -z "$artist" ]]; then
|
||||
echo "Offline"
|
||||
else
|
||||
echo "$artist"
|
||||
fi
|
||||
}
|
||||
|
||||
## Get time
|
||||
get_time() {
|
||||
time=$(mpc status | grep "%)" | awk '{print $4}' | tr -d '(%)')
|
||||
if [[ -z "$time" ]]; then
|
||||
echo "0"
|
||||
else
|
||||
echo "$time"
|
||||
fi
|
||||
}
|
||||
get_ctime() {
|
||||
ctime=$(mpc status | grep "#" | awk '{print $3}' | sed 's|/.*||g')
|
||||
if [[ -z "$ctime" ]]; then
|
||||
echo "0:00"
|
||||
else
|
||||
echo "$ctime"
|
||||
fi
|
||||
}
|
||||
get_ttime() {
|
||||
ttime=$(mpc -f %time% current)
|
||||
if [[ -z "$ttime" ]]; then
|
||||
echo "0:00"
|
||||
else
|
||||
echo "$ttime"
|
||||
fi
|
||||
}
|
||||
|
||||
## Get cover
|
||||
get_cover() {
|
||||
ffmpeg -i "${MUSIC_DIR}/$(mpc current -f %file%)" "${COVER}" -y &>/dev/null
|
||||
STATUS=$?
|
||||
|
||||
# Check if the file has a embbeded album art
|
||||
if [ "$STATUS" -eq 0 ]; then
|
||||
echo "$COVER"
|
||||
else
|
||||
echo "image/emptympd.png"
|
||||
fi
|
||||
}
|
||||
|
||||
get_volume() {
|
||||
# gotta get rid of spaces lol
|
||||
vol=$(mpc status "%volume%" | awk '{print $1}' | tr -d '%')
|
||||
if [[ -z "$vol" ]]; then
|
||||
echo "0"
|
||||
else
|
||||
echo "$vol"
|
||||
fi
|
||||
}
|
||||
|
||||
get_random() {
|
||||
random=$(mpc status "%random%")
|
||||
if [[ -z "$random" ]]; then
|
||||
echo "no"
|
||||
else
|
||||
echo "$random"
|
||||
fi
|
||||
}
|
||||
|
||||
get_single() {
|
||||
single=$(mpc status "%single%")
|
||||
if [[ -z "$single" ]]; then
|
||||
echo "no"
|
||||
else
|
||||
echo "$single"
|
||||
fi
|
||||
}
|
||||
|
||||
## Execute accordingly
|
||||
if [[ "$1" == "--song" ]]; then
|
||||
poll get_song
|
||||
elif [[ "$1" == "--artist" ]]; then
|
||||
poll get_artist
|
||||
elif [[ "$1" == "--status" ]]; then
|
||||
poll get_status
|
||||
elif [[ "$1" == "--time" ]]; then
|
||||
get_time
|
||||
elif [[ "$1" == "--ctime" ]]; then
|
||||
get_ctime
|
||||
elif [[ "$1" == "--ttime" ]]; then
|
||||
get_ttime
|
||||
elif [[ "$1" == "--cover" ]]; then
|
||||
poll get_cover
|
||||
elif [[ "$1" == "--volume" ]]; then
|
||||
poll get_volume
|
||||
elif [[ "$1" == "--single" ]]; then
|
||||
poll get_single
|
||||
elif [[ "$1" == "--random" ]]; then
|
||||
poll get_random
|
||||
elif [[ "$1" == "--toggle" ]]; then
|
||||
mpc -q toggle
|
||||
elif [[ "$1" == "--next" ]]; then
|
||||
{
|
||||
mpc -q next
|
||||
get_cover
|
||||
}
|
||||
elif [[ "$1" == "--prev" ]]; then
|
||||
{
|
||||
mpc -q prev
|
||||
get_cover
|
||||
}
|
||||
fi
|
|
@ -1,20 +0,0 @@
|
|||
#!/bin/bash
|
||||
# thanks to Luke Smith
|
||||
|
||||
update() {
|
||||
sum=0
|
||||
for arg; do
|
||||
read -r i <"$arg"
|
||||
sum=$((sum + i))
|
||||
done
|
||||
cache=${XDG_CACHE_HOME:-$HOME/.cache}/${1##*/}
|
||||
[ -f "$cache" ] && read -r old <"$cache" || old=0
|
||||
printf %d\\n "$sum" >"$cache"
|
||||
printf %d\\n $((sum - old))
|
||||
}
|
||||
|
||||
tx=$(update /sys/class/net/enp4s0/statistics/tx_bytes)
|
||||
rx=$(update /sys/class/net/enp4s0/statistics/rx_bytes)
|
||||
|
||||
[ "$1" = "down" ] && printf "%4sB\\n" $(numfmt --to=iec $rx) && exit
|
||||
[ "$1" = "up" ] && printf "%4sB\\n" $(numfmt --to=iec $tx) && exit
|
|
@ -1,34 +0,0 @@
|
|||
#!/usr/bin/bash
|
||||
|
||||
ID="$(ip link | awk '/state UP/ {print $2}')"
|
||||
NAME="$(ip link | awk '/state UP/ {print $2}' | cut -c 1-6)"
|
||||
|
||||
net_stat() {
|
||||
if (ping -c 1 archlinux.org || ping -c 1 google.com) &>/dev/null; then
|
||||
if [[ $ID == e* ]]; then
|
||||
echo " "
|
||||
fi
|
||||
else
|
||||
echo " "
|
||||
fi
|
||||
}
|
||||
|
||||
net_color() {
|
||||
if (ping -c 1 archlinux.org || ping -c 1 google.com) &>/dev/null; then
|
||||
echo "#A39EC4"
|
||||
else
|
||||
echo "#dd6777"
|
||||
fi
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
stat)
|
||||
net_stat | head -n1
|
||||
;;
|
||||
icon)
|
||||
net_stat | tail -n1
|
||||
;;
|
||||
color)
|
||||
net_color
|
||||
;;
|
||||
esac
|
254
hypr-configs/hyprland/eww/scripts/notifCatch
Executable file
|
@ -0,0 +1,254 @@
|
|||
#!/usr/bin/python
|
||||
|
||||
# juminai @ github
|
||||
|
||||
import gi
|
||||
import datetime
|
||||
import os
|
||||
import typing
|
||||
import sys
|
||||
import json
|
||||
import subprocess
|
||||
import dbus
|
||||
import dbus.service
|
||||
from iconfetch import fetch
|
||||
|
||||
gi.require_version("GdkPixbuf", "2.0")
|
||||
gi.require_version("Gtk", "3.0")
|
||||
|
||||
from dbus.mainloop.glib import DBusGMainLoop
|
||||
from gi.repository import GLib
|
||||
from gi.repository import Gtk, GdkPixbuf
|
||||
from html.parser import HTMLParser
|
||||
|
||||
# Taken from Juminai (and slightly modified)
|
||||
# Hi I'm Failed and I just stole this from tokyobot
|
||||
|
||||
log_file = os.path.expandvars("/tmp/eww/notifications.json")
|
||||
cache_dir = os.path.expandvars("/tmp/eww/notifications_img")
|
||||
eww_dir = os.getcwd()
|
||||
|
||||
os.makedirs(cache_dir, exist_ok=True)
|
||||
|
||||
active_popups = {}
|
||||
|
||||
def clean_text(text):
|
||||
class HTMLTagStripper(HTMLParser):
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self.reset()
|
||||
self.strict = False
|
||||
self.convert_charrefs = True
|
||||
self.text = []
|
||||
|
||||
def handle_data(self, data):
|
||||
self.text.append(data)
|
||||
|
||||
def get_text(self):
|
||||
return "".join(self.text)
|
||||
|
||||
stripper = HTMLTagStripper()
|
||||
stripper.feed(text)
|
||||
text = stripper.get_text()
|
||||
|
||||
return text.strip()
|
||||
|
||||
class NotificationDaemon(dbus.service.Object):
|
||||
def __init__(self):
|
||||
bus_name = dbus.service.BusName("org.freedesktop.Notifications", dbus.SessionBus())
|
||||
dbus.service.Object.__init__(self, bus_name, "/org/freedesktop/Notifications")
|
||||
self.dnd = self.read_log_file()["dnd"]
|
||||
|
||||
@dbus.service.method("org.freedesktop.Notifications", in_signature="susssasa{sv}i", out_signature="u")
|
||||
def Notify(self, app_name, replaces_id, app_icon, summary, body, actions, hints, expire_timeout):
|
||||
command = "zsh /home/$(whoami)/.config/eww/scripts/notifClose > /dev/null 2>&1 & "
|
||||
subprocess.run(command, shell=True)
|
||||
|
||||
if int(replaces_id) != 0:
|
||||
id = int(replaces_id)
|
||||
else:
|
||||
log_data = self.read_log_file()
|
||||
notifications = log_data.get('notifications', [])
|
||||
|
||||
if notifications:
|
||||
id = notifications[0]['id'] + 1
|
||||
else:
|
||||
id = 1
|
||||
|
||||
actions = list(actions)
|
||||
acts = [[str(actions[i]), str(actions[i + 1])] for i in range(0, len(actions), 2)]
|
||||
|
||||
details = {
|
||||
"id": id,
|
||||
"app": app_name or None,
|
||||
"summary": clean_text(summary) or None,
|
||||
"body": clean_text(body) or None,
|
||||
"time": datetime.datetime.now().strftime("%H:%M"),
|
||||
"actions": acts,
|
||||
"icon": fetch(app_name)
|
||||
}
|
||||
|
||||
if app_icon.strip():
|
||||
if os.path.isfile(app_icon) or app_icon.startswith("file://"):
|
||||
details["image"] = app_icon
|
||||
else:
|
||||
details["image"] = self.get_gtk_icon(app_icon)
|
||||
else:
|
||||
details["image"] = None
|
||||
|
||||
if "image-data" in hints:
|
||||
details["image"] = f"{cache_dir}/{details['id']}.png"
|
||||
self.save_img_byte(hints["image-data"], details["image"])
|
||||
|
||||
self.save_notification(details)
|
||||
if not self.dnd:
|
||||
self.save_popup(details)
|
||||
return id
|
||||
|
||||
@dbus.service.method("org.freedesktop.Notifications", in_signature="", out_signature="ssss")
|
||||
def GetServerInformation(self):
|
||||
return ("eww notification daemon", "klyn", "1.0", "1.2")
|
||||
|
||||
@dbus.service.method("org.freedesktop.Notifications", in_signature="", out_signature="as")
|
||||
def GetCapabilities(self):
|
||||
return ('actions', 'body', 'icon-static', 'persistence')
|
||||
|
||||
@dbus.service.signal("org.freedesktop.Notifications", signature="us")
|
||||
def ActionInvoked(self, id, action):
|
||||
return (id, action)
|
||||
|
||||
@dbus.service.method("org.freedesktop.Notifications", in_signature="us", out_signature="")
|
||||
def InvokeAction(self, id, action):
|
||||
self.ActionInvoked(id, action)
|
||||
|
||||
@dbus.service.signal("org.freedesktop.Notifications", signature="uu")
|
||||
def NotificationClosed(self, id, reason):
|
||||
return (id, reason)
|
||||
|
||||
@dbus.service.method("org.freedesktop.Notifications", in_signature="u", out_signature="")
|
||||
def CloseNotification(self, id):
|
||||
current = self.read_log_file()
|
||||
current["notifications"] = [n for n in current["notifications"] if n["id"] != id]
|
||||
current["count"] = len(current["notifications"])
|
||||
|
||||
self.write_log_file(current)
|
||||
self.NotificationClosed(id, 2)
|
||||
self.DismissPopup(id)
|
||||
|
||||
@dbus.service.method("org.freedesktop.Notifications", in_signature="", out_signature="")
|
||||
def ToggleDND(self):
|
||||
self.dnd = not self.dnd
|
||||
self.update_dnd_state()
|
||||
|
||||
@dbus.service.method("org.freedesktop.Notifications", in_signature="", out_signature="")
|
||||
def GetDNDState(self):
|
||||
return self.dnd
|
||||
|
||||
def update_dnd_state(self):
|
||||
current = self.read_log_file()
|
||||
current["dnd"] = self.dnd
|
||||
self.write_log_file(current)
|
||||
|
||||
|
||||
def get_gtk_icon(self, icon_name):
|
||||
theme = Gtk.IconTheme.get_default()
|
||||
icon_info = theme.lookup_icon(icon_name, 128, 0)
|
||||
|
||||
if icon_info is not None:
|
||||
return icon_info.get_filename()
|
||||
|
||||
|
||||
def save_img_byte(self, px_args: typing.Iterable, save_path: str):
|
||||
GdkPixbuf.Pixbuf.new_from_bytes(
|
||||
width=px_args[0],
|
||||
height=px_args[1],
|
||||
has_alpha=px_args[3],
|
||||
data=GLib.Bytes(px_args[6]),
|
||||
colorspace=GdkPixbuf.Colorspace.RGB,
|
||||
rowstride=px_args[2],
|
||||
bits_per_sample=px_args[4],
|
||||
).savev(save_path, "png")
|
||||
|
||||
|
||||
def write_log_file(self, data):
|
||||
output_json = json.dumps(data)
|
||||
print (output_json)
|
||||
subprocess.run(["eww", "-c", eww_dir, "update", f"notifications={output_json}"])
|
||||
|
||||
|
||||
with open(log_file, "w") as log:
|
||||
log.write(output_json)
|
||||
|
||||
|
||||
def read_log_file(self):
|
||||
try:
|
||||
with open(log_file, "r") as log:
|
||||
return json.load(log)
|
||||
except (FileNotFoundError, json.JSONDecodeError):
|
||||
with open(log_file, "w") as log:
|
||||
initial_data = {"count": 0, "dnd": False, "notifications": [], "popups": []}
|
||||
json.dump(initial_data, log)
|
||||
return initial_data
|
||||
|
||||
|
||||
|
||||
def save_notification(self, notification):
|
||||
current = self.read_log_file()
|
||||
current["notifications"].insert(0, notification)
|
||||
current["count"] = len(current["notifications"])
|
||||
|
||||
|
||||
self.write_log_file(current)
|
||||
|
||||
|
||||
@dbus.service.method("org.freedesktop.Notifications", in_signature="", out_signature="")
|
||||
def ClearAll(self):
|
||||
for notify in self.read_log_file()['notifications']:
|
||||
self.NotificationClosed(notify['id'], 2)
|
||||
empty = {"count": 0, "dnd": self.dnd, "notifications": [], "popups": []}
|
||||
|
||||
self.write_log_file(empty)
|
||||
|
||||
|
||||
def save_popup(self, notification):
|
||||
global active_popups
|
||||
|
||||
current = self.read_log_file()
|
||||
if len(current["popups"]) >= 3:
|
||||
oldest_popup = current["popups"].pop()
|
||||
self.DismissPopup(oldest_popup["id"])
|
||||
|
||||
current["popups"].insert(0, notification)
|
||||
self.write_log_file(current)
|
||||
|
||||
popup_id = notification["id"]
|
||||
active_popups[popup_id] = GLib.timeout_add_seconds(6, self.DismissPopup, popup_id)
|
||||
|
||||
|
||||
@dbus.service.method("org.freedesktop.Notifications", in_signature="u", out_signature="")
|
||||
def DismissPopup(self, id):
|
||||
global active_popups
|
||||
|
||||
current = self.read_log_file()
|
||||
current["popups"] = [n for n in current["popups"] if n["id"] != id]
|
||||
self.write_log_file(current)
|
||||
|
||||
active_popups.pop(id, None)
|
||||
|
||||
|
||||
@dbus.service.method("org.freedesktop.Notifications", in_signature="", out_signature="")
|
||||
def Listen(self):
|
||||
print(json.dumps(self.read_log_file))
|
||||
subprocess.run(["eww", "-c", eww_dir, "update", f"notifications={json.dumps(self.read_log_file())}"])
|
||||
|
||||
def main():
|
||||
DBusGMainLoop(set_as_default=True)
|
||||
loop = GLib.MainLoop()
|
||||
NotificationDaemon()
|
||||
try:
|
||||
loop.run()
|
||||
except KeyboardInterrupt:
|
||||
exit(0)
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
55
hypr-configs/hyprland/eww/scripts/notifManage
Executable file
|
@ -0,0 +1,55 @@
|
|||
#!/usr/bin/bash
|
||||
|
||||
# Taken from Juminai
|
||||
|
||||
dismiss() {
|
||||
dbus-send --session --type=method_call \
|
||||
--dest=org.freedesktop.Notifications \
|
||||
/org/freedesktop/Notifications \
|
||||
org.freedesktop.Notifications.DismissPopup \
|
||||
uint32:$1
|
||||
}
|
||||
|
||||
close() {
|
||||
dbus-send --session --type=method_call \
|
||||
--dest=org.freedesktop.Notifications \
|
||||
/org/freedesktop/Notifications \
|
||||
org.freedesktop.Notifications.CloseNotification \
|
||||
uint32:$1
|
||||
}
|
||||
|
||||
action() {
|
||||
dbus-send --session --type=method_call \
|
||||
--dest=org.freedesktop.Notifications \
|
||||
/org/freedesktop/Notifications \
|
||||
org.freedesktop.Notifications.InvokeAction \
|
||||
uint32:$1 string:$2
|
||||
}
|
||||
|
||||
clear_all() {
|
||||
dbus-send --session --type=method_call \
|
||||
--dest=org.freedesktop.Notifications \
|
||||
/org/freedesktop/Notifications \
|
||||
org.freedesktop.Notifications.ClearAll
|
||||
}
|
||||
|
||||
listen() {
|
||||
dbus-send --session --type=method_call \
|
||||
--dest=org.freedesktop.Notifications \
|
||||
/org/freedesktop/Notifications \
|
||||
org.freedesktop.Notifications.Listen
|
||||
}
|
||||
|
||||
toggle_dnd() {
|
||||
dbus-send --session --type=method_call \
|
||||
--dest=org.freedesktop.Notifications \
|
||||
/org/freedesktop/Notifications \
|
||||
org.freedesktop.Notifications.ToggleDND
|
||||
}
|
||||
|
||||
if [[ $1 == '--dismiss' ]]; then dismiss $2 $3; fi
|
||||
if [[ $1 == '--close' ]]; then close $2; fi
|
||||
if [[ $1 == '--action' ]]; then action $2 $3; fi
|
||||
if [[ $1 == '--clear' ]]; then clear_all; fi
|
||||
if [[ $1 == '--listen' ]]; then listen; fi
|
||||
if [[ $1 == '--toggle' ]]; then toggle_dnd; fi
|
3
hypr-configs/hyprland/eww/scripts/pollcover.sh
Executable file
|
@ -0,0 +1,3 @@
|
|||
playerctl metadata --format '{{ mpris:artUrl }}' -F | while read location; do
|
||||
echo $location | cut -c 8-
|
||||
done
|
91
hypr-configs/hyprland/eww/scripts/pop
Executable file
|
@ -0,0 +1,91 @@
|
|||
#!/bin/bash
|
||||
|
||||
# change this to your eww bin. Don't question mine
|
||||
EWW_BIN="$(which eww) -c $HOME/.config/eww/carbonmonoxide"
|
||||
# EWW_BIN="$HOME/Packages/eww/target/release/eww"
|
||||
|
||||
dashboard() {
|
||||
LOCK_FILE="$HOME/.config/eww-dashboard.lock"
|
||||
|
||||
run() {
|
||||
${EWW_BIN} open dashboard
|
||||
}
|
||||
|
||||
if [[ ! -f "$LOCK_FILE" ]]; then
|
||||
touch "$LOCK_FILE"
|
||||
run && echo "ok good!"
|
||||
else
|
||||
${EWW_BIN} close dashboard
|
||||
rm "$LOCK_FILE" && echo "closed"
|
||||
fi
|
||||
}
|
||||
|
||||
control() {
|
||||
LOCK_FILE="$HOME/.config/eww-control.lock"
|
||||
|
||||
run() {
|
||||
${EWW_BIN} open control_panel
|
||||
}
|
||||
|
||||
if [[ ! -f "$LOCK_FILE" ]]; then
|
||||
touch "$LOCK_FILE"
|
||||
run && echo "ok good!"
|
||||
else
|
||||
${EWW_BIN} close control_panel
|
||||
rm "$LOCK_FILE" && echo "closed"
|
||||
fi
|
||||
}
|
||||
|
||||
calendar() {
|
||||
LOCK_FILE="$HOME/.config/eww-calendar.lock"
|
||||
|
||||
run() {
|
||||
${EWW_BIN} open calendar
|
||||
}
|
||||
|
||||
if [[ ! -f "$LOCK_FILE" ]]; then
|
||||
touch "$LOCK_FILE"
|
||||
run && echo "ok good!"
|
||||
else
|
||||
${EWW_BIN} close calendar
|
||||
rm "$LOCK_FILE" && echo "closed"
|
||||
fi
|
||||
}
|
||||
|
||||
music() {
|
||||
LOCK_FILE="$HOME/.config/eww-music.lock"
|
||||
|
||||
run() {
|
||||
${EWW_BIN} open music
|
||||
}
|
||||
|
||||
if [[ ! -f "$LOCK_FILE" ]]; then
|
||||
touch "$LOCK_FILE"
|
||||
run && echo "ok good!"
|
||||
else
|
||||
${EWW_BIN} close music
|
||||
rm "$LOCK_FILE" && echo "closed"
|
||||
fi
|
||||
}
|
||||
|
||||
if [ "$1" = "calendar" ]; then
|
||||
calendar
|
||||
elif [ "$1" = "music" ]; then
|
||||
music
|
||||
elif [ "$1" = "control" ]; then
|
||||
control
|
||||
elif [ "$1" = "dashboard" ]; then
|
||||
dashboard
|
||||
elif [ "$1" = "colourpick" ]; then
|
||||
COLOUR=$(grim -g "$(slurp -p)" -t ppm - | convert - -format '%[pixel:p{0,0}]' txt:- | awk -F ' ' 'NR==2 {print $3}')
|
||||
wl-copy "$COLOUR"
|
||||
notify-send -a colourpicker -i ~/.config/eww/carbonmonoxide/image/eyedropper.png -t 3000 "$COLOUR" "Colour copied to clipboard"
|
||||
elif [ "$1" = "scrop" ]; then
|
||||
# control
|
||||
# sleep 0.5
|
||||
grim -g "$(slurp)" - | wl-copy
|
||||
notify-send -a screenshot -i ~/.config/eww/carbonmonoxide/image/screenshot.png -t 3000 "Screenshot Taken" "Image copied to clipboard"
|
||||
elif [ "$1" = "sscreen" ]; then
|
||||
# control
|
||||
grim - | wl-copy
|
||||
fi
|
|
@ -1,11 +0,0 @@
|
|||
#!/usr/bin/bash
|
||||
|
||||
open_updates() {
|
||||
$HOME/.config/eww/scripts/updates up
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
updates)
|
||||
open_updates
|
||||
;;
|
||||
esac
|
15
hypr-configs/hyprland/eww/scripts/quote.py
Executable file
|
@ -0,0 +1,15 @@
|
|||
#!/usr/bin/python3
|
||||
import requests
|
||||
import json
|
||||
|
||||
try:
|
||||
req = requests.get("https://api.quotable.io/random").text
|
||||
res = json.loads(req)
|
||||
except:
|
||||
res = {
|
||||
"content": "I can't get quotes, you are not online right now",
|
||||
"author": "quote widget"
|
||||
}
|
||||
# print(f"(box :valign 'fill' :vexpand true :orientation 'v' :space-evenly false (scroll :height 100 :width 300 :hscroll true :vscroll true (label :class 'quote' :text `\"{res['content']}\"` :wrap true :width 300)) (label :class 'quoteauthor' :text `- {res['author']}`))")
|
||||
print(json.dumps(res))
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
#!/usr/bin/bash
|
||||
|
||||
cd ~/ESA\ 2024/ && okular Edital.pdf Horário.pdf & gnome-clocks
|
112
hypr-configs/hyprland/eww/scripts/sys_info
Executable file
|
@ -0,0 +1,112 @@
|
|||
|
||||
#!/bin/bash
|
||||
|
||||
## Files and Data
|
||||
PREV_TOTAL=0
|
||||
PREV_IDLE=0
|
||||
cpuFile="/tmp/.cpu_usage"
|
||||
|
||||
## Get CPU usage
|
||||
get_cpu() {
|
||||
if [[ -f "${cpuFile}" ]]; then
|
||||
fileCont=$(cat "${cpuFile}")
|
||||
PREV_TOTAL=$(echo "${fileCont}" | head -n 1)
|
||||
PREV_IDLE=$(echo "${fileCont}" | tail -n 1)
|
||||
fi
|
||||
|
||||
CPU=(`cat /proc/stat | grep '^cpu '`) # Get the total CPU statistics.
|
||||
unset CPU[0] # Discard the "cpu" prefix.
|
||||
IDLE=${CPU[4]} # Get the idle CPU time.
|
||||
|
||||
# Calculate the total CPU time.
|
||||
TOTAL=0
|
||||
|
||||
for VALUE in "${CPU[@]:0:4}"; do
|
||||
let "TOTAL=$TOTAL+$VALUE"
|
||||
done
|
||||
|
||||
if [[ "${PREV_TOTAL}" != "" ]] && [[ "${PREV_IDLE}" != "" ]]; then
|
||||
# Calculate the CPU usage since we last checked.
|
||||
let "DIFF_IDLE=$IDLE-$PREV_IDLE"
|
||||
let "DIFF_TOTAL=$TOTAL-$PREV_TOTAL"
|
||||
let "DIFF_USAGE=(1000*($DIFF_TOTAL-$DIFF_IDLE)/$DIFF_TOTAL+5)/10"
|
||||
echo "${DIFF_USAGE}"
|
||||
else
|
||||
echo "?"
|
||||
fi
|
||||
|
||||
# Remember the total and idle CPU times for the next check.
|
||||
echo "${TOTAL}" > "${cpuFile}"
|
||||
echo "${IDLE}" >> "${cpuFile}"
|
||||
}
|
||||
|
||||
## Get Used memory
|
||||
get_mem() {
|
||||
printf "%.0f\n" $(free -m | grep Mem | awk '{print ($3/$2)*100}')
|
||||
}
|
||||
|
||||
## Get Brightness
|
||||
get_blight() {
|
||||
CARD=`ls /sys/class/backlight | head -n 1`
|
||||
|
||||
if [[ "$CARD" == *"intel_"* ]]; then
|
||||
BNESS=`xbacklight -get`
|
||||
LIGHT=${BNESS%.*}
|
||||
else
|
||||
BNESS=`blight -d $CARD get brightness`
|
||||
PERC="$(($BNESS*100/255))"
|
||||
LIGHT=${PERC%.*}
|
||||
fi
|
||||
|
||||
echo "$LIGHT"
|
||||
}
|
||||
|
||||
## Get Battery
|
||||
get_battery() {
|
||||
battery_info=$(upower -i /org/freedesktop/UPower/devices/battery_BAT0)
|
||||
battery_percentage=$(echo "$battery_info" | grep -E "percentage" | awk '{print $2}' | tr -d '%')
|
||||
battery_state=$(echo "$battery_info" | grep -E "state" | awk '{print $2}')
|
||||
|
||||
case $battery_state in
|
||||
"discharging")
|
||||
if [ "$battery_percentage" -le 10 ]; then
|
||||
notify-send -a battery "Battery percentage 10%" "HOLY FUCK PLEASE CHARGE ME"
|
||||
elif [ "$battery_percentage" -le 15 ]; then
|
||||
notify-send -a battery "Battery Percentage 15%" "You should probably plug in the charger"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
echo $battery_percentage
|
||||
}
|
||||
|
||||
get_battery_icon () {
|
||||
battery_info=$(upower -i /org/freedesktop/UPower/devices/battery_BAT0)
|
||||
battery_percentage=$(echo "$battery_info" | grep -E "percentage" | awk '{print $2}' | tr -d '%')
|
||||
icon=""
|
||||
|
||||
if [ "$battery_percentage" -le 20 ]; then
|
||||
icon=""
|
||||
elif [ "$battery_percentage" -le 40 ]; then
|
||||
icon=""
|
||||
elif [ "$battery_percentage" -le 60 ]; then
|
||||
icon=""
|
||||
elif [ "$battery_percentage" -le 80 ]; then
|
||||
icon=""
|
||||
fi
|
||||
|
||||
echo $icon
|
||||
}
|
||||
|
||||
## Execute accordingly
|
||||
if [[ "$1" == "--cpu" ]]; then
|
||||
get_cpu
|
||||
elif [[ "$1" == "--mem" ]]; then
|
||||
get_mem
|
||||
elif [[ "$1" == "--blight" ]]; then
|
||||
get_blight
|
||||
elif [[ "$1" == "--bat" ]]; then
|
||||
get_battery
|
||||
elif [[ "$1" == "--baticon" ]]; then
|
||||
get_battery_icon
|
||||
fi
|
|
@ -1,65 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
get_username() {
|
||||
fullname=$(getent passwd "$(whoami)" | cut -d ':' -f 5 | cut -d ',' -f 1 | tr -d "\n")
|
||||
if [ -z "$fullname" ]; then
|
||||
username="$(whoami)"
|
||||
else
|
||||
username="${fullname%% *}"
|
||||
fi
|
||||
|
||||
# Transforma todo o texto em maiúsculas
|
||||
username="${username^}"
|
||||
|
||||
echo "@$username"
|
||||
}
|
||||
get_kernel_version() {
|
||||
echo "$(uname -r)"
|
||||
}
|
||||
|
||||
get_operating_system() {
|
||||
echo "$(cat /etc/os-release | awk 'NR==1' | awk -F '"' '{print $2}')"
|
||||
}
|
||||
|
||||
get_installed_packages() {
|
||||
echo "$(yay -Q | wc -l)"
|
||||
}
|
||||
|
||||
get_window_manager() {
|
||||
echo "$XDG_CURRENT_DESKTOP"
|
||||
}
|
||||
|
||||
get_uptime() {
|
||||
echo "$(uptime -p | sed -e 's/up //g')"
|
||||
}
|
||||
|
||||
# Main function
|
||||
main() {
|
||||
case "$1" in
|
||||
"--name")
|
||||
get_username
|
||||
;;
|
||||
"--kernel")
|
||||
get_kernel_version
|
||||
;;
|
||||
"--os")
|
||||
get_operating_system
|
||||
;;
|
||||
"--pkgs")
|
||||
get_installed_packages
|
||||
;;
|
||||
"--wm")
|
||||
get_window_manager
|
||||
;;
|
||||
"--uptime")
|
||||
get_uptime
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {--name|--kernel|--os|--pkgs|--wm|--uptime}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Call the main function with the provided arguments
|
||||
main "$@"
|
|
@ -1,58 +0,0 @@
|
|||
#!/usr/bin/bash
|
||||
|
||||
## Files and Data
|
||||
PREV_TOTAL=0
|
||||
PREV_IDLE=0
|
||||
cpuFile="/tmp/.cpu_usage"
|
||||
|
||||
## Get CPU usage
|
||||
get_cpu() {
|
||||
if [[ -f "${cpuFile}" ]]; then
|
||||
fileCont=$(cat "${cpuFile}")
|
||||
PREV_TOTAL=$(echo "${fileCont}" | head -n 1)
|
||||
PREV_IDLE=$(echo "${fileCont}" | tail -n 1)
|
||||
fi
|
||||
|
||||
CPU=($(cat /proc/stat | grep '^cpu ')) # Get the total CPU statistics.
|
||||
unset CPU[0] # Discard the "cpu" prefix.
|
||||
IDLE=${CPU[4]} # Get the idle CPU time.
|
||||
|
||||
# Calculate the total CPU time.
|
||||
TOTAL=0
|
||||
|
||||
for VALUE in "${CPU[@]:0:4}"; do
|
||||
let "TOTAL=$TOTAL+$VALUE"
|
||||
done
|
||||
|
||||
if [[ "${PREV_TOTAL}" != "" ]] && [[ "${PREV_IDLE}" != "" ]]; then
|
||||
# Calculate the CPU usage since we last checked.
|
||||
let "DIFF_IDLE=$IDLE-$PREV_IDLE"
|
||||
let "DIFF_TOTAL=$TOTAL-$PREV_TOTAL"
|
||||
let "DIFF_USAGE=(1000*($DIFF_TOTAL-$DIFF_IDLE)/$DIFF_TOTAL+5)/10"
|
||||
echo "${DIFF_USAGE}"
|
||||
else
|
||||
echo "?"
|
||||
fi
|
||||
|
||||
# Remember the total and idle CPU times for the next check.
|
||||
echo "${TOTAL}" >"${cpuFile}"
|
||||
echo "${IDLE}" >>"${cpuFile}"
|
||||
}
|
||||
|
||||
## Get Used memory
|
||||
get_mem() {
|
||||
printf "%.0f\n" "$(free -m | grep Mem | awk '{print ($3/$2)*100}')"
|
||||
}
|
||||
|
||||
get_mem_mb() {
|
||||
free -m | sed -n 's/^Mem:\s\+[0-9]\+\s\+\([0-9]\+\)\s.\+/\1/p'
|
||||
}
|
||||
|
||||
## Execute accordingly
|
||||
if [[ "$1" == "--cpu" ]]; then
|
||||
get_cpu
|
||||
elif [[ "$1" == "--mem" ]]; then
|
||||
get_mem
|
||||
elif [[ "$1" == "--memb" ]]; then
|
||||
get_mem_mb
|
||||
fi
|
123
hypr-configs/hyprland/eww/scripts/tasklist.py
Executable file
|
@ -0,0 +1,123 @@
|
|||
#!/usr/bin/env python3
|
||||
from iconfetch import fetch
|
||||
import subprocess
|
||||
import json
|
||||
import os
|
||||
import i3ipc
|
||||
|
||||
eww_bin= [subprocess.getoutput("which eww"), "-c", f"{os.getcwd()}"]
|
||||
|
||||
def recurse(apps, workspace, output):
|
||||
for l in workspace.descendants():
|
||||
if not l.pid or not l.app_id:
|
||||
continue
|
||||
app_id = l.app_id.lower()
|
||||
|
||||
if app_id == "com.github.xournalpp.xournalpp":
|
||||
app_id = "xournalpp"
|
||||
|
||||
rect = {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"width": 0,
|
||||
"height": 0
|
||||
}
|
||||
|
||||
rect["x"] = l.rect.x - output.rect.x
|
||||
rect["y"] = l.rect.y - output.rect.y
|
||||
|
||||
rect["width"] = l.rect.width * 1920/output.rect.width
|
||||
rect["height"] = l.rect.height * 1080/output.rect.height
|
||||
rect["x"] *= 1920/output.rect.width
|
||||
rect["y"] *= 1080/output.rect.height
|
||||
|
||||
apps.append({
|
||||
"app_id": app_id,
|
||||
"name": l.name,
|
||||
"pid": l.pid,
|
||||
"focused": l.focused,
|
||||
"rect": rect,
|
||||
"path": fetch(app_id) or fetch("unknown")
|
||||
})
|
||||
|
||||
def update(i3, e):
|
||||
|
||||
root = i3.get_tree()
|
||||
|
||||
apps = []
|
||||
windows = [[] for _ in range(10)]
|
||||
|
||||
for output in root.nodes:
|
||||
if output.name == "__i3":
|
||||
continue
|
||||
|
||||
for workspace in output.nodes:
|
||||
found = []
|
||||
recurse(found, workspace, output)
|
||||
|
||||
apps.extend(found)
|
||||
# if output["name"] == "eDP-1":
|
||||
# windows[int(workspace["name"])-1] = found
|
||||
windows[int(workspace.name)-1] = found
|
||||
|
||||
# change this yourself lol
|
||||
appsdict = {
|
||||
"firefox": [],
|
||||
"thunar": [],
|
||||
"xournalpp": [],
|
||||
"discord": [],
|
||||
"foot": []
|
||||
}
|
||||
# translate to launch cmd
|
||||
appsexec = {
|
||||
"discord": "discord-wayland",
|
||||
"xournalpp": "com.github.xournalpp.xournalpp",
|
||||
"foot": "org.codeberg.dnkl.foot",
|
||||
}
|
||||
|
||||
appsjson = []
|
||||
|
||||
for app in apps:
|
||||
a = app.copy()
|
||||
name = a["app_id"]
|
||||
|
||||
if name not in appsdict:
|
||||
appsdict[name] = []
|
||||
appsdict[name].append(a)
|
||||
|
||||
for key, value in appsdict.items():
|
||||
if len(value) == 0:
|
||||
appsjson.append(dict(
|
||||
path = fetch(key),
|
||||
name = key,
|
||||
app_id = key if key not in appsexec else appsexec[key],
|
||||
pid = None,
|
||||
focused = []
|
||||
))
|
||||
|
||||
else:
|
||||
f = []
|
||||
for v in value:
|
||||
f.append(v["focused"])
|
||||
|
||||
appsjson.append(dict(
|
||||
path = value[0]["path"],
|
||||
name = value[0]["name"],
|
||||
app_id = value[0]["app_id"].lower(),
|
||||
pid = value[0]["pid"],
|
||||
focused = f
|
||||
))
|
||||
|
||||
|
||||
subprocess.run(eww_bin + ["update", f"windows={json.dumps(windows)}"])
|
||||
subprocess.run(eww_bin + ["update", f"tasksjson={json.dumps(appsjson)}"])
|
||||
|
||||
def main():
|
||||
i3 = i3ipc.Connection(auto_reconnect=True)
|
||||
update(i3, None)
|
||||
i3.on(i3ipc.Event.WINDOW, update)
|
||||
i3.main()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
108
hypr-configs/hyprland/eww/scripts/timer.py
Executable file
|
@ -0,0 +1,108 @@
|
|||
#!/usr/bin/env python3
|
||||
import time
|
||||
import os
|
||||
import sys
|
||||
import subprocess
|
||||
|
||||
eww_bin= [subprocess.getoutput("which eww"), "-c", f"{os.getcwd()}"]
|
||||
|
||||
def startstop():
|
||||
if os.path.exists("/tmp/timerstamp"):
|
||||
os.remove("/tmp/timerstamp")
|
||||
os.popen("notify-send 'timer stopped'")
|
||||
else:
|
||||
with open("/tmp/timerstamp", "x") as f:
|
||||
f.write(str(time.time()))
|
||||
os.popen("notify-send 'timer start'")
|
||||
|
||||
|
||||
|
||||
# fuck it, I'm sure we don't need the loop function
|
||||
def readtime():
|
||||
if not os.path.exists("/tmp/timer"):
|
||||
with open("/tmp/timer", "x") as f:
|
||||
f.write("25")
|
||||
|
||||
while True:
|
||||
with open("/tmp/timer") as f:
|
||||
timer = int(f.read())
|
||||
|
||||
if os.path.exists("/tmp/timerstamp"):
|
||||
current = time.time()
|
||||
with open("/tmp/timerstamp") as f:
|
||||
timestamp = float(f.read())
|
||||
|
||||
if current - timestamp >= timer*60:
|
||||
os.remove("/tmp/timerstamp")
|
||||
os.popen("notify-send 'time is up'")
|
||||
print("OwO")
|
||||
subprocess.run(eww_bin + ["update", f"timerdis=OwO"])
|
||||
else:
|
||||
m, s = divmod((timer*60) - (current-timestamp), 60)
|
||||
print (f"{int(m)}:{int(s)}")
|
||||
subprocess.run(eww_bin + ["update", f"timerdis={int(m)}:{int(s)}"])
|
||||
else:
|
||||
print(timer)
|
||||
subprocess.run(eww_bin + ["update", f"timerdis={timer}"])
|
||||
|
||||
time.sleep(1)
|
||||
|
||||
|
||||
def loop():
|
||||
if not os.path.exists("/tmp/timer"):
|
||||
with open("/tmp/timer", "x") as f:
|
||||
f.write("25")
|
||||
|
||||
while True:
|
||||
with open("/tmp/timer") as f:
|
||||
timer = int(f.read())
|
||||
|
||||
current = time.time()
|
||||
if os.path.exists("/tmp/timerstamp"):
|
||||
with open("/tmp/timerstamp") as f:
|
||||
timestamp = float(f.read())
|
||||
|
||||
if current - timestamp >= timer*60:
|
||||
os.remove("/tmp/timerstamp")
|
||||
os.popen("notify-send 'time is up'")
|
||||
|
||||
time.sleep(1)
|
||||
|
||||
def substate():
|
||||
if os.path.exists("/tmp/timerstamp"):
|
||||
print("stop")
|
||||
else:
|
||||
print("start")
|
||||
|
||||
def timeinc():
|
||||
with open("/tmp/timer", "r") as f:
|
||||
timer = int(f.read())
|
||||
|
||||
timer+=5
|
||||
with open("/tmp/timer", "w") as f:
|
||||
f.write(str(timer))
|
||||
subprocess.run(eww_bin + ["update", f"timerdis={timer}"])
|
||||
|
||||
def timedec():
|
||||
with open("/tmp/timer", "r") as f:
|
||||
timer = int(f.read())
|
||||
|
||||
timer-=5
|
||||
with open("/tmp/timer", "w") as f:
|
||||
f.write(str(timer))
|
||||
subprocess.run(eww_bin + ["update", f"timerdis={timer}"])
|
||||
|
||||
a = sys.argv[1]
|
||||
|
||||
if a == "loop":
|
||||
loop()
|
||||
if a == "toggle":
|
||||
startstop()
|
||||
if a == "subscribe":
|
||||
readtime()
|
||||
if a == "substate":
|
||||
substate()
|
||||
if a == "timedec":
|
||||
timedec()
|
||||
if a == "timeinc":
|
||||
timeinc()
|
138
hypr-configs/hyprland/eww/scripts/toggletheme
Executable file
|
@ -0,0 +1,138 @@
|
|||
#!/bin/bash
|
||||
scss_theme="$HOME/.config/eww/carbonmonoxide/colors.scss"
|
||||
# dark="oxocarbon"
|
||||
# light="oxocarbon_light"
|
||||
|
||||
switch_theme () {
|
||||
echo '@import '"\"./themes/$1.scss\"" > $scss_theme
|
||||
|
||||
if [[ -f "$HOME/.config/foot/themes/$1.ini" ]]; then
|
||||
sed -i "s/include=.*/include=~\/.config\/foot\/themes\/$1.ini/" $HOME/.config/foot/foot.ini
|
||||
fi
|
||||
|
||||
if [[ -f "$HOME/.config/wofi/themes/$1.css" ]]; then
|
||||
sed -i "s/@import.*/@import \".config\/wofi\/themes\/$1.css\";/" $HOME/.config/wofi/style.css
|
||||
fi
|
||||
|
||||
inactivebg=$(sed -n "s/\$surface0: \(.*\);/\1/p" $HOME/.config/eww/carbonmonoxide/themes/$1.scss)
|
||||
bg=$(sed -n "s/\$surface2: \(.*\);/\1/p" $HOME/.config/eww/carbonmonoxide/themes/$1.scss)
|
||||
text=$(sed -n "s/\$white0: \(.*\);/\1/p" $HOME/.config/eww/carbonmonoxide/themes/$1.scss)
|
||||
urgent="#ee5396"
|
||||
|
||||
if [ -n $surface0 ] && [ -n $surface2 ] && [ -n $white0 ]; then
|
||||
swaymsg "client.focused $bg $bg $text $bg"
|
||||
swaymsg "client.unfocused $inactivebg $inactivebg $text $inactivebg"
|
||||
swaymsg "client.focused_inactive $inactivebg $inactivebg $text $inactivebg"
|
||||
swaymsg "client.urgent $urgent $urgent $text $urgent"
|
||||
fi
|
||||
|
||||
sleep 1
|
||||
notify-send -a Theme "Theme selected" "$1"
|
||||
}
|
||||
|
||||
current=`cat $scss_theme | sed 's/@import \".\/themes\/\(.*\).scss\"/\1/'`
|
||||
|
||||
if [[ $1 == "toggle" ]]; then
|
||||
case $current in
|
||||
"oxocarbon")
|
||||
switch_theme "oxocarbon_light"
|
||||
swaymsg output \* bg ~/.config/sway/wallpaper/tile.png tile
|
||||
;;
|
||||
"oxocarbon_light")
|
||||
switch_theme "catppuccin"
|
||||
swaymsg output \* bg ~/.config/sway/wallpaper/catppuccinlan.png fill
|
||||
;;
|
||||
"catppuccin")
|
||||
switch_theme "rosepine"
|
||||
swaymsg output \* bg ~/.config/sway/wallpaper/rosepine.jpg fill
|
||||
;;
|
||||
"rosepine")
|
||||
switch_theme "swamp"
|
||||
swaymsg output \* bg ~/.config/sway/wallpaper/swamp.png fill
|
||||
;;
|
||||
"swamp")
|
||||
switch_theme "biscuit"
|
||||
swaymsg output \* bg ~/.config/sway/wallpaper/biscuitcat.png fill
|
||||
;;
|
||||
"biscuit")
|
||||
switch_theme "camellia"
|
||||
swaymsg output \* bg ~/.config/sway/wallpaper/camelliawoman.jpg fill
|
||||
;;
|
||||
*)
|
||||
switch_theme "oxocarbon"
|
||||
swaymsg output \* bg ~/.config/sway/wallpaper/tile.png tile
|
||||
;;
|
||||
esac
|
||||
elif [[ $1 == "select" ]]; then
|
||||
case $2 in
|
||||
"oxocarbon_light")
|
||||
switch_theme "oxocarbon_light"
|
||||
swaymsg output \* bg ~/.config/sway/wallpaper/tile.png tile
|
||||
;;
|
||||
"catppuccin")
|
||||
switch_theme "catppuccin"
|
||||
swaymsg output \* bg ~/.config/sway/wallpaper/catppuccinlan.png fill
|
||||
;;
|
||||
"catppuccin_latte")
|
||||
switch_theme "catppuccin_latte"
|
||||
swaymsg output \* bg ~/.config/sway/wallpaper/forrest.png fill
|
||||
;;
|
||||
"rosepine")
|
||||
switch_theme "rosepine"
|
||||
swaymsg output \* bg ~/.config/sway/wallpaper/rosepine.jpg fill
|
||||
;;
|
||||
"swamp")
|
||||
switch_theme "swamp"
|
||||
swaymsg output \* bg ~/.config/sway/wallpaper/swamp.png fill
|
||||
;;
|
||||
"biscuit")
|
||||
switch_theme "biscuit"
|
||||
swaymsg output \* bg ~/.config/sway/wallpaper/biscuitcat.png fill
|
||||
;;
|
||||
"camellia")
|
||||
switch_theme "camellia"
|
||||
swaymsg output \* bg ~/.config/sway/wallpaper/camelliawoman.jpg fill
|
||||
;;
|
||||
*)
|
||||
switch_theme "oxocarbon"
|
||||
swaymsg output \* bg ~/.config/sway/wallpaper/tile.png tile
|
||||
;;
|
||||
esac
|
||||
elif [[ $1 == "setup" ]]; then
|
||||
case $current in
|
||||
"oxocarbon_light")
|
||||
switch_theme "oxocarbon_light"
|
||||
swaymsg output \* bg ~/.config/sway/wallpaper/tile.png tile
|
||||
;;
|
||||
"catppuccin")
|
||||
switch_theme "catppuccin"
|
||||
swaymsg output \* bg ~/.config/sway/wallpaper/catppuccinlan.png fill
|
||||
;;
|
||||
"catppuccin_latte")
|
||||
switch_theme "catppuccin_latte"
|
||||
swaymsg output \* bg ~/.config/sway/wallpaper/forrest.png fill
|
||||
;;
|
||||
"rosepine")
|
||||
switch_theme "rosepine"
|
||||
swaymsg output \* bg ~/.config/sway/wallpaper/rosepine.jpg fill
|
||||
;;
|
||||
"swamp")
|
||||
switch_theme "swamp"
|
||||
swaymsg output \* bg ~/.config/sway/wallpaper/swamp.png fill
|
||||
;;
|
||||
"biscuit")
|
||||
switch_theme "biscuit"
|
||||
swaymsg output \* bg ~/.config/sway/wallpaper/biscuitcat.png fill
|
||||
;;
|
||||
"camellia")
|
||||
switch_theme "camellia"
|
||||
swaymsg output \* bg ~/.config/sway/wallpaper/camelliawoman.jpg fill
|
||||
;;
|
||||
*)
|
||||
switch_theme "oxocarbon"
|
||||
swaymsg output \* bg ~/.config/sway/wallpaper/tile.png tile
|
||||
;;
|
||||
esac
|
||||
else
|
||||
echo $current
|
||||
fi
|
9
hypr-configs/hyprland/eww/scripts/touchkey.sh
Executable file
|
@ -0,0 +1,9 @@
|
|||
#!/bin/sh
|
||||
|
||||
PID=$(pidof wvkbd-mobintl)
|
||||
|
||||
if [ -z $PID ]; then
|
||||
wvkbd-mobintl &
|
||||
else
|
||||
kill $PID
|
||||
fi
|
5
hypr-configs/hyprland/eww/scripts/trashput.sh
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/bin/sh
|
||||
|
||||
file=$(echo $1 | cut -c 7-)
|
||||
|
||||
mv $file ~/.local/share/Trash/files
|
|
@ -1,26 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
if ! updates_arch=$(checkupdates 2>/dev/null | wc -l); then
|
||||
updates_arch=0
|
||||
fi
|
||||
|
||||
if ! updates_aur=$(yay -Qum 2>/dev/null | wc -l); then
|
||||
updates_aur=0
|
||||
fi
|
||||
|
||||
updates=$((updates_arch + updates_aur))
|
||||
|
||||
check() {
|
||||
if [ "$updates" -gt 0 ]; then
|
||||
bspc rule -a \* -o state=floating && alacritty -e $SHELL -c 'yay -Syu'
|
||||
fi
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
up)
|
||||
check
|
||||
;;
|
||||
get)
|
||||
echo "$updates"
|
||||
;;
|
||||
esac
|
|
@ -1,49 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
get_username() {
|
||||
echo "$(whoami)"
|
||||
}
|
||||
|
||||
get_kernel_version() {
|
||||
echo "$(uname -r)"
|
||||
}
|
||||
|
||||
get_operating_system() {
|
||||
echo "$(cat /etc/os-release | awk 'NR==1' | awk -F '"' '{print $2}')"
|
||||
}
|
||||
|
||||
get_installed_packages() {
|
||||
echo "$(yay -Q | wc -l)"
|
||||
}
|
||||
|
||||
get_window_manager() {
|
||||
echo "$XDG_CURRENT_DESKTOP"
|
||||
}
|
||||
|
||||
# Main function
|
||||
main() {
|
||||
case "$1" in
|
||||
"--name")
|
||||
get_username
|
||||
;;
|
||||
"--kernel")
|
||||
get_kernel_version
|
||||
;;
|
||||
"--os")
|
||||
get_operating_system
|
||||
;;
|
||||
"--pkgs")
|
||||
get_installed_packages
|
||||
;;
|
||||
"--wm")
|
||||
get_window_manager
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {--name|--kernel|--os|--pkgs|--wm}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Call the main function with the provided arguments
|
||||
main "$@"
|
|
@ -1,7 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
pamixer --get-volume-human | tr -d '%'
|
||||
|
||||
pactl subscribe | rg --line-buffered "on sink" | while read -r _; do
|
||||
pamixer --get-volume-human | tr -d '%'
|
||||
done
|
56
hypr-configs/hyprland/eww/scripts/wallhaven.py
Executable file
|
@ -0,0 +1,56 @@
|
|||
#! /usr/bin/env python3
|
||||
|
||||
import requests
|
||||
import json
|
||||
import sys
|
||||
import os
|
||||
import subprocess
|
||||
import shutil
|
||||
|
||||
imgdir = "/tmp/wallpapers"
|
||||
eww_bin= [subprocess.getoutput("which eww"), "-c", f"{os.getcwd()}"]
|
||||
|
||||
try:
|
||||
if sys.argv[1] == "search":
|
||||
if os.path.exists(imgdir):
|
||||
shutil.rmtree(imgdir)
|
||||
os.mkdir(imgdir)
|
||||
else:
|
||||
os.mkdir(imgdir)
|
||||
|
||||
data = json.loads(requests.get(f"https://wallhaven.cc/api/v1/search?q={'+'.join(sys.argv[2:])}&ratios=landscape").text)
|
||||
|
||||
smaller = []
|
||||
count = 0
|
||||
for d in data["data"]:
|
||||
|
||||
if count == 15:
|
||||
break
|
||||
count += 1
|
||||
|
||||
img_data = requests.get(d["thumbs"]["small"]).content
|
||||
with open(imgdir+"/"+d["id"]+".png", "wb") as f:
|
||||
f.write(img_data)
|
||||
|
||||
smaller.append({"path": imgdir+"/"+d["id"]+".png", "fav": d["favorites"], "views": d["views"], "url": d["path"]})
|
||||
|
||||
subprocess.run(eww_bin+["update", f"wallpapers={json.dumps(smaller)}"])
|
||||
|
||||
# print(json.dumps(smaller))
|
||||
elif sys.argv[1] == "select":
|
||||
url = sys.argv[2]
|
||||
|
||||
if not url:
|
||||
raise Exception("No url provided")
|
||||
img_data = requests.get(url).content
|
||||
with open(imgdir+"/selected.png", "wb") as f:
|
||||
f.write(img_data)
|
||||
|
||||
subprocess.run(["swaymsg", "output", "*", "bg", imgdir+"/selected.png", "fill"])
|
||||
|
||||
elif sys.argv[1] == "reset":
|
||||
subprocess.run(["swaymsg", "output", "*", "bg", os.path.expandvars("$HOME/.config/sway/wallpaper/tile.png"), "tile"])
|
||||
|
||||
except Exception as e:
|
||||
print(e)
|
||||
print("{}")
|
151
hypr-configs/hyprland/eww/scripts/weather.py
Executable file
|
@ -0,0 +1,151 @@
|
|||
#!/usr/bin/python3
|
||||
import requests
|
||||
import json
|
||||
import time
|
||||
|
||||
mytime = time.localtime()
|
||||
day = (6 < mytime.tm_hour < 20)
|
||||
|
||||
code_icon = {
|
||||
113: "clear",
|
||||
116: "few-clouds",
|
||||
119: "clouds",
|
||||
122: "clouds",
|
||||
143: "fog",
|
||||
176: "rain",
|
||||
179: "snow",
|
||||
182: "snow",
|
||||
185: "snow",
|
||||
200: "storm",
|
||||
227: "snow",
|
||||
230: "storm",
|
||||
248: "fog",
|
||||
260: "fog",
|
||||
263: "rain-light",
|
||||
266: "rain-light",
|
||||
281: "rain-light",
|
||||
284: "rain-light",
|
||||
293: "rain-light",
|
||||
296: "rain-light",
|
||||
299: "rain",
|
||||
302: "rain",
|
||||
305: "rain",
|
||||
308: "rain",
|
||||
311: "rain",
|
||||
353: "rain-light",
|
||||
356: "rain",
|
||||
}
|
||||
|
||||
code_icon_n = {
|
||||
113: "clear-n",
|
||||
116: "few-clouds-n",
|
||||
119: "clouds",
|
||||
122: "clouds",
|
||||
143: "fog",
|
||||
176: "rain",
|
||||
179: "snow",
|
||||
182: "snow",
|
||||
185: "snow",
|
||||
200: "storm",
|
||||
227: "snow",
|
||||
230: "storm",
|
||||
248: "fog",
|
||||
260: "fog",
|
||||
263: "rain-light",
|
||||
266: "rain-light",
|
||||
281: "rain-light",
|
||||
284: "rain-light",
|
||||
293: "rain-light",
|
||||
296: "rain-light",
|
||||
299: "rain",
|
||||
302: "rain",
|
||||
305: "rain",
|
||||
308: "rain",
|
||||
311: "rain",
|
||||
353: "rain-light",
|
||||
356: "rain",
|
||||
}
|
||||
|
||||
try:
|
||||
req = requests.get(r"https://wttr.in/?format=j1", timeout=15).text
|
||||
req = json.loads(req)
|
||||
res = req["current_condition"][0].copy()
|
||||
|
||||
code = int(res["weatherCode"])
|
||||
if day:
|
||||
if code in code_icon:
|
||||
res["icon"] = code_icon[code]
|
||||
else:
|
||||
res["icon"] = "idk"
|
||||
else:
|
||||
if code in code_icon_n:
|
||||
res["icon"] = code_icon_n[code]
|
||||
else:
|
||||
res["icon"] = "idk"
|
||||
|
||||
# hourly
|
||||
|
||||
it = 0
|
||||
while it < 8 and int(req["weather"][0]["hourly"][it]["time"]) < mytime.tm_hour * 100:
|
||||
it += 1
|
||||
|
||||
res["hourly"] = []
|
||||
for i in range(8):
|
||||
res["hourly"].append(req["weather"][(it+i)//8]["hourly"][(it+i)%8].copy())
|
||||
|
||||
for hour in res["hourly"]:
|
||||
t = int(hour["time"])//100
|
||||
if t > 12:
|
||||
hour["time"] = f"{t-12}pm"
|
||||
elif t == 12:
|
||||
hour["time"] = "12pm"
|
||||
elif t == 0:
|
||||
hour["time"] = "12am"
|
||||
else:
|
||||
hour["time"] = f"{t}am"
|
||||
|
||||
code = int(hour["weatherCode"])
|
||||
if day:
|
||||
if code in code_icon:
|
||||
hour["icon"] = code_icon[code]
|
||||
else:
|
||||
hour["icon"] = "idk"
|
||||
else:
|
||||
if code in code_icon_n:
|
||||
hour["icon"] = code_icon_n[code]
|
||||
else:
|
||||
hour["icon"] = "idk"
|
||||
|
||||
|
||||
print(json.dumps(res))
|
||||
|
||||
except Exception as e:
|
||||
# print(e)
|
||||
print("""
|
||||
{
|
||||
"FeelsLikeC": "0",
|
||||
"FeelsLikeF": "0",
|
||||
"cloudcover": "0",
|
||||
"humidity": "0",
|
||||
"localObsDateTime": "2000-00-00 07:27 AM",
|
||||
"observation_time": "07:27 AM",
|
||||
"precipInches": "0.0",
|
||||
"precipMM": "0.0",
|
||||
"pressure": "0",
|
||||
"pressureInches": "0",
|
||||
"temp_C": "0",
|
||||
"temp_F": "0",
|
||||
"uvIndex": "0",
|
||||
"visibility": "0",
|
||||
"visibilityMiles": "0",
|
||||
"weatherCode": "727",
|
||||
"weatherDesc": [{"value": "Idk"}],
|
||||
"weatherIconUrl": [{"value": ""}],
|
||||
"winddir16Point": "",
|
||||
"winddirDegree": "0",
|
||||
"windspeedKmph": "0",
|
||||
"windspeedMiles": "0",
|
||||
"icon": "idk",
|
||||
"hourly": []
|
||||
}
|
||||
""")
|
35
hypr-configs/hyprland/eww/scripts/wifi
Executable file
|
@ -0,0 +1,35 @@
|
|||
#!/bin/bash
|
||||
|
||||
status=$(nmcli g | grep -oE "disconnected")
|
||||
essid=$(nmcli c | grep wlp0s20f3 | awk '{print ($1)}')
|
||||
strength=$(awk 'NR==3 {printf("%.0f\n",$3*10/7)}' /proc/net/wireless)
|
||||
|
||||
if [ $status ] ; then
|
||||
icon=""
|
||||
text=""
|
||||
col="#f38ba8"
|
||||
|
||||
else
|
||||
if [ $strength -le 25 ]; then
|
||||
icon=""
|
||||
elif [ $strength -le 50 ]; then
|
||||
icon=""
|
||||
elif [ $strength -le 75 ]; then
|
||||
icon=""
|
||||
else
|
||||
icon=""
|
||||
fi
|
||||
|
||||
text="${essid}"
|
||||
col="#b4befe"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
if [[ "$1" == "--COL" ]]; then
|
||||
echo $col
|
||||
elif [[ "$1" == "--ESSID" ]]; then
|
||||
echo $text
|
||||
elif [[ "$1" == "--ICON" ]]; then
|
||||
echo $icon
|
||||
fi
|
|
@ -1,18 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
WORKSPACES_NUMBER=5
|
||||
|
||||
workspaces() {
|
||||
WORKSPACE_WINDOWS=$(hyprctl workspaces -j | jq 'map({key: .id | tostring, value: .windows}) | from_entries')
|
||||
CURRENT="$(hyprctl -j monitors | jq '.[0].activeWorkspace.name')"
|
||||
|
||||
seq 1 $WORKSPACES_NUMBER | \
|
||||
jq --argjson windows "${WORKSPACE_WINDOWS}" \
|
||||
--argjson current "${CURRENT}" \
|
||||
--slurp -Mc 'map(tostring) | map({id: ., windows: ($windows[.]//0), current: ($current == .)})'
|
||||
}
|
||||
|
||||
workspaces
|
||||
socat -u UNIX-CONNECT:/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock - | while read -r line; do
|
||||
workspaces
|
||||
done
|
42
hypr-configs/hyprland/eww/scripts/workspace.py
Executable file
|
@ -0,0 +1,42 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import subprocess
|
||||
import json
|
||||
import os
|
||||
import i3ipc
|
||||
|
||||
eww_bin= [subprocess.getoutput("which eww"), "-c", f"{os.getcwd()}"]
|
||||
|
||||
def get_workspaces(i3):
|
||||
result = i3.get_workspaces()
|
||||
|
||||
active = []
|
||||
|
||||
for i in range(1, 6):
|
||||
active.append(dict(
|
||||
focused = False,
|
||||
empty = True,
|
||||
name = i
|
||||
))
|
||||
|
||||
for res in result:
|
||||
if not res.output == "eDP-1": continue
|
||||
if res.num%10-1 > 4 or res.num%10-1 < 0:
|
||||
continue
|
||||
active[res.num%10-1]["empty"] = False
|
||||
if res.focused:
|
||||
active[res.num%10-1]["focused"] = True
|
||||
|
||||
return active
|
||||
|
||||
def update(i3, e):
|
||||
print(json.dumps(get_workspaces(i3)), flush=True)
|
||||
|
||||
def main():
|
||||
i3 = i3ipc.Connection(auto_reconnect=True)
|
||||
update(i3, None)
|
||||
i3.on(i3ipc.Event.WORKSPACE, update)
|
||||
i3.main()
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
20
hypr-configs/hyprland/eww/themes/biscuit.scss
Normal file
|
@ -0,0 +1,20 @@
|
|||
// by Tsukki
|
||||
|
||||
$base: #1A1515;
|
||||
$surface0: #2d2424;
|
||||
$surface1: #453636;
|
||||
$surface2: #725a5a;
|
||||
$white0: #DCC9BC;
|
||||
$white1: #ffe9c7;
|
||||
$white2: #ffe9c7;
|
||||
$red: #CF223E;
|
||||
$green: #959A6B;
|
||||
|
||||
$base08: #F07342;
|
||||
$base0B: #768F80;
|
||||
$base0C: #756D94;
|
||||
$base0D: #614F76;
|
||||
$base0E: #7B3D79;
|
||||
$base0F: #AE3F82;
|
||||
|
||||
$accent: $base08;
|
23
hypr-configs/hyprland/eww/themes/biscuit_light.scss
Normal file
|
@ -0,0 +1,23 @@
|
|||
// by Tsukki
|
||||
|
||||
$base: #FFF7EB;
|
||||
$surface0: #E0CFC6;
|
||||
$surface1: #C1AEAE;
|
||||
$surface2: #A38A8A;
|
||||
$white0: #483939;
|
||||
$white1: #2D2424;
|
||||
$white2: #2D2424;
|
||||
|
||||
$red: #B54851;
|
||||
$green: #938579; // green??? I think???
|
||||
|
||||
$base04: #9C8181;
|
||||
$base08: #D0796D;
|
||||
$base09: #C6846C;
|
||||
$base0B: #878985;
|
||||
$base0C: #877B85;
|
||||
$base0D: #79657A;
|
||||
$base0E: #794F65;
|
||||
$base0F: #9F596C;
|
||||
|
||||
$accent: $base08;
|
29
hypr-configs/hyprland/eww/themes/camellia.scss
Normal file
|
@ -0,0 +1,29 @@
|
|||
// By Vixima
|
||||
|
||||
$BG : #17181C;
|
||||
$MidBG : #1E1F24;
|
||||
$LightBG : #26272B;
|
||||
$DarkGrey : #333438;
|
||||
$LightGrey: #8F9093;
|
||||
$DarkFG : #B0B1B4;
|
||||
$MidFG : #CBCCCE;
|
||||
$FG : #E4E5E7;
|
||||
$Pink : #FA3867;
|
||||
$Orange : #F57F3D;
|
||||
$Gold : #F5CA32;
|
||||
$Lime : #65DB3D;
|
||||
$Turquoise: #53DFCA;
|
||||
$Blue : #4CB2E5;
|
||||
$Violet : #9A57F5;
|
||||
$Red : #FA4242;
|
||||
|
||||
$base: #17181C;
|
||||
$surface0: #1E1F24;
|
||||
$surface1: #26272B;
|
||||
$surface2: #333438;
|
||||
$white0: #E4E5E7;
|
||||
$white1: $FG;
|
||||
$white2: $FG;
|
||||
$red: $Red;
|
||||
$green: $Lime;
|
||||
$accent: $Pink;
|
27
hypr-configs/hyprland/eww/themes/catppuccin.scss
Normal file
|
@ -0,0 +1,27 @@
|
|||
$rosewater: #f5e0dc;
|
||||
$flamingo: #f2cdcd;
|
||||
$pink: #f5c2e7;
|
||||
$mauve: #cba6f7;
|
||||
$red: #f38ba8;
|
||||
$maroon: #eba0ac;
|
||||
$peach: #fab387;
|
||||
$yellow: #f9e2af;
|
||||
$green: #a6e3a1;
|
||||
$teal: #94e2d5;
|
||||
$sky: #89dceb;
|
||||
$sapphire: #74c7ec;
|
||||
$blue: #89b4fa;
|
||||
$lavender: #b4befe;
|
||||
$white0: #cdd6f4;
|
||||
$white1: #bac2de;
|
||||
$white2: #a6adc8;
|
||||
$overlay2: #9399b2;
|
||||
$overlay1: #7f849c;
|
||||
$overlay0: #6c7086;
|
||||
$surface2: #585b70;
|
||||
$surface1: #45475a;
|
||||
$surface0: #313244;
|
||||
$base: #1e1e2e;
|
||||
$mantle: #181825;
|
||||
$crust: #11111b;
|
||||
$accent: $mauve;
|
27
hypr-configs/hyprland/eww/themes/catppuccin_latte.scss
Normal file
|
@ -0,0 +1,27 @@
|
|||
$rosewater: #dc8a78;
|
||||
$flamingo: #dd7878;
|
||||
$pink: #ea76cb;
|
||||
$mauve: #8839ef;
|
||||
$red: #d20f39;
|
||||
$maroon: #e64553;
|
||||
$peach: #fe640b;
|
||||
$yellow: #df8e1d;
|
||||
$green: #40a02b;
|
||||
$teal: #179299;
|
||||
$sky: #04a5e5;
|
||||
$sapphire: #209fb5;
|
||||
$blue: #1e66f5;
|
||||
$lavender: #7287fd;
|
||||
$white0: #4c4f69;
|
||||
$white1: #5c5f77;
|
||||
$white2: #6c6f85;
|
||||
$overlay2: #7c7f93;
|
||||
$overlay1: #8c8fa1;
|
||||
$overlay0: #9ca0b0;
|
||||
$surface2: #acb0be;
|
||||
$surface1: #bcc0cc;
|
||||
$surface0: #ccd0da;
|
||||
$base: #eff1f5;
|
||||
$mantle: #e6e9ef;
|
||||
$crust: #dce0e8;
|
||||
$accent: #7287fd;
|
36
hypr-configs/hyprland/eww/themes/fullerene.scss
Normal file
|
@ -0,0 +1,36 @@
|
|||
// by Gwynsav
|
||||
|
||||
$black :#0c0c0c;
|
||||
$gray100 :#161616;
|
||||
$gray90 :#1f1f1f;
|
||||
$gray80 :#262626;
|
||||
$gray70 :#393939;
|
||||
$gray60 :#525252;
|
||||
$gray50 :#6f6f6f;
|
||||
$gray40 :#8d8d8d;
|
||||
$gray30 :#a8a8a8;
|
||||
$gray20 :#c6c6c6;
|
||||
$gray10 :#e0e0e0;
|
||||
$white :#f4f4f4;
|
||||
|
||||
$red :#c1374b;
|
||||
$red_dark :#902c3b;
|
||||
$green :#32ae80;
|
||||
$green_dark :#2a8664;
|
||||
$yellow :#e1a36b;
|
||||
$yellow_dark :#d78438;
|
||||
$blue :#738be7;
|
||||
$blue_dark :#546ad8;
|
||||
$magenta :#9e7ad5;
|
||||
$magenta_dark :#875fd4;
|
||||
$cyan :#2b9eb0;
|
||||
$cyan_dark :#1f7a89;
|
||||
|
||||
$base: $black;
|
||||
$surface0: $gray80;
|
||||
$surface1: $gray70;
|
||||
$surface2: $gray60;
|
||||
$white0: $gray10;
|
||||
$white1: $white;
|
||||
$white2: $white;
|
||||
$accent: $magenta;
|
18
hypr-configs/hyprland/eww/themes/oxocarbon.scss
Normal file
|
@ -0,0 +1,18 @@
|
|||
|
||||
$base: #161616;
|
||||
$surface0: #262626;
|
||||
$surface1: #393939;
|
||||
$surface2: #525252;
|
||||
$white0: #dde1e6;
|
||||
$white1: #f2f4f8;
|
||||
$white2: #ffffff;
|
||||
$teal: #08bdba;
|
||||
$sapphire: #3ddbd9;
|
||||
$sky: #78a9ff;
|
||||
$maroon: #ee5396;
|
||||
$blue: #33b1ff;
|
||||
$red: #ff7eb6;
|
||||
$green: #42be65;
|
||||
$lavender: #be95ff;
|
||||
$light_blue: #82cfff;
|
||||
$accent: $red;
|
17
hypr-configs/hyprland/eww/themes/oxocarbon_light.scss
Normal file
|
@ -0,0 +1,17 @@
|
|||
$base: #f2f4f8;
|
||||
$surface0: #dde1e6;
|
||||
$surface1: #f2f4f8;
|
||||
$surface2: #ffffff;
|
||||
$white0: #525252;
|
||||
$white1: #393939;
|
||||
$white2: #262626;
|
||||
$teal: #08bdba;
|
||||
$sapphire: #3ddbd9;
|
||||
$sky: #78a9ff;
|
||||
$maroon: #ee5396;
|
||||
$blue: #0f62fe;
|
||||
$red: #ff7eb6;
|
||||
$green: #42be65;
|
||||
$lavender: #be95ff;
|
||||
$light_blue: #82cfff;
|
||||
$accent: $red;
|
25
hypr-configs/hyprland/eww/themes/rosepine.scss
Normal file
|
@ -0,0 +1,25 @@
|
|||
$base: #191724;
|
||||
$surface0: #26233a;
|
||||
$surface1: #403d52;
|
||||
$surface2: #524f67;
|
||||
$white0: #e0def4;
|
||||
$white1: #e0def4;
|
||||
$white2: #e0def4;
|
||||
|
||||
$muted: #6e6a86;
|
||||
$subtle: #908caa;
|
||||
$text: #e0def4;
|
||||
$love: #eb6f92;
|
||||
$gold: #f6c177;
|
||||
$rose: #ebbcba;
|
||||
$pine: #31748f;
|
||||
$foam: #9ccfd8;
|
||||
$iris: #c4a7e7;
|
||||
$surface: #1f1d2e;
|
||||
$highlight-low: #21202e;
|
||||
$highlight-med: #403d52;
|
||||
$highlight-high: #524f67;
|
||||
|
||||
$red: $love;
|
||||
$green: $foam;
|
||||
$accent: $iris;
|
23
hypr-configs/hyprland/eww/themes/swamp.scss
Normal file
|
@ -0,0 +1,23 @@
|
|||
// by masroof-maindak (Mujtaba)
|
||||
|
||||
// required
|
||||
$base: #242015;
|
||||
$surface0: #3A3124;
|
||||
$surface1: #4d3f32;
|
||||
$surface2: #5f4e41;
|
||||
$white0: #D2C3A4;
|
||||
$white1: #ebe0bb;
|
||||
$white2: #F1E9D0;
|
||||
$red: #a82d56;
|
||||
$green: #61a0a8;
|
||||
|
||||
// other
|
||||
$base04: #B8A58C;
|
||||
$base09: #b06733;
|
||||
$base0A: #db930d;
|
||||
$base0B: #7a7653;
|
||||
$base0D: #91506C;
|
||||
$base0E: #b05d61;
|
||||
$base0F: #ba6d36;
|
||||
|
||||
$accent: $base0A;
|
|
@ -1,52 +0,0 @@
|
|||
(defwidget volume []
|
||||
(eventbox
|
||||
:onhover "eww update volume_rev=true"
|
||||
:onhoverlost "eww update volume_rev=false"
|
||||
(box
|
||||
:class "volume"
|
||||
:space-evenly false
|
||||
:orientation "v"
|
||||
(revealer
|
||||
:class "volume-bar"
|
||||
:transition "slideup"
|
||||
:reveal volume_rev
|
||||
(eventbox
|
||||
:cursor "pointer"
|
||||
:halign "center"
|
||||
(scale
|
||||
:orientation "v"
|
||||
:tooltip {volume == "muted" ? "Muted" : "${volume}%"}
|
||||
:value {volume == "muted" ? "0" : volume}
|
||||
:min 0
|
||||
:max 101
|
||||
:onchange "pamixer -u && pamixer --set-volume {}"
|
||||
:flipped true
|
||||
)
|
||||
)
|
||||
)
|
||||
(eventbox
|
||||
:cursor "pointer"
|
||||
:onscroll "echo {} | sed -e 's/up/--up/g' -e 's/down/--down/g' | xargs volume"
|
||||
(button
|
||||
:class "volume icon"
|
||||
:style {volume == 0 || volume == "muted" ? "color: #dd6777;" : "color: #cacaca;"}
|
||||
:tooltip {volume == "muted" ? "Muted" : "${volume}%" }
|
||||
:onclick "volume --toggle"
|
||||
{volume == 0 || volume == "muted" ? "" :
|
||||
volume < 30 ? "" :
|
||||
volume < 75 ? "" : ""}
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defwindow volume
|
||||
:monitor 0
|
||||
:geometry (geometry :x "1%"
|
||||
:y "0%"
|
||||
:height "75%"
|
||||
:width "25%"
|
||||
:anchor "center left")
|
||||
:reserve (struts :side "top" :distance "4%")
|
||||
(volume))
|
71
hypr-configs/hyprland/eww/wallpapers/wallpapers.yuck
Normal file
|
@ -0,0 +1,71 @@
|
|||
|
||||
(defwindow wallpaperselect
|
||||
:geometry (geometry
|
||||
:x 0
|
||||
:y 0
|
||||
:width 415
|
||||
:height 600
|
||||
:anchor "center")
|
||||
:stacking "overlay"
|
||||
:monitor 0
|
||||
:focusable true
|
||||
(box
|
||||
:class "popup"
|
||||
(wallpaperselectwidget)))
|
||||
|
||||
(defwidget wallpaperselectwidget []
|
||||
(eventbox
|
||||
;; :onhoverlost "${EWW_CMD} close wallpaperselect"
|
||||
(box
|
||||
:orientation "v"
|
||||
:class "unbarwidget"
|
||||
:space-evenly false
|
||||
(box
|
||||
:orientation "h"
|
||||
:space-evenly false
|
||||
(input
|
||||
:hexpand true
|
||||
:onaccept "./scripts/wallhaven.py search {}"
|
||||
:timeout "20000ms")
|
||||
(button
|
||||
:onclick "${EWW_CMD} update wallpapers=[] && ./scripts/wallhaven.py reset"
|
||||
;; :style "padding: 0px 8px 0px 3px;"
|
||||
(label
|
||||
:class "icon"
|
||||
:text "")))
|
||||
|
||||
(scroll
|
||||
:hscroll false
|
||||
:vscroll true
|
||||
:vexpand true
|
||||
(box
|
||||
:orientation "v"
|
||||
:space-evenly false
|
||||
:valign "start"
|
||||
(image
|
||||
:style "margin: 50px 0px 5px 0px;"
|
||||
:hexpand false
|
||||
:vexpand false
|
||||
:path "./image/fieshidle.gif"
|
||||
:visible {arraylength(wallpapers) == 0})
|
||||
|
||||
(label
|
||||
:visible {arraylength(wallpapers) == 0}
|
||||
:text "No wallpapers yet")
|
||||
|
||||
(for wall in wallpapers
|
||||
(box
|
||||
:orientation "v"
|
||||
:space-evenly false
|
||||
:class "mainentry"
|
||||
:spacing 5
|
||||
(button
|
||||
:onclick "./scripts/wallhaven.py select ${wall.url}"
|
||||
(image :image-height 225 :image-width 400 :path {wall.path}))
|
||||
(box
|
||||
:orientation "h"
|
||||
:space-evenly true
|
||||
(label :text "${wall.views} ")
|
||||
(label :text "${wall.fav} ")
|
||||
))))
|
||||
))))
|