feat: differentiate between laptop and desktop
447
eww_laptop/bar/eww.scss
Normal file
|
|
@ -0,0 +1,447 @@
|
|||
/** EWW.SCSS
|
||||
Created by saimoom **/
|
||||
*{
|
||||
all: unset;
|
||||
font-family: feather;
|
||||
font-family: DaddyTimeMono Nerd Font;
|
||||
}
|
||||
|
||||
/** General **/
|
||||
.bar_class {
|
||||
background-color: #0f0f17;
|
||||
border-radius: 16px;
|
||||
}
|
||||
.module {
|
||||
margin: 0px 0px 0px 0px;
|
||||
border-radius: 10px 16px 0px 10px;
|
||||
}
|
||||
|
||||
/** tooltip!! **/
|
||||
tooltip.background {
|
||||
background-color: #0f0f17;
|
||||
font-size: 18;
|
||||
border-radius: 10px;
|
||||
color: #bfc9db;
|
||||
}
|
||||
|
||||
tooltip label {
|
||||
margin: 6px;
|
||||
}
|
||||
|
||||
|
||||
/** Widgets **/
|
||||
|
||||
.clock_time_sep {
|
||||
font-size: 16;
|
||||
color: #bfc9db;
|
||||
margin: 0px 4px 1px 4px;
|
||||
}
|
||||
.clock_time_class, .clock_minute_class {
|
||||
font-size: 23;
|
||||
}
|
||||
.clock_date_class {
|
||||
font-size: 18;
|
||||
margin: 0px 20px 0px -1px;
|
||||
color: #d7beda;
|
||||
}
|
||||
.clock_minute_class {
|
||||
margin: 0px 20px 0px 3px;
|
||||
color: #bfc9db;
|
||||
}
|
||||
|
||||
.clock_time_class {
|
||||
color: #bfc9db;
|
||||
font-weight: bold;
|
||||
margin: 0px 5px 0px 0px;
|
||||
}
|
||||
|
||||
|
||||
.membar {
|
||||
color: #e0b089;
|
||||
background-color: #38384d;
|
||||
border-radius: 10px;
|
||||
}
|
||||
.batbar {
|
||||
color: #afbea2;
|
||||
background-color: #38384d;
|
||||
border-radius: 10px;
|
||||
}
|
||||
.brightbar trough highlight {
|
||||
background-image: linear-gradient(to right, #e4c9af 30%, #f2cdcd 50%, #e0b089 100% *50);
|
||||
border-radius: 10px;
|
||||
}
|
||||
.volbar trough highlight {
|
||||
background-image: linear-gradient(to right, #afcee0 30%, #a1bdce 50%, #77a5bf 100% *50);
|
||||
border-radius: 10px;
|
||||
}
|
||||
.volume_icon {
|
||||
font-size: 22;
|
||||
color: #a1bdce;
|
||||
margin: 0px 10px 0px 10px;
|
||||
}
|
||||
|
||||
|
||||
.module_essid {
|
||||
font-size: 18;
|
||||
color: #a1bdce;
|
||||
margin: 0px 10px 0px 0px;
|
||||
}
|
||||
.module-wif {
|
||||
font-size: 22;
|
||||
color: #a1bdce;
|
||||
border-radius: 100%;
|
||||
margin: 0px 10px 0px 5px;
|
||||
}
|
||||
|
||||
.iconmem {
|
||||
color: #e0b089;
|
||||
}
|
||||
.iconbat {
|
||||
color: #afbea2;
|
||||
}
|
||||
.iconbat, .iconmem {
|
||||
font-size: 15;
|
||||
margin: 10px;
|
||||
}
|
||||
.bright_icon {
|
||||
font-size: 22;
|
||||
color: #e4c9af;
|
||||
margin: 0px 10px 0px 10px;
|
||||
}
|
||||
|
||||
|
||||
.separ {
|
||||
color: #3e424f;
|
||||
font-weight: bold;
|
||||
font-size: 22px;
|
||||
margin: 0px 8px 0px 8px;
|
||||
}
|
||||
|
||||
.mem_module {
|
||||
background-color: #0f0f17;
|
||||
border-radius: 16px;
|
||||
margin: 0px 10px 0px 3px;
|
||||
}
|
||||
.bat_module {
|
||||
background-color: #0f0f17;
|
||||
border-radius: 16px;
|
||||
margin: 0px 10px 0px 10px;
|
||||
}
|
||||
|
||||
|
||||
scale trough {
|
||||
all: unset;
|
||||
background-color: #22242b;
|
||||
box-shadow: 0 2px 3px 2px #06060b;
|
||||
border-radius: 16px;
|
||||
min-height: 10px;
|
||||
min-width: 70px;
|
||||
margin: 0px 10px 0px 0px;
|
||||
}
|
||||
|
||||
.works {
|
||||
font-size: 27px;
|
||||
font-weight: normal;
|
||||
margin: 5px 0px 0px 20px;
|
||||
background-color: #0f0f17;
|
||||
}
|
||||
|
||||
.0 , .01, .02, .03, .04, .05, .06,
|
||||
.011, .022, .033, .044, .055, .066{
|
||||
margin: 0px 10px 0px 0px;
|
||||
}
|
||||
|
||||
/* Unoccupied */
|
||||
.0 {
|
||||
color: #3e424f;
|
||||
}
|
||||
|
||||
/* Occupied */
|
||||
.01, .02, .03, .04, .05, .06 {
|
||||
color: #bfc9db;
|
||||
}
|
||||
|
||||
/* Focused */
|
||||
.011, .022, .033, .044, .055, .066 {
|
||||
color: #a1bdce;
|
||||
}
|
||||
|
||||
|
||||
.song_cover_art {
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
min-height: 24px;
|
||||
min-width: 24px;
|
||||
margin: 10px;
|
||||
border-radius: 100px;
|
||||
}
|
||||
|
||||
.song {
|
||||
color: #a1bdce;
|
||||
font-size : 18px;
|
||||
font-weight : bold;
|
||||
margin : 3px 5px 0px 0px;
|
||||
}
|
||||
|
||||
.song_btn_play {
|
||||
color: #a1bdce;
|
||||
font-size : 28px;
|
||||
margin : 3px 0px 0px 5px;
|
||||
|
||||
}
|
||||
|
||||
|
||||
.song_btn_prev, .song_btn_next {
|
||||
color: #bfc9db;
|
||||
font-size : 24px;
|
||||
margin : 3px 0px 0px 5px;
|
||||
|
||||
}
|
||||
// Calendar
|
||||
.cal {
|
||||
background-color: #0f0f17;
|
||||
font-family: JetBrainsMono Nerd Font;
|
||||
font-size: 18px;
|
||||
font-weight: normal;
|
||||
|
||||
.cal-in {
|
||||
padding: 0px 10px 0px 10px;
|
||||
color: #bfc9db;
|
||||
|
||||
.cal {
|
||||
&.highlight {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
padding: 5px 5px 5px 5px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
calender {
|
||||
color: #bfc9db;
|
||||
}
|
||||
calendar:selected {
|
||||
color: #a1bdce;
|
||||
}
|
||||
|
||||
calendar.header {
|
||||
color: #a1bdce;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
calendar.button {
|
||||
color: #afbea2;
|
||||
}
|
||||
|
||||
calendar.highlight {
|
||||
color: #a1bdce;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
calendar:indeterminate {
|
||||
color: #bfc9db;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.sys_sep {
|
||||
color: #38384d;
|
||||
font-size: 18;
|
||||
margin: 0px 10px 0px 10px;
|
||||
}
|
||||
.sys_text_bat_sub, .sys_text_mem_sub {
|
||||
font-size: 16;
|
||||
color: #bbc5d7;
|
||||
margin: 5px 0px 0px 25px;
|
||||
}
|
||||
.sys_text_bat, .sys_text_mem {
|
||||
font-size: 21;
|
||||
font-weight: bold;
|
||||
margin: 14px 0px 0px 25px;
|
||||
}
|
||||
.sys_icon_bat, .sys_icon_mem {
|
||||
font-size: 30;
|
||||
margin: 30px;
|
||||
}
|
||||
.sys_win {
|
||||
background-color: #0f0f17;
|
||||
}
|
||||
.sys_bat {
|
||||
color: #afbea2;
|
||||
background-color: #38384d;
|
||||
border-radius: 10px;
|
||||
}
|
||||
.sys_mem {
|
||||
color: #e4c9af;
|
||||
background-color: #38384d;
|
||||
border-radius: 10px;
|
||||
}
|
||||
.sys_icon_bat, .sys_text_bat {
|
||||
color: #afbea2;
|
||||
}
|
||||
.sys_icon_mem, .sys_text_mem {
|
||||
color: #e4c9af;
|
||||
}
|
||||
.sys_bat_box {
|
||||
border-radius: 16px;
|
||||
margin: 15px 10px 10px 20px;
|
||||
}
|
||||
.sys_mem_box {
|
||||
border-radius: 16px;
|
||||
margin: 10px 10px 15px 20px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.music_pop {
|
||||
background-color: #0f0f17;
|
||||
border-radius: 16px;
|
||||
}
|
||||
.music_cover_art {
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
min-height: 100px;
|
||||
box-shadow: 5px 5px 5px 5px #06060b;
|
||||
min-width: 170px;
|
||||
margin: 20px;
|
||||
border-radius: 20px;
|
||||
}
|
||||
|
||||
.music {
|
||||
color: #a1bdce;
|
||||
font-size : 20px;
|
||||
font-weight : bold;
|
||||
margin : 20px 0px 0px -15px;
|
||||
}
|
||||
|
||||
.music_artist {
|
||||
color: #bbc5d7;
|
||||
font-size : 16px;
|
||||
font-weight : normal;
|
||||
margin : 0px 0px 0px 0px;
|
||||
}
|
||||
|
||||
.music_btn_prev, .music_btn_play, .music_btn_next {
|
||||
font-family: Iosevka Nerd Font;
|
||||
}
|
||||
.music_btn_prev {
|
||||
color: #bbc5d7;
|
||||
font-size : 32px;
|
||||
font-weight : normal;
|
||||
margin: 0px 0px 0px 0px;
|
||||
}
|
||||
.music_btn_play {
|
||||
color: #a1bdce;
|
||||
font-size : 48px;
|
||||
font-weight : normal;
|
||||
margin: 0px 0px 0px 0px;
|
||||
}
|
||||
.music_btn_next {
|
||||
color: #bbc5d7;
|
||||
font-size : 32px;
|
||||
font-weight : normal;
|
||||
margin: 0px 0px 0px 0px;
|
||||
}
|
||||
|
||||
.music_bar scale trough highlight {
|
||||
all: unset;
|
||||
background-image: linear-gradient(to right, #afcee0 30%, #a1bdce 50%, #77a5bf 100% *50);
|
||||
border-radius: 24px;
|
||||
}
|
||||
.music_bar scale trough {
|
||||
all: unset;
|
||||
background-color: #232232;
|
||||
box-shadow: 0 6px 5px 2px #06060b;
|
||||
border-radius: 24px;
|
||||
min-height: 13px;
|
||||
min-width: 190px;
|
||||
margin : -10px 10px 20px 0px;
|
||||
}
|
||||
|
||||
.audio-box {
|
||||
background-color: #0f0f17;
|
||||
border-radius: 16px;
|
||||
}
|
||||
.speaker_icon {
|
||||
background-size: cover;
|
||||
background-image: url('images/speaker.png');
|
||||
background-position: center;
|
||||
min-height: 70px;
|
||||
min-width: 75px;
|
||||
margin: 10px 20px 5px 20px;
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.speaker_text {
|
||||
color: #a1bdce;
|
||||
font-size : 26px;
|
||||
font-weight : bold;
|
||||
margin: 20px 0px 0px 0px;
|
||||
}
|
||||
|
||||
.speaker_bar scale trough highlight {
|
||||
all: unset;
|
||||
background-image: linear-gradient(to right, #afcee0 30%, #a1bdce 50%, #77a5bf 100% *50);
|
||||
border-radius: 24px;
|
||||
}
|
||||
.speaker_bar scale trough {
|
||||
all: unset;
|
||||
background-color: #232232;
|
||||
box-shadow: 0 6px 5px 2px #06060b;
|
||||
border-radius: 24px;
|
||||
min-height: 13px;
|
||||
min-width: 120px;
|
||||
margin : 0px 0px 5px 0px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
.mic_icon {
|
||||
background-size: cover;
|
||||
background-image: url('images/mic.png');
|
||||
background-position: center;
|
||||
min-height: 70px;
|
||||
min-width: 75px;
|
||||
margin: 5px 20px 20px 20px;
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.mic_text {
|
||||
color: #a1bdce;
|
||||
font-size : 26px;
|
||||
font-weight : bold;
|
||||
margin: 0px 0px 0px 0px;
|
||||
}
|
||||
|
||||
.mic_bar scale trough highlight {
|
||||
all: unset;
|
||||
background-image: linear-gradient(to right, #afcee0 30%, #a1bdce 50%, #77a5bf 100% *50);
|
||||
border-radius: 24px;
|
||||
}
|
||||
.mic_bar scale trough {
|
||||
all: unset;
|
||||
box-shadow: 0 6px 5px 2px #06060b;
|
||||
background-color: #232232;
|
||||
border-radius: 24px;
|
||||
min-height: 13px;
|
||||
min-width: 120px;
|
||||
margin : 0px 0px 20px 0px;
|
||||
}
|
||||
|
||||
.audio_sep {
|
||||
color: #38384d;
|
||||
font-size: 18;
|
||||
margin : 0px 0px 0px 0px;
|
||||
}
|
||||
|
||||
352
eww_laptop/bar/eww.yuck
Normal file
|
|
@ -0,0 +1,352 @@
|
|||
;; Variables
|
||||
(defpoll clock_time :interval "5m" "date +\%I")
|
||||
(defpoll clock_minute :interval "5s" "date +\%M")
|
||||
(defpoll clock_date :interval "10h" "date '+%d/%m'")
|
||||
(defpoll volume_percent :interval "3s" "amixer -D pulse sget Master | grep 'Left:' | awk -F'[][]' '{ print $2 }' | tr -d '%'")
|
||||
(defpoll mic_percent :interval "3s" "amixer -D pulse sget Capture | grep 'Left:' | awk -F'[][]' '{ print $2 }' | tr -d '%'")
|
||||
(defpoll brightness_percent :interval "5s" "brightnessctl -m -d intel_backlight | awk -F, '{print substr($4, 0, length($4)-1)}' | tr -d '%'")
|
||||
(defpoll battery :interval "15s" "./scripts/battery --bat")
|
||||
(defpoll battery_status :interval "1m" "./scripts/battery --bat-st")
|
||||
(defpoll memory :interval "15s" "scripts/memory")
|
||||
(defpoll memory_used_mb :interval "2m" "scripts/mem-ad used")
|
||||
(defpoll memory_total_mb :interval "2m" "scripts/mem-ad total")
|
||||
(defpoll memory_free_mb :interval "2m" "scripts/mem-ad free")
|
||||
(defvar vol_reveal false)
|
||||
(defvar br_reveal false)
|
||||
(defvar music_reveal false)
|
||||
(defvar wifi_rev false)
|
||||
(defvar time_rev false)
|
||||
(deflisten workspace "scripts/workspace")
|
||||
|
||||
(defvar eww "$HOME/.local/bin/eww/eww -c $HOME/.config/eww/bar")
|
||||
|
||||
|
||||
(defpoll COL_WLAN :interval "1m" "~/.config/eww/bar/scripts/wifi --COL")
|
||||
(defpoll ESSID_WLAN :interval "1m" "~/.config/eww/bar/scripts/wifi --ESSID")
|
||||
(defpoll WLAN_ICON :interval "1m" "~/.config/eww/bar/scripts/wifi --ICON")
|
||||
|
||||
|
||||
(defpoll song :interval "2s" "~/.config/eww/bar/scripts/music_info --song")
|
||||
(defpoll song_artist :interval "2s" "~/.config/eww/bar/scripts/music_info --artist")
|
||||
(defpoll current_status :interval "1s" "~/.config/eww/bar/scripts/music_info --time")
|
||||
(defpoll song_status :interval "2s" "~/.config/eww/bar/scripts/music_info --status")
|
||||
(defpoll cover_art :interval "2s" "~/.config/eww/bar/scripts/music_info --cover")
|
||||
|
||||
(defpoll calendar_day :interval "20h" "date '+%d'")
|
||||
(defpoll calendar_year :interval "20h" "date '+%Y'")
|
||||
|
||||
;; widgets
|
||||
|
||||
(defwidget wifi []
|
||||
(eventbox :onhover "${eww} update wifi_rev=true"
|
||||
:onhoverlost "${eww} update wifi_rev=false"
|
||||
(box :vexpand "false" :hexpand "false" :space-evenly "false"
|
||||
(button :class "module-wif" :onclick "networkmanager_dmenu" :wrap "false" :limit-width 12 :style "color: ${COL_WLAN};" WLAN_ICON)
|
||||
(revealer :transition "slideright"
|
||||
:reveal wifi_rev
|
||||
:duration "350ms"
|
||||
(label :class "module_essid"
|
||||
:text ESSID_WLAN
|
||||
:orientation "h"
|
||||
)))))
|
||||
|
||||
|
||||
(defwidget workspaces []
|
||||
(literal :content workspace))
|
||||
|
||||
|
||||
(defwidget bat []
|
||||
(box :class "bat_module" :vexpand "false" :hexpand "false"
|
||||
(circular-progress :value battery
|
||||
:class "batbar"
|
||||
:thickness 4
|
||||
(button
|
||||
:class "iconbat"
|
||||
:limit-width 2
|
||||
:tooltip "battery on ${battery}%"
|
||||
:show_truncated false
|
||||
:onclick "$HOME/.config/eww/bar/scripts/pop system"
|
||||
:wrap false
|
||||
""))))
|
||||
|
||||
|
||||
(defwidget mem []
|
||||
(box :class "mem_module" :vexpand "false" :hexpand "false"
|
||||
(circular-progress :value memory
|
||||
:class "membar"
|
||||
:thickness 4
|
||||
(button
|
||||
:class "iconmem"
|
||||
:limit-width 2
|
||||
:tooltip "using ${memory}% ram"
|
||||
:onclick "$HOME/.config/eww/bar/scripts/pop system"
|
||||
:show_truncated false
|
||||
:wrap false
|
||||
""))))
|
||||
|
||||
|
||||
|
||||
(defwidget sep []
|
||||
(box :class "module-2" :vexpand "false" :hexpand "false"
|
||||
(label :class "separ" :text "|")))
|
||||
|
||||
(defwidget clock_module []
|
||||
(eventbox :onhover "${eww} update time_rev=true"
|
||||
:onhoverlost "${eww} update time_rev=false"
|
||||
(box :class "module" :space-evenly "false" :orientation "h" :spacing "3"
|
||||
(label :text clock_time :class "clock_time_class" )
|
||||
(label :text "" :class "clock_time_sep" )
|
||||
(label :text clock_minute :class "clock_minute_class")
|
||||
(revealer :transition "slideleft"
|
||||
:reveal time_rev
|
||||
:duration "350ms"
|
||||
(button :class "clock_date_class"
|
||||
:onclick "$HOME/.config/eww/bar/scripts/pop calendar" clock_date
|
||||
)
|
||||
))))
|
||||
|
||||
(defwidget volume []
|
||||
(eventbox :onhover "${eww} update vol_reveal=true"
|
||||
:onhoverlost "${eww} update vol_reveal=false"
|
||||
(box :class "module-2" :space-evenly "false" :orientation "h" :spacing "3"
|
||||
(button :onclick "scripts/pop audio" :class "volume_icon" "")
|
||||
(revealer :transition "slideleft"
|
||||
:reveal vol_reveal
|
||||
:duration "350ms"
|
||||
(scale :class "volbar"
|
||||
:value volume_percent
|
||||
:orientation "h"
|
||||
:tooltip "${volume_percent}%"
|
||||
:max 100
|
||||
:min 0
|
||||
:onchange "amixer -D pulse sset Master {}%" )))))
|
||||
|
||||
(defwidget bright []
|
||||
(eventbox :onhover "${eww} update br_reveal=true" :onhoverlost "${eww} update br_reveal=false"
|
||||
(box :class "module-2" :space-evenly "false" :orientation "h" :spacing "3"
|
||||
(label :text "" :class "bright_icon" :tooltip "brightness")
|
||||
(revealer :transition "slideleft"
|
||||
:reveal br_reveal
|
||||
:duration "350ms"
|
||||
(scale :class "brightbar"
|
||||
:value brightness_percent
|
||||
:orientation "h"
|
||||
:tooltip "${brightness_percent}%"
|
||||
:max 100
|
||||
:min 0
|
||||
:onchange "brightnessctl set {}%" )))))
|
||||
|
||||
|
||||
|
||||
;; Music
|
||||
(defwidget music []
|
||||
(eventbox :onhover "${eww} update music_reveal=true"
|
||||
:onhoverlost "${eww} update music_reveal=false"
|
||||
(box :class "module-2" :orientation "h" :space-evenly "false" :vexpand "false" :hexpand "false"
|
||||
(box :class "song_cover_art" :vexpand "false" :hexpand "false" :style "background-image: url('${cover_art}');")
|
||||
(button :class "song" :wrap "true" :onclick "~/.config/eww/bar/scripts/pop music" song)
|
||||
(revealer :transition "slideright"
|
||||
:reveal music_reveal
|
||||
:duration "350ms"
|
||||
(box :vexpand "false" :hexpand "false" :oreintation "h"
|
||||
(button :class "song_btn_prev" :onclick "~/.config/eww/bar/scripts/music_info --prev" "")
|
||||
(button :class "song_btn_play" :onclick "~/.config/eww/bar/scripts/music_info --toggle" song_status)
|
||||
(button :class "song_btn_next" :onclick "~/.config/eww/bar/scripts/music_info --next" ""))))))
|
||||
|
||||
|
||||
|
||||
(defwidget left []
|
||||
(box :orientation "h"
|
||||
:space-evenly false
|
||||
:halign "end"
|
||||
:class "left_modules"
|
||||
(bright)
|
||||
(volume)
|
||||
(wifi)
|
||||
(sep)
|
||||
(bat)
|
||||
(mem)
|
||||
(sep)
|
||||
(clock_module)))
|
||||
|
||||
|
||||
(defwidget right []
|
||||
(box :orientation "h"
|
||||
:space-evenly false
|
||||
:halign "start"
|
||||
:class "right_modules"
|
||||
(workspaces)))
|
||||
|
||||
|
||||
(defwidget center []
|
||||
(box :orientation "h"
|
||||
:space-evenly false
|
||||
:halign "center"
|
||||
:class "center_modules"
|
||||
(music)))
|
||||
|
||||
(defwidget bar_1 []
|
||||
(box :class "bar_class"
|
||||
:orientation "h"
|
||||
(right)
|
||||
(center)
|
||||
(left)
|
||||
))
|
||||
|
||||
(defwindow bar
|
||||
:monitor 0
|
||||
:geometry (geometry :x "0%"
|
||||
:y "9px"
|
||||
:width "98%"
|
||||
:height "30px"
|
||||
:anchor "top center")
|
||||
:stacking "fg"
|
||||
:wm-ignore true
|
||||
:windowtype "dock"
|
||||
(bar_1))
|
||||
|
||||
(defwidget system []
|
||||
(box :class "sys_win" :orientation "v" :space-evenly "false" :hexpand "false" :vexpand "false" :spacing 0
|
||||
(box :class "sys_bat_box" :orientation "h" :space-evenly "false"
|
||||
(circular-progress :value battery
|
||||
:class "sys_bat"
|
||||
:thickness 9
|
||||
(label :text ""
|
||||
:class "sys_icon_bat"
|
||||
:limit-width 2
|
||||
:show_truncated false
|
||||
:wrap false))
|
||||
(box :orientation "v" :space-evenly "false" :spacing 0 :hexpand "false" :vexpand "false"
|
||||
(label :text "battery"
|
||||
:halign "start"
|
||||
:class "sys_text_bat"
|
||||
:limit-width 9
|
||||
:show_truncated false
|
||||
:wrap false)
|
||||
(label :text "${battery}%"
|
||||
:halign "start"
|
||||
:class "sys_text_bat_sub"
|
||||
:limit-width 22
|
||||
:show_truncated false
|
||||
:wrap false)
|
||||
(label :text "${battery_status}"
|
||||
:halign "start"
|
||||
:class "sys_text_bat_sub"
|
||||
:limit-width 22
|
||||
:show_truncated false
|
||||
:wrap false)))
|
||||
(label :text "" :class "sys_sep" :halign "center")
|
||||
(box :class "sys_mem_box" :orientation "h" :space-evenly "false" :halign "start"
|
||||
(circular-progress :value memory
|
||||
:class "sys_mem"
|
||||
:thickness 9
|
||||
(label :text ""
|
||||
:class "sys_icon_mem"
|
||||
:limit-width 2
|
||||
:show_truncated false
|
||||
:wrap false
|
||||
:angle 0.0))
|
||||
(box :orientation "v" :space-evenly "false" :spacing 0 :hexpand "false" :vexpand "false"
|
||||
(label :text "memory"
|
||||
:halign "start"
|
||||
:class "sys_text_mem"
|
||||
:limit-width 9
|
||||
:show_truncated false
|
||||
:wrap false)
|
||||
(label :text "${memory_used_mb} | ${memory_total_mb}mb "
|
||||
:halign "start"
|
||||
:class "sys_text_mem_sub"
|
||||
:limit-width 22
|
||||
:show_truncated false
|
||||
:wrap false)
|
||||
(label :text "${memory_free_mb}mb free"
|
||||
:halign "start"
|
||||
:class "sys_text_mem_sub"
|
||||
:limit-width 22
|
||||
:show_truncated false
|
||||
:wrap false)))))
|
||||
|
||||
(defwidget cal []
|
||||
(box :class "cal" :orientation "v"
|
||||
(box :class "cal-in"
|
||||
(calendar :class "cal"
|
||||
:day calendar_day
|
||||
:year calendar_year))))
|
||||
|
||||
(defwindow calendar
|
||||
:geometry (geometry :x "-20px"
|
||||
:y "7%"
|
||||
:anchor "top right"
|
||||
:width "270px"
|
||||
:height "60px")
|
||||
(cal))
|
||||
|
||||
|
||||
|
||||
(defwidget audio []
|
||||
(box :class "audio-box" :orientation "v" :space-evenly "false" :vexpand "false" :hexpand "false"
|
||||
(box :halign "v" :space-evenly "false" :hexpand "false" :vexpand "false"
|
||||
(box :class "speaker_icon" :orientation "v")
|
||||
(box :orientation "v" :halign "center" :vexpand "false" :hexpand "false"
|
||||
(label :class "speaker_text" :text "speaker" :valign "center" :halign "left" )
|
||||
(box :class "speaker_bar" :halign "center" :vexpand "false" :hexpand "false"
|
||||
(scale :value volume_percent
|
||||
:space-evenly "false"
|
||||
:orientation "h"
|
||||
:onchange "amixer -D pulse sset Master {}%"
|
||||
:tooltip "volume on ${volume_percent}%"
|
||||
:max 100
|
||||
:min 0))))
|
||||
(label :text "" :class "audio_sep" :halign "center")
|
||||
(box :halign "v" :space-evenly "false" :hexpand "false" :vexpand "false"
|
||||
(box :class "mic_icon" :orientation "v")
|
||||
(box :orientation "v" :halign "center" :vexpand "false" :hexpand "false"
|
||||
(label :class "mic_text" :text "mic" :valign "center" :halign "left" )
|
||||
(box :class "mic_bar" :halign "center" :vexpand "false" :hexpand "false"
|
||||
(scale :value mic_percent
|
||||
:space-evenly "false"
|
||||
:orientation "h"
|
||||
:tooltip "mic on ${mic_percent}%"
|
||||
:onchange "amixer -D pulse sset Capture {}%"
|
||||
:max 100
|
||||
:min 0))))))
|
||||
|
||||
(defwindow audio_ctl
|
||||
:geometry (geometry :x "-20px"
|
||||
:y "7%"
|
||||
:anchor "top right"
|
||||
:width "280px"
|
||||
:height "60px")
|
||||
(audio))
|
||||
|
||||
|
||||
(defwindow system
|
||||
:geometry (geometry :x "-20px"
|
||||
:y "7%"
|
||||
:anchor "top right"
|
||||
:width "290px"
|
||||
:height "120px")
|
||||
(system))
|
||||
|
||||
|
||||
|
||||
;; Music
|
||||
(defwidget music_pop []
|
||||
(box :class "music_pop" :orientation "h" :space-evenly "false" :vexpand "false" :hexpand "false"
|
||||
(box :class "music_cover_art" :vexpand "false" :hexpand "false" :style "background-image: url('${cover_art}');")
|
||||
(box :orientation "v" :spacing 20 :space-evenly "false" :vexpand "false" :hexpand "false"
|
||||
(label :halign "center" :class "music" :wrap "true" :limit-width 13 :text song)
|
||||
(label :halign "center" :class "music_artist" :wrap "true" :limit-width 15 :text song_artist)
|
||||
(box :orientation "h" :spacing 15 :halign "center" :space-evenly "false" :vexpand "false" :hexpand "false"
|
||||
(button :class "music_btn_prev" :onclick "~/.config/eww/bar/scripts/music_info --prev" "")
|
||||
(button :class "music_btn_play" :onclick "~/.config/eww/bar/scripts/music_info --toggle" song_status)
|
||||
(button :class "music_btn_next" :onclick "~/.config/eww/bar/scripts/music_info --next" ""))
|
||||
(box :class "music_bar" :halign "center" :vexpand "false" :hexpand "false" :space-evenly "false"
|
||||
(scale :onscroll "mpc -q seek {}" :min 0 :active "true" :max 100 :value current_status)))))
|
||||
|
||||
|
||||
;; music
|
||||
(defwindow music_win :stacking "fg" :focusable "false" :screen 1
|
||||
:geometry (geometry :x "0" :y "7%" :width 428 :height 104 :anchor "top center")
|
||||
(music_pop))
|
||||
|
||||
BIN
eww_laptop/bar/images/mic.png
Normal file
|
After Width: | Height: | Size: 39 KiB |
BIN
eww_laptop/bar/images/music.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
eww_laptop/bar/images/profile.png
Normal file
|
After Width: | Height: | Size: 134 KiB |
BIN
eww_laptop/bar/images/speaker.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
27
eww_laptop/bar/launch_bar
Executable file
|
|
@ -0,0 +1,27 @@
|
|||
#!/bin/bash
|
||||
|
||||
## Files and cmd
|
||||
FILE="$HOME/.cache/eww_launch.xyz"
|
||||
EWW="$HOME/.local/bin/eww/eww -c $HOME/.config/eww/bar"
|
||||
|
||||
## Run eww daemon if not running already
|
||||
if [[ ! `pidof eww` ]]; then
|
||||
${EWW} daemon
|
||||
sleep 1
|
||||
fi
|
||||
|
||||
## Open widgets
|
||||
run_eww() {
|
||||
${EWW} open-many \
|
||||
bar
|
||||
|
||||
}
|
||||
|
||||
## Launch or close widgets accordingly
|
||||
if [[ ! -f "$FILE" ]]; then
|
||||
touch "$FILE"
|
||||
run_eww && bspc config -m LVDS-1 top_padding 49
|
||||
else
|
||||
${EWW} close-all && killall eww
|
||||
rm "$FILE"
|
||||
fi
|
||||
17
eww_laptop/bar/scripts/battery
Executable file
|
|
@ -0,0 +1,17 @@
|
|||
#!/bin/bash
|
||||
|
||||
battery() {
|
||||
BAT=`ls /sys/class/power_supply | grep BAT | head -n 1`
|
||||
cat /sys/class/power_supply/${BAT}/capacity
|
||||
}
|
||||
battery_stat() {
|
||||
BAT=`ls /sys/class/power_supply | grep BAT | head -n 1`
|
||||
cat /sys/class/power_supply/${BAT}/status
|
||||
}
|
||||
|
||||
if [[ "$1" == "--bat" ]]; then
|
||||
battery
|
||||
elif [[ "$1" == "--bat-st" ]]; then
|
||||
battery_stat
|
||||
fi
|
||||
|
||||
15
eww_laptop/bar/scripts/mem-ad
Executable file
|
|
@ -0,0 +1,15 @@
|
|||
#!/bin/sh
|
||||
|
||||
|
||||
total="$(free -m | grep Mem: | awk '{ print $2 }')"
|
||||
used="$(free -m | grep Mem: | awk '{ print $3 }')"
|
||||
|
||||
free=$(expr $total - $used)
|
||||
|
||||
if [ "$1" = "total" ]; then
|
||||
echo $total
|
||||
elif [ "$1" = "used" ]; then
|
||||
echo $used
|
||||
elif [ "$1" = "free" ]; then
|
||||
echo $free
|
||||
fi
|
||||
3
eww_laptop/bar/scripts/memory
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
printf "%.0f\n" $(free -m | grep Mem | awk '{print ($3/$2)*100}')
|
||||
98
eww_laptop/bar/scripts/music_info
Executable file
|
|
@ -0,0 +1,98 @@
|
|||
#!/bin/bash
|
||||
# scripts by adi1090x
|
||||
|
||||
## Get data
|
||||
STATUS="$(mpc status)"
|
||||
COVER="/tmp/.music_cover.png"
|
||||
MUSIC_DIR="$HOME/Music"
|
||||
|
||||
## Get status
|
||||
get_status() {
|
||||
if [[ $STATUS == *"[playing]"* ]]; then
|
||||
echo ""
|
||||
else
|
||||
echo "奈"
|
||||
fi
|
||||
}
|
||||
|
||||
## 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 ""
|
||||
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 "images/music.png"
|
||||
fi
|
||||
}
|
||||
|
||||
## Execute accordingly
|
||||
if [[ "$1" == "--song" ]]; then
|
||||
get_song
|
||||
elif [[ "$1" == "--artist" ]]; then
|
||||
get_artist
|
||||
elif [[ "$1" == "--status" ]]; then
|
||||
get_status
|
||||
elif [[ "$1" == "--time" ]]; then
|
||||
get_time
|
||||
elif [[ "$1" == "--ctime" ]]; then
|
||||
get_ctime
|
||||
elif [[ "$1" == "--ttime" ]]; then
|
||||
get_ttime
|
||||
elif [[ "$1" == "--cover" ]]; then
|
||||
get_cover
|
||||
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
|
||||
92
eww_laptop/bar/scripts/pop
Executable file
|
|
@ -0,0 +1,92 @@
|
|||
#!/bin/bash
|
||||
|
||||
calendar() {
|
||||
LOCK_FILE="$HOME/.cache/eww-calendar.lock"
|
||||
EWW_BIN="$HOME/.local/bin/eww/eww"
|
||||
|
||||
run() {
|
||||
${EWW_BIN} -c $HOME/.config/eww/bar open calendar
|
||||
}
|
||||
|
||||
# Open widgets
|
||||
if [[ ! -f "$LOCK_FILE" ]]; then
|
||||
${EWW_BIN} -c $HOME/.config/eww/bar close system music_win audio_ctl
|
||||
touch "$LOCK_FILE"
|
||||
run && echo "ok good!"
|
||||
else
|
||||
${EWW_BIN} -c $HOME/.config/eww/bar close calendar
|
||||
rm "$LOCK_FILE" && echo "closed"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
system() {
|
||||
LOCK_FILE_MEM="$HOME/.cache/eww-system.lock"
|
||||
EWW_BIN="$HOME/.local/bin/eww/eww"
|
||||
|
||||
run() {
|
||||
${EWW_BIN} -c $HOME/.config/eww/bar open system
|
||||
}
|
||||
|
||||
# Open widgets
|
||||
if [[ ! -f "$LOCK_FILE_MEM" ]]; then
|
||||
${EWW_BIN} -c $HOME/.config/eww/bar close calendar music_win audio_ctl
|
||||
touch "$LOCK_FILE_MEM"
|
||||
run && echo "ok good!"
|
||||
else
|
||||
${EWW_BIN} -c $HOME/.config/eww/bar close system
|
||||
rm "$LOCK_FILE_MEM" && echo "closed"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
music() {
|
||||
LOCK_FILE_SONG="$HOME/.cache/eww-song.lock"
|
||||
EWW_BIN="$HOME/.local/bin/eww/eww"
|
||||
|
||||
run() {
|
||||
${EWW_BIN} -c $HOME/.config/eww/bar open music_win
|
||||
}
|
||||
|
||||
# Open widgets
|
||||
if [[ ! -f "$LOCK_FILE_SONG" ]]; then
|
||||
${EWW_BIN} -c $HOME/.config/eww/bar close system calendar
|
||||
touch "$LOCK_FILE_SONG"
|
||||
run && echo "ok good!"
|
||||
else
|
||||
${EWW_BIN} -c $HOME/.config/eww/bar close music_win
|
||||
rm "$LOCK_FILE_SONG" && echo "closed"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
|
||||
audio() {
|
||||
LOCK_FILE_AUDIO="$HOME/.cache/eww-audio.lock"
|
||||
EWW_BIN="$HOME/.local/bin/eww/eww"
|
||||
|
||||
run() {
|
||||
${EWW_BIN} -c $HOME/.config/eww/bar open audio_ctl
|
||||
}
|
||||
|
||||
# Open widgets
|
||||
if [[ ! -f "$LOCK_FILE_AUDIO" ]]; then
|
||||
${EWW_BIN} -c $HOME/.config/eww/bar close system calendar music
|
||||
touch "$LOCK_FILE_AUDIO"
|
||||
run && echo "ok good!"
|
||||
else
|
||||
${EWW_BIN} -c $HOME/.config/eww/bar close audio_ctl
|
||||
rm "$LOCK_FILE_AUDIO" && echo "closed"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
if [ "$1" = "calendar" ]; then
|
||||
calendar
|
||||
elif [ "$1" = "system" ]; then
|
||||
system
|
||||
elif [ "$1" = "music" ]; then
|
||||
music
|
||||
elif [ "$1" = "audio" ]; then
|
||||
audio
|
||||
fi
|
||||
26
eww_laptop/bar/scripts/wifi
Executable file
|
|
@ -0,0 +1,26 @@
|
|||
#!/bin/bash
|
||||
|
||||
status=$(nmcli g | grep -oE "disconnected")
|
||||
essid=$(nmcli c | grep wlp2s0 | awk '{print ($1)}')
|
||||
|
||||
if [ $status ] ; then
|
||||
icon=""
|
||||
text=""
|
||||
col="#575268"
|
||||
|
||||
else
|
||||
icon=""
|
||||
text="${essid}"
|
||||
col="#a1bdce"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
if [[ "$1" == "--COL" ]]; then
|
||||
echo $col
|
||||
elif [[ "$1" == "--ESSID" ]]; then
|
||||
echo $text
|
||||
elif [[ "$1" == "--ICON" ]]; then
|
||||
echo $icon
|
||||
fi
|
||||
|
||||
56
eww_laptop/bar/scripts/workspace
Executable file
|
|
@ -0,0 +1,56 @@
|
|||
#!/bin/sh
|
||||
workspaces() {
|
||||
|
||||
ws1="1"
|
||||
ws2="2"
|
||||
ws3="3"
|
||||
ws4="4"
|
||||
ws5="5"
|
||||
ws6="6"
|
||||
|
||||
# Unoccupied
|
||||
un="0"
|
||||
|
||||
# check if Occupied
|
||||
o1=$(bspc query -D -d .occupied --names | grep "$ws1" )
|
||||
o2=$(bspc query -D -d .occupied --names | grep "$ws2" )
|
||||
o3=$(bspc query -D -d .occupied --names | grep "$ws3" )
|
||||
o4=$(bspc query -D -d .occupied --names | grep "$ws4" )
|
||||
o5=$(bspc query -D -d .occupied --names | grep "$ws5" )
|
||||
o6=$(bspc query -D -d .occupied --names | grep "$ws6" )
|
||||
|
||||
# check if Focused
|
||||
f1=$(bspc query -D -d focused --names | grep "$ws1" )
|
||||
f2=$(bspc query -D -d focused --names | grep "$ws2" )
|
||||
f3=$(bspc query -D -d focused --names | grep "$ws3" )
|
||||
f4=$(bspc query -D -d focused --names | grep "$ws4" )
|
||||
f5=$(bspc query -D -d focused --names | grep "$ws5" )
|
||||
f6=$(bspc query -D -d focused --names | grep "$ws6" )
|
||||
|
||||
ic_1=""
|
||||
ic_2=""
|
||||
ic_3=""
|
||||
ic_4=""
|
||||
ic_5=""
|
||||
ic_6=""
|
||||
if [ $f1 ]; then
|
||||
ic_1=""
|
||||
elif [ $f2 ]; then
|
||||
ic_2=""
|
||||
elif [ $f3 ]; then
|
||||
ic_3=""
|
||||
elif [ $f4 ]; then
|
||||
ic_4=""
|
||||
elif [ $f5 ]; then
|
||||
ic_5=""
|
||||
elif [ $f6 ]; then
|
||||
ic_6=""
|
||||
fi
|
||||
|
||||
echo "(box :class \"works\" :orientation \"h\" :spacing 5 :space-evenly \"false\" (button :onclick \"bspc desktop -f $ws1\" :class \"$un$o1$f1\" \"$ic_1\") (button :onclick \"bspc desktop -f $ws2\" :class \"$un$o2$f2\" \"$ic_2\") (button :onclick \"bspc desktop -f $ws3\" :class \"$un$o3$f3\" \"$ic_3\") (button :onclick \"bspc desktop -f $ws4\" :class \"$un$o4$f4\" \"$ic_4\") (button :onclick \"bspc desktop -f $ws5\" :class \"$un$o5$f5\" \"$ic_5\") (button :onclick \"bspc desktop -f $ws6\" :class \"$un$o6$f6\" \"$ic_6\"))"
|
||||
|
||||
}
|
||||
workspaces
|
||||
bspc subscribe desktop node_transfer | while read -r _ ; do
|
||||
workspaces
|
||||
done
|
||||
665
eww_laptop/eww.scss
Normal file
|
|
@ -0,0 +1,665 @@
|
|||
/** EWW.SCSS
|
||||
Created by saimoom **/
|
||||
* {
|
||||
all: unset;
|
||||
font-family: feather;
|
||||
font-family: DaddyTimeMono Nerd Font;
|
||||
}
|
||||
|
||||
/** General **/
|
||||
.bar_class {
|
||||
background-color: #0f0f17;
|
||||
border-radius: 10px;
|
||||
}
|
||||
.module {
|
||||
margin: 0px 0px 0px 0px;
|
||||
border-radius: 10px 10px 0px 10px;
|
||||
}
|
||||
|
||||
/** tooltip!! **/
|
||||
tooltip.background {
|
||||
background-color: #0f0f17;
|
||||
font-size: 14;
|
||||
border-radius: 10px;
|
||||
color: #bfc9db;
|
||||
}
|
||||
|
||||
tooltip label {
|
||||
margin: 3px;
|
||||
}
|
||||
|
||||
/** Widgets **/
|
||||
|
||||
.clock_time_sep {
|
||||
font-size: 20;
|
||||
color: #bfc9db;
|
||||
margin: 0px 0px 1px 0px;
|
||||
}
|
||||
.clock_time_class,
|
||||
.clock_minute_class {
|
||||
font-size: 24;
|
||||
}
|
||||
.clock_date_class {
|
||||
font-size: 21;
|
||||
margin: 0px 5px 0px 5px;
|
||||
color: #d7beda;
|
||||
}
|
||||
.clock_minute_class {
|
||||
margin: 0px 5px 0px 2px;
|
||||
color: #bfc9db;
|
||||
}
|
||||
.clock_time_class {
|
||||
color: #bfc9db;
|
||||
font-weight: bold;
|
||||
margin: 0px 0px 0px 8px;
|
||||
}
|
||||
|
||||
.membar {
|
||||
color: #e0b089;
|
||||
background-color: #38384d;
|
||||
border-radius: 10px;
|
||||
}
|
||||
.batbar {
|
||||
color: #afbea2;
|
||||
background-color: #38384d;
|
||||
border-radius: 10px;
|
||||
}
|
||||
.brightbar trough highlight {
|
||||
background-image: linear-gradient(
|
||||
to right,
|
||||
#e4c9af 30%,
|
||||
#f2cdcd 50%,
|
||||
#e0b089 100% * 50
|
||||
);
|
||||
border-radius: 10px;
|
||||
}
|
||||
.brightbar scale trough {
|
||||
all: unset;
|
||||
box-shadow: 0 6px 5px 2px #06060b;
|
||||
background-color: #232232;
|
||||
border-radius: 24px;
|
||||
min-height: 10px;
|
||||
min-width: 100px;
|
||||
margin: 0px -15px 5px 0px;
|
||||
}
|
||||
.volbar trough highlight {
|
||||
background-image: linear-gradient(
|
||||
to right,
|
||||
#afcee0 30%,
|
||||
#a1bdce 50%,
|
||||
#77a5bf 100% * 50
|
||||
);
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.module_app_text {
|
||||
font-size: 23;
|
||||
margin: 2px 0px 0px 0px;
|
||||
}
|
||||
.bright_icon {
|
||||
font-size: 22;
|
||||
color: #e4c9af;
|
||||
margin: 0px 10px 0px -10px;
|
||||
}
|
||||
.bright_icon_overlay {
|
||||
font-size: 28;
|
||||
color: #e4c9af;
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
margin: 0px 27px 0px 3px;
|
||||
}
|
||||
.volume_icon {
|
||||
font-size: 22;
|
||||
color: #a1bdce;
|
||||
margin: 0px 5px 0px 0px;
|
||||
}
|
||||
.module-wif {
|
||||
font-size: 22;
|
||||
color: #a1bdce;
|
||||
border-radius: 100%;
|
||||
margin: 0px 10px 0px 0px;
|
||||
}
|
||||
.module_essid {
|
||||
font-size: 18;
|
||||
color: #a1bdce;
|
||||
margin: 0px 5px 0px -1px;
|
||||
}
|
||||
|
||||
.iconmem {
|
||||
font-size: 23;
|
||||
margin: 4px -3px 4px 0px;
|
||||
color: #e0b089;
|
||||
}
|
||||
.mem_padding {
|
||||
margin: 10px;
|
||||
}
|
||||
.iconbat {
|
||||
font-size: 23;
|
||||
color: #afbea2;
|
||||
}
|
||||
|
||||
.separ {
|
||||
color: #3e424f;
|
||||
font-weight: bold;
|
||||
font-size: 22px;
|
||||
margin: 0px 0px 0px 0px;
|
||||
}
|
||||
|
||||
.mem_module {
|
||||
background-color: #0f0f17;
|
||||
border-radius: 16px;
|
||||
margin: 0px 10px 0px 0px;
|
||||
}
|
||||
.bat_module {
|
||||
background-color: #0f0f17;
|
||||
border-radius: 16px;
|
||||
margin: 0px 10px 0px 10px;
|
||||
}
|
||||
|
||||
scale trough {
|
||||
all: unset;
|
||||
background-color: #22242b;
|
||||
box-shadow: 0 2px 3px 2px #06060b;
|
||||
border-radius: 16px;
|
||||
min-height: 10px;
|
||||
min-width: 70px;
|
||||
margin: 0px 10px 0px 0px;
|
||||
}
|
||||
|
||||
.works {
|
||||
font-size: 27px;
|
||||
font-weight: normal;
|
||||
margin: 0px 0px 0px 15px;
|
||||
background-color: #0f0f17;
|
||||
}
|
||||
|
||||
.0,
|
||||
.01,
|
||||
.02,
|
||||
.03,
|
||||
.04,
|
||||
.05,
|
||||
.06,
|
||||
.011,
|
||||
.022,
|
||||
.033,
|
||||
.044,
|
||||
.055,
|
||||
.066 {
|
||||
margin: 0px 10px 0px 0px;
|
||||
}
|
||||
|
||||
/* Unoccupied */
|
||||
.0 {
|
||||
color: #3e424f;
|
||||
}
|
||||
|
||||
/* Occupied */
|
||||
.01,
|
||||
.02,
|
||||
.03,
|
||||
.04,
|
||||
.05,
|
||||
.06 {
|
||||
color: #bfc9db;
|
||||
}
|
||||
|
||||
/* Focused */
|
||||
.011,
|
||||
.022,
|
||||
.033,
|
||||
.044,
|
||||
.055,
|
||||
.066 {
|
||||
color: #a1bdce;
|
||||
}
|
||||
|
||||
.song_cover_art {
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
min-height: 24px;
|
||||
min-width: 24px;
|
||||
margin: 10px;
|
||||
border-radius: 100px;
|
||||
}
|
||||
|
||||
.song {
|
||||
color: #a1bdce;
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
margin: 3px 5px 0px 0px;
|
||||
}
|
||||
|
||||
.song_btn_play {
|
||||
color: #a1bdce;
|
||||
font-size: 28px;
|
||||
margin: 3px 0px 0px 5px;
|
||||
}
|
||||
|
||||
.song_btn_prev,
|
||||
.song_btn_next {
|
||||
color: #bfc9db;
|
||||
font-size: 24px;
|
||||
margin: 3px 0px 0px 5px;
|
||||
}
|
||||
// Calendar
|
||||
.cal {
|
||||
border-radius: 10px;
|
||||
background-color: #0f0f17;
|
||||
font-family: JetBrainsMono Nerd Font;
|
||||
font-size: 18px;
|
||||
font-weight: normal;
|
||||
|
||||
.cal-in {
|
||||
padding: 0px 10px 0px 10px;
|
||||
color: #bfc9db;
|
||||
|
||||
.cal {
|
||||
&.highlight {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
padding: 5px 5px 5px 5px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
calender {
|
||||
color: #bfc9db;
|
||||
}
|
||||
calendar:selected {
|
||||
color: #a1bdce;
|
||||
}
|
||||
|
||||
calendar.header {
|
||||
color: #a1bdce;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
calendar.button {
|
||||
color: #afbea2;
|
||||
}
|
||||
|
||||
calendar.highlight {
|
||||
color: #a1bdce;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
calendar:indeterminate {
|
||||
color: #bfc9db;
|
||||
}
|
||||
|
||||
.sys_sep {
|
||||
color: #38384d;
|
||||
font-size: 18;
|
||||
margin: 0px 10px 0px 10px;
|
||||
}
|
||||
.sys_text_bat_sub,
|
||||
.sys_text_mem_sub {
|
||||
font-size: 16;
|
||||
color: #bbc5d7;
|
||||
margin: 5px 0px 0px 25px;
|
||||
}
|
||||
.sys_text_bat,
|
||||
.sys_text_mem {
|
||||
font-size: 21;
|
||||
font-weight: bold;
|
||||
margin: 14px 0px 0px 25px;
|
||||
}
|
||||
.sys_icon_bat,
|
||||
.sys_icon_mem {
|
||||
font-size: 30;
|
||||
margin: 30px;
|
||||
}
|
||||
.sys_win {
|
||||
border-radius: 10px;
|
||||
background-color: #0f0f17;
|
||||
}
|
||||
.sys_bat {
|
||||
color: #afbea2;
|
||||
background-color: #38384d;
|
||||
border-radius: 10px;
|
||||
}
|
||||
.sys_mem {
|
||||
color: #e4c9af;
|
||||
background-color: #38384d;
|
||||
border-radius: 10px;
|
||||
}
|
||||
.sys_icon_bat,
|
||||
.sys_text_bat {
|
||||
color: #afbea2;
|
||||
}
|
||||
.sys_icon_mem,
|
||||
.sys_text_mem {
|
||||
color: #e4c9af;
|
||||
}
|
||||
.sys_bat_box {
|
||||
border-radius: 16px;
|
||||
margin: 15px 10px 10px 20px;
|
||||
}
|
||||
.sys_mem_box {
|
||||
border-radius: 16px;
|
||||
margin: 10px 10px 15px 20px;
|
||||
}
|
||||
|
||||
.music_pop {
|
||||
background-color: #0f0f17;
|
||||
border-radius: 16px;
|
||||
}
|
||||
.music_cover_art {
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
min-height: 100px;
|
||||
box-shadow: 5px 5px 5px 5px #06060b;
|
||||
min-width: 170px;
|
||||
margin: 20px;
|
||||
border-radius: 20px;
|
||||
}
|
||||
|
||||
.music {
|
||||
color: #a1bdce;
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
margin: 20px 0px 0px -15px;
|
||||
}
|
||||
|
||||
.music_artist {
|
||||
color: #bbc5d7;
|
||||
font-size: 16px;
|
||||
font-weight: normal;
|
||||
margin: 0px 0px 0px 0px;
|
||||
}
|
||||
|
||||
.music_btn_prev,
|
||||
.music_btn_play,
|
||||
.music_btn_next {
|
||||
font-family: Iosevka Nerd Font;
|
||||
}
|
||||
.music_btn_prev {
|
||||
color: #bbc5d7;
|
||||
font-size: 32px;
|
||||
font-weight: normal;
|
||||
margin: 0px 0px 0px 0px;
|
||||
}
|
||||
.music_btn_play {
|
||||
color: #a1bdce;
|
||||
font-size: 48px;
|
||||
font-weight: normal;
|
||||
margin: 0px 0px 0px 0px;
|
||||
}
|
||||
.music_btn_next {
|
||||
color: #bbc5d7;
|
||||
font-size: 32px;
|
||||
font-weight: normal;
|
||||
margin: 0px 0px 0px 0px;
|
||||
}
|
||||
|
||||
.music_bar scale trough highlight {
|
||||
all: unset;
|
||||
background-image: linear-gradient(
|
||||
to right,
|
||||
#afcee0 30%,
|
||||
#a1bdce 50%,
|
||||
#77a5bf 100% * 50
|
||||
);
|
||||
border-radius: 24px;
|
||||
}
|
||||
.music_bar scale trough {
|
||||
all: unset;
|
||||
background-color: #232232;
|
||||
box-shadow: 0 6px 5px 2px #06060b;
|
||||
border-radius: 24px;
|
||||
min-height: 13px;
|
||||
min-width: 190px;
|
||||
margin: -10px 10px 20px 0px;
|
||||
}
|
||||
|
||||
.audio-box {
|
||||
background-color: #0f0f17;
|
||||
border-radius: 16px;
|
||||
}
|
||||
.speaker_icon {
|
||||
background-size: cover;
|
||||
background-image: url("images/speaker.png");
|
||||
background-position: center;
|
||||
min-height: 40px;
|
||||
min-width: 45px;
|
||||
margin: 10px 10px 5px 20px;
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.speaker_text {
|
||||
color: #a1bdce;
|
||||
font-size: 22px;
|
||||
font-weight: bold;
|
||||
margin: 5px 15px 0px 15px;
|
||||
}
|
||||
.bright_text {
|
||||
color: #a1bdce;
|
||||
font-size: 22px;
|
||||
font-weight: bold;
|
||||
margin: 5px 15px 0px 25px;
|
||||
}
|
||||
|
||||
.change_audio_box {
|
||||
margin: 0px 0px 0px 10px;
|
||||
}
|
||||
|
||||
.change_audio {
|
||||
color: #a1bdce;
|
||||
margin: 0px 50px 0px 50px;
|
||||
font-size: 30px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.speaker_bar scale trough highlight {
|
||||
all: unset;
|
||||
background-image: linear-gradient(
|
||||
to right,
|
||||
#afcee0 30%,
|
||||
#a1bdce 50%,
|
||||
#77a5bf 100% * 50
|
||||
);
|
||||
border-radius: 24px;
|
||||
}
|
||||
.speaker_bar scale trough {
|
||||
all: unset;
|
||||
background-color: #232232;
|
||||
box-shadow: 0 6px 5px 2px #06060b;
|
||||
border-radius: 24px;
|
||||
min-height: 10px;
|
||||
min-width: 100px;
|
||||
margin: 0px 0px 5px 0px;
|
||||
}
|
||||
|
||||
.mic_icon {
|
||||
background-size: cover;
|
||||
background-image: url("images/mic.png");
|
||||
background-position: center;
|
||||
min-height: 40px;
|
||||
min-width: 45px;
|
||||
margin: 5px 20px 20px 10px;
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.mic_text {
|
||||
color: #a1bdce;
|
||||
font-size: 26px;
|
||||
font-weight: bold;
|
||||
margin: 0px 0px 0px 0px;
|
||||
}
|
||||
|
||||
.mic_bar scale trough highlight {
|
||||
all: unset;
|
||||
background-image: linear-gradient(
|
||||
to right,
|
||||
#afcee0 30%,
|
||||
#a1bdce 50%,
|
||||
#77a5bf 100% * 50
|
||||
);
|
||||
border-radius: 24px;
|
||||
}
|
||||
.mic_bar scale trough {
|
||||
all: unset;
|
||||
box-shadow: 0 6px 5px 2px #06060b;
|
||||
background-color: #232232;
|
||||
border-radius: 24px;
|
||||
min-height: 10px;
|
||||
min-width: 100px;
|
||||
margin: 6px 0px 20px 0px;
|
||||
}
|
||||
|
||||
.audio_sep {
|
||||
color: #38384d;
|
||||
font-size: 18;
|
||||
margin: 0px 0px 0px 0px;
|
||||
}
|
||||
|
||||
//cockpit stuff
|
||||
|
||||
.cockpit_class {
|
||||
all: unset;
|
||||
}
|
||||
|
||||
.cockpit_clock {
|
||||
padding: 0px 30px 0px 30px;
|
||||
}
|
||||
|
||||
.cockpit_box {
|
||||
background-color: #06060b;
|
||||
border-radius: 10px;
|
||||
margin: 5px;
|
||||
padding: 0px 5px 0px 5px;
|
||||
opacity: 0.85;
|
||||
}
|
||||
|
||||
.cockpit_button_shutdown {
|
||||
color: #FF1111;
|
||||
font-size: 40px;
|
||||
margin: 0px 5px -30px 5px;
|
||||
}
|
||||
|
||||
.cockpit_button_sleep {
|
||||
color: #0055FF;
|
||||
font-size: 40px;
|
||||
margin: 0px 5px -30px 5px;
|
||||
}
|
||||
|
||||
.cockpit_button_restart {
|
||||
color: #11FF11;
|
||||
font-size: 40px;
|
||||
margin: 0px 5px -30px 5px;
|
||||
}
|
||||
|
||||
.song_info {
|
||||
margin: -50px 0px 0px 0px;
|
||||
font-size: 20px;
|
||||
color: grey;
|
||||
}
|
||||
|
||||
.album_cover {
|
||||
margin: -60px 10px 20px 10px;
|
||||
padding: 0px;
|
||||
background-size: cover;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.cockpit_button_settings {
|
||||
color: #d35d6e;
|
||||
font-size: 35px;
|
||||
margin: -30px 5px 0px 5px;
|
||||
}
|
||||
|
||||
.weather-icon {
|
||||
font-size: 80px;
|
||||
margin: 10px 0px 35px 25px;
|
||||
font-family: Iosevka;
|
||||
}
|
||||
|
||||
.weather-stat {
|
||||
font-size: 30px;
|
||||
font-weight: bold;
|
||||
color: #d35d6e;
|
||||
margin: -20px 0px 10px 0px;
|
||||
}
|
||||
|
||||
.temperature {
|
||||
color: grey;
|
||||
font-size: 48px;
|
||||
font-weight: 900;
|
||||
margin: 0px 0px 0px 20px;
|
||||
}
|
||||
.weather-quote {
|
||||
margin: 30px -5px 0px 20px;
|
||||
font-size: 20px;
|
||||
}
|
||||
.weather-quote-head,
|
||||
.weather-quote-tail {
|
||||
color: grey;
|
||||
font-size: 18px;
|
||||
margin: 10px 0px 10px 10px;
|
||||
}
|
||||
|
||||
.cockpit_clock_left {
|
||||
font-size: 50px;
|
||||
font-weight: bold;
|
||||
color: #d35d6e;
|
||||
margin: 5px -20px -30px 0px;
|
||||
}
|
||||
|
||||
.cockpit_clock_right {
|
||||
font-size: 50px;
|
||||
font-weight: bold;
|
||||
color: #d35d6e;
|
||||
margin: 5px 0px -30px -20px;
|
||||
}
|
||||
|
||||
.cockpit_date {
|
||||
font-size: 50px;
|
||||
font-weight: bold;
|
||||
color: #d35d6e;
|
||||
margin: -30px -20px 0px -20px;
|
||||
}
|
||||
|
||||
.cockpit_clock_sep {
|
||||
font-size: 40px;
|
||||
font-weight: bold;
|
||||
color: #d35d6e;
|
||||
margin: 0px -20px -30px -20px;
|
||||
}
|
||||
|
||||
.cockpit_docs {
|
||||
color: #FF1111;
|
||||
font-size: 30px;
|
||||
margin: 10px 0px -10px 0px;
|
||||
}
|
||||
|
||||
.cockpit_pics {
|
||||
color: #11FF11;
|
||||
font-size: 30px;
|
||||
margin: 0px 0px 0px 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.cockpit_gits {
|
||||
color: #0055FF;
|
||||
font-size: 30px;
|
||||
margin: -20px 0px 10px 0px;
|
||||
}
|
||||
|
||||
.cockpit_sep_bottom {
|
||||
color: #38384d;
|
||||
font-size: 18;
|
||||
margin: -10px 0px 0px 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.cockpit_sep_top {
|
||||
color: #38384d;
|
||||
font-size: 18;
|
||||
margin: 0px 0px -10px 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
513
eww_laptop/eww.yuck
Normal file
|
|
@ -0,0 +1,513 @@
|
|||
;; date definitions ;;
|
||||
(defpoll clock_time :interval "1m" "date +\%I")
|
||||
(defpoll clock_minute :interval "5s" "date +\%M")
|
||||
(defpoll clock_date :interval "10h" "date '+%d/%m'")
|
||||
|
||||
;; volume definitions ;;
|
||||
(defpoll volume_percent :interval "1s" "pactl get-sink-volume @DEFAULT_SINK@ | awk -F '/' ' { print $2 } ' | tr -d ' %'")
|
||||
(defpoll mic_percent :interval "1s" "pactl get-source-volume @DEFAULT_SOURCE@ | awk -F'/' '{ print $2 }' | tr -d ' %'")
|
||||
(defpoll brightness_percent :interval "5s" "brightnessctl -m -d intel_backlight | awk -F, '{print substr($4, 0, length($4)-1)}' | tr -d '%'")
|
||||
|
||||
;; battery definitions ;;
|
||||
(defpoll battery_status :interval "5s" "./scripts/battery stat")
|
||||
(defpoll battery-capacity :interval "5s" "scripts/battery percent")
|
||||
(defpoll battery :interval "5s" "scripts/battery icon")
|
||||
|
||||
;; memory definitions ;;
|
||||
(defpoll memory :interval "15s" "scripts/memory")
|
||||
(defpoll memory_used_mb :interval "2m" "scripts/mem-ad used")
|
||||
(defpoll memory_total_mb :interval "2m" "scripts/mem-ad total")
|
||||
(defpoll memory_free_mb :interval "2m" "scripts/mem-ad free")
|
||||
|
||||
;; wifi definitions ;;
|
||||
(defpoll COL_WLAN :interval "1m" "~/.config/eww/scripts/wifi --COL")
|
||||
(defpoll ESSID_WLAN :interval "1m" "~/.config/eww/scripts/wifi --ESSID")
|
||||
(defpoll WLAN_ICON :interval "1m" "~/.config/eww/scripts/wifi --ICON")
|
||||
|
||||
;; music definitions ;;
|
||||
(defpoll Song_info :interval "2s" "scripts/music_control")
|
||||
(defpoll Thumbnail :interval "2s" "scripts/music_control2")
|
||||
|
||||
;; current window ;;
|
||||
;;(defpoll currentWindow :interval "100ms" "hyprctl activewindow | grep class | awk -F ':' '{ print $2 }'")
|
||||
|
||||
;; calendar definitions ;;
|
||||
(defpoll calendar_day :interval "20h" "date '+%d'")
|
||||
(defpoll calendar_year :interval "20h" "date '+%Y'")
|
||||
|
||||
;; Weather vars
|
||||
(defpoll weather-icon :interval "20m" "cat ~/.cache/weather/weather-icon")
|
||||
(defpoll temperature :interval "20m" "cat ~/.cache/weather/weather-degree")
|
||||
(defpoll weather-hex :interval "20m" "cat ~/.cache/weather/weather-hex")
|
||||
(defpoll weather-stat :interval "20m" "cat ~/.cache/weather/weather-stat")
|
||||
(defpoll weather-stat-side :interval "20m" "~/.config/eww/scripts/weather-trimmer")
|
||||
(defpoll weather-quote :interval "20m" "~/.config/eww/scripts/getwethquote")
|
||||
|
||||
;; simple variables ;;
|
||||
(defvar eww "$HOME/.local/bin/eww -c $HOME/.config/eww")
|
||||
(defvar vol_reveal false)
|
||||
(defvar br_reveal false)
|
||||
(defvar music_reveal false)
|
||||
(defvar wifi_rev false)
|
||||
(defvar time_rev false)
|
||||
(deflisten workspace "scripts/workspace")
|
||||
(deflisten currentName "scripts/current_name")
|
||||
|
||||
|
||||
;; widgets
|
||||
|
||||
|
||||
;; wifi ;;
|
||||
(defwidget wifi []
|
||||
(eventbox :onhover "${eww} update wifi_rev=true"
|
||||
:onhoverlost "${eww} update wifi_rev=false"
|
||||
(box :vexpand "false" :hexpand "false" :space-evenly "false"
|
||||
(button :class "module-wif" :onclick "hyprctl dispatch exec 'alacritty -e nmtui' && ${eww} update wifi_rev=false" :wrap "false" :limit-width 12 :style "color: ${COL_WLAN};" WLAN_ICON)
|
||||
(revealer :transition "slideright"
|
||||
:reveal wifi_rev
|
||||
:duration "350ms"
|
||||
(button :class "module_essid" :onclick "hyprctl dispatch exec 'alacritty -e nmtui' && ${eww} update wifi_rev=false" :wrap "false" :limit-width 12 :style "color: ${COL_WLAN};" ESSID_WLAN)))))
|
||||
|
||||
(defwidget bluetooth []
|
||||
(box :vexpand "false" :hexpand "false" :space-evenly "false"
|
||||
(button :class "module-wif" :onclick "hyprctl dispatch exec 'blueman-manager'" :wrap "false" :limit-width 12 :style "color: ${COL_WLAN};" "")
|
||||
))
|
||||
|
||||
;; workspaces ;;
|
||||
(defwidget workspaces []
|
||||
(literal :content workspace))
|
||||
|
||||
|
||||
;; Battery ;;
|
||||
(defwidget bat []
|
||||
(box :class "bat_module" :vexpand "false" :hexpand "false"
|
||||
(button
|
||||
:class "iconbat"
|
||||
:tooltip "Battery: ${battery-capacity}%"
|
||||
:show_truncated false
|
||||
:onclick "$HOME/.config/eww/scripts/pop system"
|
||||
:wrap false
|
||||
"${battery}")))
|
||||
|
||||
;; memory ;;
|
||||
(defwidget mem []
|
||||
(box :class "mem_module" :vexpand "false" :hexpand "false"
|
||||
(button :class "iconmem"
|
||||
:onclick "$HOME/.config/eww/scripts/pop system"
|
||||
(circular-progress :value memory
|
||||
:class "membar"
|
||||
:thickness 4
|
||||
:tooltip "using ${memory}% ram"
|
||||
:show_truncated false
|
||||
:wrap false
|
||||
(label :class "mem_padding" :text "")
|
||||
))))
|
||||
|
||||
|
||||
;; seperator ;;
|
||||
(defwidget sep []
|
||||
(box :class "module-2" :vexpand "false" :hexpand "false"
|
||||
(label :class "separ" :text "|")))
|
||||
|
||||
;; clock ;;
|
||||
(defwidget clock_module []
|
||||
(eventbox :onhover "${eww} update time_rev=true"
|
||||
:onhoverlost "${eww} update time_rev=false"
|
||||
(button :onclick "scripts/pop calendar"
|
||||
(box :class "module" :space-evenly "false" :orientation "h" :spacing "3"
|
||||
(label :text clock_time :class "clock_time_class" )
|
||||
(label :text "" :class "clock_time_sep" )
|
||||
(label :text clock_minute :class "clock_minute_class")
|
||||
(revealer :class "clock_date_class"
|
||||
:transition "slideleft"
|
||||
:reveal time_rev
|
||||
:duration "350ms"
|
||||
clock_date
|
||||
)))))
|
||||
|
||||
;; speaker volume ;;
|
||||
(defwidget volume []
|
||||
(box :class "module-2" :space-evenly "false" :orientation "h" :spacing "3"
|
||||
(button :onclick "scripts/pop audio" :class "volume_icon" "")))
|
||||
|
||||
;; screen brightness ;;
|
||||
(defwidget bright []
|
||||
(box :class "module-2" :space-evenly "false" :orientation "h" :spacing "3"
|
||||
(button :onclick "scripts/pop brightness" :class "bright_icon" "")))
|
||||
|
||||
;; brightness widget ;;
|
||||
(defwidget brightness_overlay []
|
||||
(eventbox :onhover "scripts/pop hoverCreate"
|
||||
:onhoverlost "scripts/pop hoverGet brightness_window"
|
||||
(box :class "audio-box" :halign "center" :orientation "v" :vexpand "false" :hexpand "false"
|
||||
(label :class "speaker_text" :text "brightness" :halign "left" )
|
||||
(box :class "brightbar" :halign "center" :vexpand "false" :hexpand "false"
|
||||
(label :class "bright_icon_overlay" :text "")
|
||||
(scale :value brightness_percent
|
||||
:space-evenly "false"
|
||||
:orientation "h"
|
||||
:onchange "brightnessctl set {}%"
|
||||
:tooltip "brightness on ${brightness_percent}%"
|
||||
:max 100
|
||||
:min 0)))))
|
||||
|
||||
;; audio volume widget ;;
|
||||
(defwidget audio []
|
||||
(eventbox :onhover "scripts/pop hoverCreate"
|
||||
:onhoverlost "scripts/pop hoverGet audio_ctl"
|
||||
(box :class "audio-box" :orientation "v" :space-evenly "false" :vexpand "false" :hexpand "false"
|
||||
(box :halign "center" :space-evenly "false" :hexpand "false" :vexpand "false"
|
||||
(box :class "speaker_icon" :orientation "v")
|
||||
(box :orientation "v" :halign "center" :vexpand "false" :hexpand "false"
|
||||
(label :class "speaker_text" :text "speaker" :valign "center" :halign "left" )
|
||||
(box :class "speaker_bar" :halign "center" :vexpand "false" :hexpand "false"
|
||||
(scale :value volume_percent
|
||||
:space-evenly "false"
|
||||
:orientation "h"
|
||||
:onchange "pactl set-sink-volume @DEFAULT_SINK@ {}%"
|
||||
:tooltip "volume on ${volume_percent}%"
|
||||
:max 100
|
||||
:min 0))))
|
||||
(label :text "" :class "audio_sep" :halign "center")
|
||||
(box :halign "center" :space-evenly "false" :hexpand "false" :vexpand "false"
|
||||
(box :class "mic_icon" :orientation "v")
|
||||
(box :orientation "v" :halign "center" :vexpand "false" :hexpand "false"
|
||||
(label :class "speaker_text" :text "mic" :valign "center" :halign "left" )
|
||||
(box :class "mic_bar" :halign "center" :vexpand "false" :hexpand "false"
|
||||
(scale :value mic_percent
|
||||
:space-evenly "false"
|
||||
:orientation "h"
|
||||
:tooltip "mic on ${mic_percent}%"
|
||||
:onchange "pactl set-source-volume @DEFAULT_SOURCE@ {}%"
|
||||
:max 100
|
||||
:min 0))))
|
||||
(label :text "" :class "audio_sep" :halign "center")
|
||||
(box :halign "center" :space-evenly "false" :hexpand "false" :vexpand "false"
|
||||
(label :class "bright_icon_overlay" :orientation "v" :text "")
|
||||
(box :orientation "v" :halign "center" :vexpand "false" :hexpand "false"
|
||||
(label :class "bright_text" :text "lux" :valign "center" :halign "right" )
|
||||
(box :class "brightbar" :halign "center" :vexpand "false" :hexpand "false"
|
||||
(scale :value brightness_percent
|
||||
:space-evenly "false"
|
||||
:orientation "h"
|
||||
:tooltip "brightness ${brightness_percent}%"
|
||||
:onchange "brightnessctl set {}%"
|
||||
:max 100
|
||||
:min 0))))
|
||||
(label :text "" :class "audio_sep" :halign "center")
|
||||
(box :class "change_audio_box" :halign "center" :spac`e-evenly "false" :hexpand "false" :vexpand "false"
|
||||
(box :class "change_audio" :orientation "v" :halign "left"
|
||||
(button :onclick "scripts/change-audio internal" ""))
|
||||
(box :class "change_audio" :orientation "v" :halign "right"
|
||||
(button :onclick "scripts/change-audio bluetooth" ""))
|
||||
))))
|
||||
|
||||
(defwidget cname []
|
||||
(literal :content currentName))
|
||||
|
||||
;; calendar ;;
|
||||
(defwidget cal []
|
||||
(eventbox :onhover "scripts/pop hoverCreate"
|
||||
:onhoverlost "scripts/pop hoverGet calendar"
|
||||
(box :class "cal" :orientation "v"
|
||||
(box :class "cal-in"
|
||||
(calendar :class "cal"
|
||||
:day calendar_day
|
||||
:year calendar_year)))))
|
||||
|
||||
(defwidget system []
|
||||
(eventbox :onhover "scripts/pop hoverCreate"
|
||||
:onhoverlost "scripts/pop hoverGet system"
|
||||
(box :class "sys_win" :orientation "v" :space-evenly "false" :hexpand "false" :vexpand "false" :spacing 0
|
||||
(box :class "sys_bat_box" :orientation "h" :space-evenly "false"
|
||||
(circular-progress :value battery-capacity
|
||||
:class "sys_bat"
|
||||
:thickness 9
|
||||
(label :text ""
|
||||
:class "sys_icon_bat"
|
||||
:limit-width 2
|
||||
:show_truncated false
|
||||
:wrap false))
|
||||
(box :orientation "v" :space-evenly "false" :spacing 0 :hexpand "false" :vexpand "false"
|
||||
(label :text "battery"
|
||||
:halign "start"
|
||||
:class "sys_text_bat"
|
||||
:limit-width 9
|
||||
:show_truncated false
|
||||
:wrap false)
|
||||
(label :text "${battery-capacity}%"
|
||||
:halign "start"
|
||||
:class "sys_text_bat_sub"
|
||||
:limit-width 22
|
||||
:show_truncated false
|
||||
:wrap false)
|
||||
(label :text "${battery_status}"
|
||||
:halign "start"
|
||||
:class "sys_text_bat_sub"
|
||||
:limit-width 22
|
||||
:show_truncated false
|
||||
:wrap false)))
|
||||
(label :text "" :class "sys_sep" :halign "center")
|
||||
(box :class "sys_mem_box" :orientation "h" :space-evenly "false" :halign "start"
|
||||
(circular-progress :value memory
|
||||
:class "sys_mem"
|
||||
:thickness 9
|
||||
(label :text ""
|
||||
:class "sys_icon_mem"
|
||||
:limit-width 2
|
||||
:show_truncated false
|
||||
:wrap false
|
||||
:angle 0.0))
|
||||
(box :orientation "v" :space-evenly "false" :spacing 0 :hexpand "false" :vexpand "false"
|
||||
(label :text "memory"
|
||||
:halign "start"
|
||||
:class "sys_text_mem"
|
||||
:limit-width 9
|
||||
:show_truncated false
|
||||
:wrap false)
|
||||
(label :text "${memory_used_mb} | ${memory_total_mb}mb "
|
||||
:halign "start"
|
||||
:class "sys_text_mem_sub"
|
||||
:limit-width 22
|
||||
:show_truncated false
|
||||
:wrap false)
|
||||
(label :text "${memory_free_mb}mb free"
|
||||
:halign "start"
|
||||
:class "sys_text_mem_sub"
|
||||
:limit-width 22
|
||||
:show_truncated false
|
||||
:wrap false))))))
|
||||
|
||||
;; cockpit widget ;;
|
||||
(defwidget cockpit []
|
||||
(box :orientation "h"
|
||||
(box :class "cockpit_class"
|
||||
:orientation "h"
|
||||
(box :orientation "v"
|
||||
(box :class "cockpit_box" :orientation "v"
|
||||
(box
|
||||
(button :class "cockpit_button_shutdown" :onclick "hyprctl dispatch exec 'shutdown now'" "")
|
||||
(button :class "cockpit_button_restart" :onclick "hyprctl dispatch exec reboot" "")
|
||||
(button :class "cockpit_button_sleep" :onclick "hyprctl dispatch exec 'playerctl -a pause & swaylock -c 000000 & systemctl suspend'" ""))
|
||||
(label :text "" :class "audio_sep" :halign "center")
|
||||
(box
|
||||
(button :class "cockpit_button_settings" :onclick "hyprctl dispatch exec 'pavucontrol'" "")
|
||||
(button :class "cockpit_button_settings" :onclick "scripts/change-audio bluetooth" "")))
|
||||
(box :class "cockpit_box" :orientation "v"
|
||||
(button :class "cockpit_docs" :onclick "hyprctl dispatch exec nautilus $HOME/Documents" "Documents ")
|
||||
(label :text "" :class "cockpit_sep_top" :halign "center")
|
||||
(button :class "cockpit_pics" :onclick "hyprctl dispatch exec nautilus $HOME/Pictures" "Pictures ")
|
||||
(label :text "" :class "cockpit_sep_bottom" :halign "center")
|
||||
(button :class "cockpit_gits" :onclick "hyprctl dispatch exec 'alacritty --working-directory $HOME/gits'" "gits ")))
|
||||
(box :orientation "v"
|
||||
(box :class "cockpit_box" :orientation "v"
|
||||
(box :class "cockpit_clock"
|
||||
(label :text clock_time :class "cockpit_clock_left" )
|
||||
(label :text "" :class "cockpit_clock_sep" )
|
||||
(label :text clock_minute :class "cockpit_clock_right"))
|
||||
(label :text "" :class "audio_sep" :halign "center")
|
||||
(box :class "cockpit_clock"
|
||||
(label :text clock_date :class "cockpit_date")
|
||||
))
|
||||
(box :class "cockpit_box" (weather)))
|
||||
(box :width 300 :height 200 :class "cockpit_box" :orientation "v"
|
||||
(box :class "song_info"
|
||||
(label :wrap true :text "${Song_info}"))
|
||||
(box :class "album_cover" :style 'background-image: url("${Thumbnail}")')
|
||||
)))
|
||||
)
|
||||
|
||||
;; weather ;;
|
||||
(defwidget weather []
|
||||
(box :orientation "v" :space-evenly "false"
|
||||
(box :orientation "h" :space-evenly "false"
|
||||
(box :class "weather-icon" :style "color: ${weather-hex}" {weather-icon})
|
||||
(box :class "temperature" "${temperature}"))
|
||||
(box :orientation "v" :space-evenly "false"
|
||||
(box :class "weather-stat" {weather-stat}))
|
||||
(box :class "weather-quote-head"
|
||||
(label :wrap true :text {weather-quote}))))
|
||||
|
||||
;; left side but displayed right? ;;
|
||||
(defwidget left []
|
||||
(box :orientation "h"
|
||||
:space-evenly false
|
||||
:halign "end"
|
||||
:class "left_modules"
|
||||
(volume)
|
||||
(wifi)
|
||||
(bluetooth)
|
||||
(sep)
|
||||
(bat)
|
||||
(mem)
|
||||
(sep)
|
||||
(clock_module)))
|
||||
|
||||
;; right side but displayed left? ;;
|
||||
(defwidget right []
|
||||
(box :orientation "h"
|
||||
:space-evenly false
|
||||
:halign "start"
|
||||
:class "right_modules"
|
||||
(workspaces)))
|
||||
|
||||
;; center widget ;;
|
||||
(defwidget center []
|
||||
(box :orientation "h"
|
||||
:space-evenly false
|
||||
:halign "center"
|
||||
:class "center_modules"
|
||||
(cname)))
|
||||
|
||||
;; bar as widget;;
|
||||
(defwidget bar_1 []
|
||||
(box :class "bar_class"
|
||||
:orientation "h"
|
||||
(right)
|
||||
(center)
|
||||
(left)
|
||||
))
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; Drawing Windows ;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(defwindow calendar
|
||||
:monitor 0
|
||||
:geometry (geometry :x "20px"
|
||||
:y "2px"
|
||||
:anchor "top right"
|
||||
:width "270px"
|
||||
:height "60px")
|
||||
:stacking "overlay"
|
||||
(cal))
|
||||
|
||||
(defwindow audio_ctl
|
||||
:monitor 0
|
||||
:geometry (geometry :x "120px"
|
||||
:y "2px"
|
||||
:anchor "top right"
|
||||
:width "250px"
|
||||
:height "330px")
|
||||
:stacking "overlay"
|
||||
(audio))
|
||||
|
||||
(defwindow brightness_window
|
||||
:monitor 0
|
||||
:geometry (geometry :x "250px"
|
||||
:y "2px"
|
||||
:anchor "top right"
|
||||
:width "280px"
|
||||
:height "60px")
|
||||
:stacking "overlay"
|
||||
(brightness_overlay))
|
||||
|
||||
;; music again .. ;;
|
||||
;; (defwindow music_win :stacking "fg" :focusable "false" :screen 1
|
||||
;; :geometry (geometry :x "0" :y "7%" :width 428 :height 104 :anchor "top center")
|
||||
;; (music_pop))
|
||||
|
||||
(defwindow system
|
||||
:monitor 0
|
||||
:geometry (geometry :x "50px"
|
||||
:y "2px"
|
||||
:anchor "top right"
|
||||
:width "290px"
|
||||
:height "120px")
|
||||
:stacking "overlay"
|
||||
(system))
|
||||
|
||||
;; draw the bar ;;
|
||||
(defwindow bar
|
||||
:monitor 0
|
||||
:geometry (geometry :x "0%"
|
||||
:y "1px"
|
||||
:width "99%"
|
||||
:height "20px"
|
||||
:anchor "top center")
|
||||
:stacking "bg"
|
||||
:wm-ignore false
|
||||
:exclusive true
|
||||
(bar_1))
|
||||
|
||||
;; draw the bar ;;
|
||||
(defwindow cockpit_window_0
|
||||
:monitor 0
|
||||
:geometry (geometry
|
||||
:width "600px"
|
||||
:height "500px"
|
||||
:anchor "center")
|
||||
:stacking "overlay"
|
||||
:wm-ignore false
|
||||
:exclusive true
|
||||
(cockpit))
|
||||
|
||||
(defwindow calendar1
|
||||
:monitor 1
|
||||
:geometry (geometry :x "20px"
|
||||
:y "2px"
|
||||
:anchor "top right"
|
||||
:width "270px"
|
||||
:height "60px")
|
||||
:stacking "overlay"
|
||||
(cal))
|
||||
|
||||
(defwindow audio_ctl1
|
||||
:monitor 1
|
||||
:geometry (geometry :x "120px"
|
||||
:y "2px"
|
||||
:anchor "top right"
|
||||
:width "250px"
|
||||
:height "330px")
|
||||
:stacking "overlay"
|
||||
(audio))
|
||||
|
||||
(defwindow brightness_window1
|
||||
:monitor 1
|
||||
:geometry (geometry :x "250px"
|
||||
:y "2px"
|
||||
:anchor "top right"
|
||||
:width "280px"
|
||||
:height "60px")
|
||||
:stacking "overlay"
|
||||
(brightness_overlay))
|
||||
|
||||
;; music again .. ;;
|
||||
;; (defwindow music_win1 :stacking "fg" :focusable "false" :screen 1
|
||||
;; :geometry (geometry :x "0" :y "7%" :width 428 :height 104 :anchor "top center")
|
||||
;; (music_pop))
|
||||
|
||||
(defwindow system1
|
||||
:monitor 1
|
||||
:geometry (geometry :x "50px"
|
||||
:y "2px"
|
||||
:anchor "top right"
|
||||
:width "290px"
|
||||
:height "120px")
|
||||
:stacking "overlay"
|
||||
(system))
|
||||
|
||||
;; draw the bar ;;
|
||||
(defwindow bar1
|
||||
:monitor 1
|
||||
:geometry (geometry :x "0%"
|
||||
:y "1px"
|
||||
:width "99%"
|
||||
:height "20px"
|
||||
:anchor "top center")
|
||||
:stacking "bg"
|
||||
:wm-ignore false
|
||||
:exclusive true
|
||||
(bar_1))
|
||||
|
||||
;; draw the bar ;;
|
||||
(defwindow cockpit_window_1
|
||||
:monitor 1
|
||||
:geometry (geometry
|
||||
:width "600px"
|
||||
:height "500px"
|
||||
:anchor "center")
|
||||
:stacking "overlay"
|
||||
:wm-ignore false
|
||||
:exclusive true
|
||||
(cockpit))
|
||||
|
||||
1
eww_laptop/eww_laptop
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
/home/dashie/gits/dotFiles/eww_laptop
|
||||
BIN
eww_laptop/images/mic.png
Normal file
|
After Width: | Height: | Size: 39 KiB |
BIN
eww_laptop/images/music.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
eww_laptop/images/profile.png
Normal file
|
After Width: | Height: | Size: 134 KiB |
BIN
eww_laptop/images/speaker.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
27
eww_laptop/launch_bar
Executable file
|
|
@ -0,0 +1,27 @@
|
|||
#!/bin/bash
|
||||
|
||||
## Files and cmd
|
||||
FILE="$HOME/.cache/eww_launch.xyz"
|
||||
EWW="$HOME/.local/bin/eww -c $HOME/.config/eww"
|
||||
|
||||
## Run eww daemon if not running already
|
||||
if [[ ! `pidof eww` ]]; then
|
||||
${EWW} daemon
|
||||
sleep 1
|
||||
fi
|
||||
|
||||
## Open widgets
|
||||
run_eww() {
|
||||
${EWW} open-many \
|
||||
bar
|
||||
|
||||
}
|
||||
|
||||
## Launch or close widgets accordingly
|
||||
if [[ ! -f "$FILE" ]]; then
|
||||
touch "$FILE"
|
||||
run_eww && bspc config -m LVDS-1 top_padding 49
|
||||
else
|
||||
${EWW} close-all && killall eww
|
||||
rm "$FILE"
|
||||
fi
|
||||
31
eww_laptop/scripts/audio_devices
Executable file
|
|
@ -0,0 +1,31 @@
|
|||
#!/bin/bash
|
||||
CLIENTS=$(pactl list sink-inputs | grep "application.process.binary" | awk -F '= ' ' { print $2 } ' | tr -d '"')
|
||||
|
||||
readarray -t lines <<<"$CLIENTS"
|
||||
|
||||
printf "%s\n" "${lines[@]}"
|
||||
echo ${lines[2]}
|
||||
|
||||
|
||||
#echo "(box :class \"works\" :orientation \"h\" :spacing 5 :space-evenly \"false\" (button :onclick \"hyprctl dispatch workspace 1\" :class \"$un$o1$f1\" \"$ic_1\") (button :onclick \"hyprctl dispatch workspace 2\" :class \"$un$o2$f2\" \"$ic_2\") (button :onclick \"hyprctl dispatch workspace 3\" :class \"$un$o3$f3\" \"$ic_3\") (button :onclick \"hyprctl dispatch workspace 4\" :class \"$un$o4$f4\" \"$ic_4\") (button :onclick \"hyprctl dispatch workspace 5\" :class \"$un$o5$f5\" \"$ic_5\") (button :onclick \"hyprctl dispatch workspace 6\" :class \"$un$o6$f6\" \"$ic_6\") (button :onclick \"hyprctl dispatch workspace 7\" :class \"$un$o7$f7\" \"$ic_7\") (button :onclick \"hyprctl dispatch workspace 8\" :class \"$un$o8$f8\" \"$ic_8\"))"
|
||||
|
||||
# (eventbox :onhover "scripts/pop hoverCreate"
|
||||
# :onhoverlost "scripts/pop hoverGet audio_ctl"
|
||||
# (box :class "audio-box" :orientation "v" :space-evenly "false" :vexpand "false" :hexpand "false"
|
||||
|
||||
# (box :halign "center" :space-evenly "false" :hexpand "false" :vexpand "false"
|
||||
# (box :class "speaker_icon" :orientation "v")
|
||||
# (box :orientation "v" :halign "center" :vexpand "false" :hexpand "false"
|
||||
# (label :class "speaker_text" :text "speaker" :valign "center" :halign "left" )
|
||||
# (box :class "speaker_bar" :halign "center" :vexpand "false" :hexpand "false"
|
||||
# (scale :value volume_percent
|
||||
# :space-evenly "false"
|
||||
# :orientation "h"
|
||||
# :onchange "pactl set-sink-volume @DEFAULT_SINK@ {}%"
|
||||
# :tooltip "volume on ${volume_percent}%"
|
||||
# :max 100
|
||||
# :min 0))))
|
||||
|
||||
# (label :text "" :class "audio_sep" :halign "center")
|
||||
|
||||
# ))))
|
||||
76
eww_laptop/scripts/battery
Executable file
|
|
@ -0,0 +1,76 @@
|
|||
#!/bin/bash
|
||||
|
||||
bat=/sys/class/power_supply/BAT0/
|
||||
per="$(cat "$bat/capacity")"
|
||||
char="$(cat "$bat/status")"
|
||||
|
||||
icon() {
|
||||
|
||||
#[ $(cat "$bat/status") = Charging ] && echo "" && exit
|
||||
|
||||
if [ "$char" == "Charging" ]; then
|
||||
if [ "$per" -gt "90" ]; then
|
||||
icon=""
|
||||
elif [ "$per" -gt "80" ]; then
|
||||
icon=""
|
||||
elif [ "$per" -gt "70" ]; then
|
||||
icon=""
|
||||
elif [ "$per" -gt "60" ]; then
|
||||
icon=""
|
||||
elif [ "$per" -gt "50" ]; then
|
||||
icon=""
|
||||
elif [ "$per" -gt "40" ]; then
|
||||
icon=""
|
||||
elif [ "$per" -gt "30" ]; then
|
||||
icon=""
|
||||
elif [ "$per" -gt "20" ]; then
|
||||
icon=""
|
||||
elif [ "$per" -gt "10" ]; then
|
||||
icon=""
|
||||
elif [ "$per" -gt "0" ]; then
|
||||
icon=""
|
||||
else
|
||||
echo && exit
|
||||
fi
|
||||
else
|
||||
if [ "$per" -gt "90" ]; then
|
||||
icon=""
|
||||
elif [ "$per" -gt "80" ]; then
|
||||
icon=""
|
||||
elif [ "$per" -gt "70" ]; then
|
||||
icon=""
|
||||
elif [ "$per" -gt "60" ]; then
|
||||
icon=""
|
||||
elif [ "$per" -gt "50" ]; then
|
||||
icon=""
|
||||
elif [ "$per" -gt "40" ]; then
|
||||
icon=""
|
||||
elif [ "$per" -gt "30" ]; then
|
||||
icon=""
|
||||
elif [ "$per" -gt "20" ]; then
|
||||
icon=""
|
||||
elif [ "$per" -gt "10" ]; then
|
||||
icon=""
|
||||
elif [ "$per" -gt "0" ]; then
|
||||
icon=""
|
||||
notify-send -u critical "Battery Low" "Connect Charger"
|
||||
else
|
||||
echo && exit
|
||||
fi
|
||||
fi
|
||||
echo "$icon"
|
||||
}
|
||||
|
||||
percent() {
|
||||
echo $per
|
||||
}
|
||||
|
||||
stat() {
|
||||
echo $char
|
||||
}
|
||||
|
||||
[ "$1" = "icon" ] && icon && exit
|
||||
[ "$1" = "percent" ] && percent && exit
|
||||
[ "$1" = 'stat' ] && stat && exit
|
||||
exit
|
||||
|
||||
35
eww_laptop/scripts/change-audio
Executable file
|
|
@ -0,0 +1,35 @@
|
|||
#! /bin/bash
|
||||
|
||||
internal() {
|
||||
SPEAKER=$(pactl list sinks | grep "Name" | grep "alsa" | awk -F ': ' '{ print $2 }')
|
||||
if [ "$SPEAKER" != "" ]; then
|
||||
pactl set-default-sink "$SPEAKER"
|
||||
pactl set-sink-mute "$SPEAKER" false
|
||||
notify-send "changed audio to internal speakers "
|
||||
else
|
||||
notify-send "failed, not available!"
|
||||
fi
|
||||
}
|
||||
|
||||
bluetooth() {
|
||||
SPEAKER=$(pactl list sinks | grep "Name" | grep "blue" | awk -F ': ' '{ print $2 }')
|
||||
if [ "$SPEAKER" != "" ]; then
|
||||
pactl set-default-sink "$SPEAKER"
|
||||
pactl set-sink-mute "$SPEAKER" false
|
||||
notify-send "changed audio to Bluetooth"
|
||||
else
|
||||
notify-send "failed, not available!"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
if [ "$1" == "internal" ]; then
|
||||
internal
|
||||
elif [ "$1" == "bluetooth" ]; then
|
||||
bluetooth
|
||||
else
|
||||
SPEAKER=$(pactl info | grep "Default Sink" | awk -F ': ' ' { print $2 } ')
|
||||
pactl set-sink-mute "$SPEAKER" false
|
||||
fi
|
||||
|
||||
|
||||
12
eww_laptop/scripts/change-brightness
Executable file
|
|
@ -0,0 +1,12 @@
|
|||
#! /bin/bash
|
||||
|
||||
set_brightness() {
|
||||
brightnessctl set "$1"
|
||||
CURRENT=$(brightnessctl -m -d intel_backlight | awk -F, '{print substr($4, 0, length($4)-1)}')
|
||||
dunstify -a "changeBrightness" -r 3 -u low -i brightness-high -h int:value:"$CURRENT" "Brightness: ${CURRENT}%"
|
||||
}
|
||||
|
||||
if [ "$1" == "brightness" ]; then
|
||||
set_brightness "$2"
|
||||
fi
|
||||
|
||||
20
eww_laptop/scripts/change-volume
Executable file
|
|
@ -0,0 +1,20 @@
|
|||
#! /bin/bash
|
||||
|
||||
set_volume_sink() {
|
||||
pactl set-sink-volume @DEFAULT_SINK@ "$1"
|
||||
CURRENT=$(pactl get-sink-volume @DEFAULT_SINK@ | awk -F'/' '{ print $2 }' | tr -d ' %')
|
||||
dunstify -a "changeVolume" -r 2 -u low -i audio-volume-high -h int:value:"$CURRENT" "Output Volume: ${CURRENT}%"
|
||||
}
|
||||
|
||||
set_volume_source() {
|
||||
pactl set-source-volume @DEFAULT_SOURCE@ "$1"
|
||||
CURRENT=$(pactl get-source-volume @DEFAULT_SOURCE@ | awk -F'/' '{ print $2 }' | tr -d ' %')
|
||||
dunstify -a "changeMicVolume" -r 2 -u low -i audio-volume-high -h int:value:"$CURRENT" "Input Volume: ${CURRENT}%"
|
||||
}
|
||||
|
||||
|
||||
if [ "$1" == "sink" ]; then
|
||||
set_volume_sink "$2"
|
||||
elif [ "$1" == "source" ]; then
|
||||
set_volume_source "$2"
|
||||
fi
|
||||
11
eww_laptop/scripts/cockpit_toggle
Executable file
|
|
@ -0,0 +1,11 @@
|
|||
#! /bin/bash
|
||||
|
||||
ISOPEN=$(eww windows | grep "*cockpit" | tr -d '*')
|
||||
|
||||
|
||||
if [ "$ISOPEN" = "" ]; then
|
||||
MONITOR=$(hyprctl monitors | grep -B 8 "focused: yes" | grep "ID" | awk -F '(' ' { print $2 } ' | tr -d 'ID ):')
|
||||
eww open cockpit_window_"$MONITOR"
|
||||
else
|
||||
eww close "$ISOPEN"
|
||||
fi
|
||||
9
eww_laptop/scripts/current_name
Executable file
|
|
@ -0,0 +1,9 @@
|
|||
#!/bin/bash
|
||||
currentName() {
|
||||
win=$(hyprctl activewindow | grep class | awk -F ':' '{print $2}' | tr -d ' ')
|
||||
echo "(box :class \"module_app_text\" :space-evenly \"false\" :orientation \"h\" :spacing \"3\" (label :text \"$win\"))"
|
||||
}
|
||||
currentName
|
||||
tail -f /tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/hyprland.log | grep -E --line-buffered "focus to surface" | while read -r; do
|
||||
currentName
|
||||
done
|
||||
5
eww_laptop/scripts/firefox_control.sh
Executable file
|
|
@ -0,0 +1,5 @@
|
|||
#! /bin/bash
|
||||
|
||||
NUM=$(pactl list clients short | grep "firefox" | awk -F 'PipeWire' ' { print $1 } ' | tr -d ' \t\n')
|
||||
CLIENT=$(pactl list sink-inputs short | grep "$NUM" | awk -F ' ' ' { print $1 }' | tr -d ' \t\n')
|
||||
pactl set-sink-input-volume "$CLIENT" "$1"
|
||||
2
eww_laptop/scripts/getwethquote
Executable file
|
|
@ -0,0 +1,2 @@
|
|||
#!/bin/bash
|
||||
echo -e $(cat $HOME/.cache/weather/weather-quote) | head -n1
|
||||
2
eww_laptop/scripts/getwethquote2
Executable file
|
|
@ -0,0 +1,2 @@
|
|||
#!/bin/bash
|
||||
echo -e $(cat $HOME/.cache/weather/weather-quote) | tail -n1
|
||||
15
eww_laptop/scripts/mem-ad
Executable file
|
|
@ -0,0 +1,15 @@
|
|||
#!/bin/bash
|
||||
|
||||
|
||||
total="$(free -m | grep Mem: | awk '{ print $2 }')"
|
||||
used="$(free -m | grep Mem: | awk '{ print $3 }')"
|
||||
|
||||
free=$(expr $total - $used)
|
||||
|
||||
if [ "$1" = "total" ]; then
|
||||
echo $total
|
||||
elif [ "$1" = "used" ]; then
|
||||
echo $used
|
||||
elif [ "$1" = "free" ]; then
|
||||
echo $free
|
||||
fi
|
||||
3
eww_laptop/scripts/memory
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
|
||||
printf "%.0f\n" $(free -m | grep Mem | awk '{print ($3/$2)*100}')
|
||||
2
eww_laptop/scripts/music_control
Executable file
|
|
@ -0,0 +1,2 @@
|
|||
#!/bin/bash
|
||||
echo $(playerctl metadata -p ncspot,%any --format "{{ artist }}\n{{ album }}\n{{ title }}")
|
||||
3
eww_laptop/scripts/music_control2
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
echo $(playerctl -p ncspot,%any metadata mpris:artUrl)
|
||||
|
||||
98
eww_laptop/scripts/music_info
Executable file
|
|
@ -0,0 +1,98 @@
|
|||
#!/bin/bash
|
||||
# scripts by adi1090x
|
||||
|
||||
## Get data
|
||||
STATUS="$(mpc status)"
|
||||
COVER="/tmp/.music_cover.png"
|
||||
MUSIC_DIR="$HOME/Music"
|
||||
|
||||
## Get status
|
||||
get_status() {
|
||||
if [[ $STATUS == *"[playing]"* ]]; then
|
||||
echo ""
|
||||
else
|
||||
echo "奈"
|
||||
fi
|
||||
}
|
||||
|
||||
## 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 ""
|
||||
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 "images/music.png"
|
||||
fi
|
||||
}
|
||||
|
||||
## Execute accordingly
|
||||
if [[ "$1" == "--song" ]]; then
|
||||
get_song
|
||||
elif [[ "$1" == "--artist" ]]; then
|
||||
get_artist
|
||||
elif [[ "$1" == "--status" ]]; then
|
||||
get_status
|
||||
elif [[ "$1" == "--time" ]]; then
|
||||
get_time
|
||||
elif [[ "$1" == "--ctime" ]]; then
|
||||
get_ctime
|
||||
elif [[ "$1" == "--ttime" ]]; then
|
||||
get_ttime
|
||||
elif [[ "$1" == "--cover" ]]; then
|
||||
get_cover
|
||||
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
|
||||
5
eww_laptop/scripts/ncspot_control.sh
Executable file
|
|
@ -0,0 +1,5 @@
|
|||
#! /bin/bash
|
||||
|
||||
NUM=$(pactl list clients short | grep "ncspot" | awk -F 'PipeWire' ' { print $1 } ' | tr -d ' \t\n')
|
||||
CLIENT=$(pactl list sink-inputs short | grep "$NUM" | awk -F ' ' ' { print $1 }' | tr -d ' \t\n')
|
||||
pactl set-sink-input-volume "$CLIENT" "$1"
|
||||
134
eww_laptop/scripts/pop
Executable file
|
|
@ -0,0 +1,134 @@
|
|||
#!/bin/bash
|
||||
|
||||
|
||||
calendar() {
|
||||
LOCK_FILE="$HOME/.cache/eww-calendar.lock"
|
||||
EWW_BIN="$HOME/.local/bin/eww"
|
||||
|
||||
run() {
|
||||
${EWW_BIN} -c $HOME/.config/eww open calendar
|
||||
}
|
||||
|
||||
# Open widgets
|
||||
if [[ ! -f "$LOCK_FILE" ]]; then
|
||||
${EWW_BIN} -c $HOME/.config/eww close system music_win audio_ctl brightness
|
||||
touch "$LOCK_FILE"
|
||||
run && echo "ok good!"
|
||||
else
|
||||
${EWW_BIN} -c $HOME/.config/eww close calendar
|
||||
rm "$LOCK_FILE" && echo "closed"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
system() {
|
||||
LOCK_FILE_MEM="$HOME/.cache/eww-system.lock"
|
||||
EWW_BIN="$HOME/.local/bin/eww"
|
||||
|
||||
run() {
|
||||
${EWW_BIN} -c $HOME/.config/eww open system
|
||||
}
|
||||
|
||||
# Open widgets
|
||||
if [[ ! -f "$LOCK_FILE_MEM" ]]; then
|
||||
${EWW_BIN} -c $HOME/.config/eww close calendar music_win audio_ctl brightness
|
||||
touch "$LOCK_FILE_MEM"
|
||||
run && echo "ok good!"
|
||||
else
|
||||
${EWW_BIN} -c $HOME/.config/eww close system
|
||||
rm "$LOCK_FILE_MEM" && echo "closed"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
music() {
|
||||
LOCK_FILE_SONG="$HOME/.cache/eww-song.lock"
|
||||
EWW_BIN="$HOME/.local/bin/eww"
|
||||
|
||||
run() {
|
||||
${EWW_BIN} -c $HOME/.config/eww open music_win
|
||||
}
|
||||
|
||||
# Open widgets
|
||||
if [[ ! -f "$LOCK_FILE_SONG" ]]; then
|
||||
${EWW_BIN} -c $HOME/.config/eww close system calendar brightness
|
||||
touch "$LOCK_FILE_SONG"
|
||||
run && echo "ok good!"
|
||||
else
|
||||
${EWW_BIN} -c $HOME/.config/eww close music_win
|
||||
rm "$LOCK_FILE_SONG" && echo "closed"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
|
||||
audio() {
|
||||
LOCK_FILE_AUDIO="$HOME/.cache/eww-audio.lock"
|
||||
EWW_BIN="$HOME/.local/bin/eww"
|
||||
|
||||
run() {
|
||||
${EWW_BIN} -c $HOME/.config/eww open audio_ctl
|
||||
}
|
||||
|
||||
# Open widgets
|
||||
if [[ ! -f "$LOCK_FILE_AUDIO" ]]; then
|
||||
${EWW_BIN} -c $HOME/.config/eww close system calendar music brightness
|
||||
touch "$LOCK_FILE_AUDIO"
|
||||
run && echo "ok good!"
|
||||
else
|
||||
${EWW_BIN} -c $HOME/.config/eww close audio_ctl
|
||||
rm "$LOCK_FILE_AUDIO" && echo "closed"
|
||||
fi
|
||||
}
|
||||
|
||||
brightness() {
|
||||
LOCK_FILE_AUDIO="$HOME/.cache/eww-brightness.lock"
|
||||
EWW_BIN="$HOME/.local/bin/eww"
|
||||
|
||||
run() {
|
||||
${EWW_BIN} -c $HOME/.config/eww open brightness_window
|
||||
}
|
||||
|
||||
# Open widgets
|
||||
if [[ ! -f "$LOCK_FILE_AUDIO" ]]; then
|
||||
${EWW_BIN} -c $HOME/.config/eww close system calendar music audio_ctl
|
||||
touch "$LOCK_FILE_AUDIO"
|
||||
run && echo "ok good!"
|
||||
else
|
||||
${EWW_BIN} -c $HOME/.config/eww close brightness_window
|
||||
rm "$LOCK_FILE_AUDIO" && echo "closed"
|
||||
fi
|
||||
}
|
||||
|
||||
hoverGet() {
|
||||
NAME="$1"
|
||||
EWW_BIN="$HOME/.local/bin/eww"
|
||||
if [[ -f "$STORE" ]]; then
|
||||
rm "$STORE"
|
||||
${EWW_BIN} -c $HOME/.config/eww close "$NAME"
|
||||
fi
|
||||
}
|
||||
|
||||
hoverCreate() {
|
||||
if [[ ! -f "$STORE" ]]; then
|
||||
touch "$STORE"
|
||||
else
|
||||
echo "failure!"
|
||||
fi
|
||||
}
|
||||
STORE=true
|
||||
if [ "$1" = "calendar" ]; then
|
||||
calendar
|
||||
elif [ "$1" = "system" ]; then
|
||||
system
|
||||
#elif [ "$1" = "music" ]; then
|
||||
#music
|
||||
elif [ "$1" = "audio" ]; then
|
||||
audio
|
||||
elif [ "$1" = "brightness" ]; then
|
||||
brightness
|
||||
elif [ "$1" = "hoverGet" ]; then
|
||||
hoverGet "$2"
|
||||
elif [ "$1" = "hoverCreate" ]; then
|
||||
hoverCreate
|
||||
fi
|
||||
10
eww_laptop/scripts/spotifyd
Executable file
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/bash
|
||||
|
||||
#if [ "$PLAYER_EVENT" = "start" ] || [ "$PLAYER_EVENT" = "change" ];
|
||||
#then
|
||||
trackName=$(playerctl -p spotifyd,%any metadata title)
|
||||
artistAndAlbumName=$(playerctl -p spotifyd,%any metadata --format "{{ artist }} ({{ album }})")
|
||||
Thumbnail_url=$(playerctl -p spotifyd,%any metadata mpris:artUrl)
|
||||
Thumbnail=$(curl "$Thumbnail_url")
|
||||
notify-send -u low "$trackName" "$artistAndAlbumName " -i "$Thumbnail"
|
||||
#fi
|
||||
10
eww_laptop/scripts/spotifyd.sh
Executable file
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/bash
|
||||
if [ "$PLAYER_EVENT" = "start" ] || [ "$PLAYER_EVENT" = "change" ];
|
||||
then
|
||||
song=$(playerctl metadata -p spotifyd --format "{{ title }}\n{{ artist }}\n{{ album }}")
|
||||
if [ ! -f "/home/dashie/.cache/icons/$song" ]; then
|
||||
thumb=$(playerctl metadata -p spotifyd --format '{{lc(mpris:artUrl)}}')
|
||||
convert "$thumb" -flatten -thumbnail 256x256 /home/dashie/.cache/icons/"$song"
|
||||
fi
|
||||
dunstify -I /home/dashie/.cache/icons/"$song" -t 3000 "Spotify" "$song"
|
||||
fi
|
||||
12
eww_laptop/scripts/toggle-mute
Executable file
|
|
@ -0,0 +1,12 @@
|
|||
#! /bin/bash
|
||||
|
||||
SINK=$(pactl info | grep "Default Sink"| awk -F 'Default Sink: ' ' { print $2 } ')
|
||||
pactl set-sink-mute $SINK toggle
|
||||
MUTE=$(pactl list sinks | grep -A 6 "$SINK" | grep "Mute: yes" | tr -d '\t')
|
||||
|
||||
if [ "$MUTE" = "Mute: yes" ]; then
|
||||
dunstify -a "toggleMute" -r 2 -u low "Muted"
|
||||
else
|
||||
dunstify -a "toggleMute" -r 2 -u low "Unmuted"
|
||||
fi
|
||||
|
||||
125
eww_laptop/scripts/weather
Executable file
|
|
@ -0,0 +1,125 @@
|
|||
#!/bin/bash
|
||||
|
||||
tmp_weather="$HOME/.cache/weather"
|
||||
tmp_weather_stat=$tmp_weather/weather-stat
|
||||
tmp_weather_degree=$tmp_weather/weather-degree
|
||||
tmp_weather_quote=$tmp_weather/weather-quote
|
||||
tmp_weather_hex=$tmp_weather/weather-hex
|
||||
tmp_weather_icon=$tmp_weather/weather-icon
|
||||
|
||||
if [ ! -d $tmp_weather ]; then
|
||||
mkdir -p $tmp_weather
|
||||
fi
|
||||
|
||||
# Put in your api and stuff link here
|
||||
# If you dunno, head to openweathermap.org, and make and account
|
||||
#(completely free I swear, and then get your API Key and your City ID)
|
||||
# I wish I was smart enough to do it like Elena, but this is the top I could do lol
|
||||
KEY="{c4dcb6a002f5ce51f7e48c430ebe480d}"
|
||||
ID="{3042030}"
|
||||
UNIT="{metric}" #Options are 'metric' and 'imperial'
|
||||
weather=$(curl -sf "http://api.openweathermap.org/data/2.5/weather?APPID="$KEY"&id="$ID"&units="$UNIT"")
|
||||
echo $weather
|
||||
if [ ! -z "$weather" ]; then
|
||||
weather_temp=$(echo "$weather" | jq ".main.temp" | cut -d "." -f 1)
|
||||
weather_icon_code=$(echo "$weather" | jq -r ".weather[].icon" | head -1)
|
||||
weather_description=$(echo "$weather" | jq -r ".weather[].description" | head -1 | sed -e "s/\b\(.\)/\u\1/g")
|
||||
|
||||
#Big long if statement of doom
|
||||
if [ "$weather_icon_code" == "50d" ]; then
|
||||
weather_icon=" "
|
||||
weather_quote="Forecast says it's misty \nMake sure you don't get lost on your way..."
|
||||
weather_hex="#84afdb" #a7b8b2
|
||||
elif [ "$weather_icon_code" == "50n" ]; then
|
||||
weather_icon=" "
|
||||
weather_quote="Forecast says it's a misty night \nDon't go anywhere tonight or you might get lost..."
|
||||
weather_hex="#84afdb"
|
||||
elif [ "$weather_icon_code" == "01d" ]; then
|
||||
weather_icon=" "
|
||||
weather_quote="It's a sunny day, gonna be fun! \nDon't go wandering all by yourself though..."
|
||||
weather_hex="#ffd86b"
|
||||
elif [ "$weather_icon_code" == "01n" ]; then
|
||||
weather_icon=" "
|
||||
weather_quote="It's a clear night \nYou might want to take a evening stroll to relax..."
|
||||
weather_hex="#fcdcf6"
|
||||
elif [ "$weather_icon_code" == "02d" ]; then
|
||||
weather_icon=" "
|
||||
weather_quote="It's cloudy, sort of gloomy \nYou'd better get a book to read..."
|
||||
weather_hex="#adadff"
|
||||
elif [ "$weather_icon_code" == "02n" ]; then
|
||||
weather_icon=" "
|
||||
weather_quote="It's a cloudy night \nHow about some hot chocolate and a warm bed?"
|
||||
weather_hex="#adadff"
|
||||
elif [ "$weather_icon_code" == "03d" ]; then
|
||||
weather_icon=" "
|
||||
weather_quote="It's cloudy, sort of gloomy \nYou'd better get a book to read..."
|
||||
weather_hex="#adadff"
|
||||
elif [ "$weather_icon_code" == "03n" ]; then
|
||||
weather_icon=" "
|
||||
weather_quote="It's a cloudy night \nHow about some hot chocolate and a warm bed?"
|
||||
weather_hex="#adadff"
|
||||
elif [ "$weather_icon_code" == "04d" ]; then
|
||||
weather_icon=" "
|
||||
weather_quote="It's cloudy, sort of gloomy \nYou'd better get a book to read..."
|
||||
weather_hex="#adadff"
|
||||
elif [ "$weather_icon_code" == "04n" ]; then
|
||||
weather_icon=" "
|
||||
weather_quote="It's a cloudy night \nHow about some hot chocolate and a warm bed?"
|
||||
weather_hex="#adadff"
|
||||
elif [ "$weather_icon_code" == "09d" ]; then
|
||||
weather_icon=" "
|
||||
weather_quote="It's rainy, it's a great day! \nGet some ramen and watch as the rain falls..."
|
||||
weather_hex="#6b95ff"
|
||||
elif [ "$weather_icon_code" == "09n" ]; then
|
||||
weather_icon=" "
|
||||
weather_quote=" It's gonna rain tonight it seems \nMake sure your clothes aren't still outside..."
|
||||
weather_hex="#6b95ff"
|
||||
elif [ "$weather_icon_code" == "10d" ]; then
|
||||
weather_icon=" "
|
||||
weather_quote="It's rainy, it's a great day! \nGet some ramen and watch as the rain falls..."
|
||||
weather_hex="#6b95ff"
|
||||
elif [ "$weather_icon_code" == "10n" ]; then
|
||||
weather_icon=" "
|
||||
weather_quote=" It's gonna rain tonight it seems \nMake sure your clothes aren't still outside..."
|
||||
weather_hex="#6b95ff"
|
||||
elif [ "$weather_icon_code" == "11d" ]; then
|
||||
weather_icon=""
|
||||
weather_quote="There's storm for forecast today \nMake sure you don't get blown away..."
|
||||
weather_hex="#ffeb57"
|
||||
elif [ "$weather_icon_code" == "11n" ]; then
|
||||
weather_icon=""
|
||||
weather_quote="There's gonna be storms tonight \nMake sure you're warm in bed and the windows are shut..."
|
||||
weather_hex="#ffeb57"
|
||||
elif [ "$weather_icon_code" == "13d" ]; then
|
||||
weather_icon=" "
|
||||
weather_quote="It's gonna snow today \nYou'd better wear thick clothes and make a snowman as well!"
|
||||
weather_hex="#e3e6fc"
|
||||
elif [ "$weather_icon_code" == "13n" ]; then
|
||||
weather_icon=" "
|
||||
weather_quote="It's gonna snow tonight \nMake sure you get up early tomorrow to see the sights..."
|
||||
weather_hex="#e3e6fc"
|
||||
elif [ "$weather_icon_code" == "40d" ]; then
|
||||
weather_icon=" "
|
||||
weather_quote="Forecast says it's misty \nMake sure you don't get lost on your way..."
|
||||
weather_hex="#84afdb"
|
||||
elif [ "$weather_icon_code" == "40n" ]; then
|
||||
weather_icon=" "
|
||||
weather_quote="Forecast says it's a misty night \nDon't go anywhere tonight or you might get lost..."
|
||||
weather_hex="#84afdb"
|
||||
else
|
||||
weather_icon=" "
|
||||
weather_quote="Sort of odd, I don't know what to forecast \nMake sure you have a good time!"
|
||||
weather_hex="#adadff"
|
||||
fi
|
||||
echo "$weather_icon" > $tmp_weather_icon
|
||||
echo "$weather_description" > $tmp_weather_stat
|
||||
echo "$weather_temp""°C" > $tmp_weather_degree
|
||||
echo "$weather_quote" > $tmp_weather_quote
|
||||
echo "$weather_hex" > $tmp_weather_hex
|
||||
else
|
||||
echo "Weather Unavailable" > $tmp_weather_stat
|
||||
echo " " > $tmp_weather_icon
|
||||
echo "Ah well, no weather huh? \nEven if there's no weather, it's gonna be a great day!" > $tmp_weather_quote
|
||||
echo "-" > $tmp_weather_degree
|
||||
echo "#adadff" > $tmp_weather_hex
|
||||
fi
|
||||
9
eww_laptop/scripts/weather-trimmer
Executable file
|
|
@ -0,0 +1,9 @@
|
|||
#!/bin/bash
|
||||
weather=$(cat $HOME/.cache/weather/weather-stat)
|
||||
weather_count=$(cat $HOME/.cache/weather/weather-stat | wc -c)
|
||||
|
||||
if [ "$weather_count" -lt 10 ]; then
|
||||
echo $weather;
|
||||
else
|
||||
echo $(cat $HOME/.cache/weather/weather-stat | cut -c1-6)...
|
||||
fi
|
||||
26
eww_laptop/scripts/wifi
Executable file
|
|
@ -0,0 +1,26 @@
|
|||
#!/bin/bash
|
||||
|
||||
status=$(nmcli g | grep -oE "disconnected")
|
||||
essid=$(nmcli c | grep wlp2s0 | awk '{print ($1)}')
|
||||
|
||||
if [ $status ] ; then
|
||||
icon=""
|
||||
text=""
|
||||
col="#575268"
|
||||
|
||||
else
|
||||
icon=""
|
||||
text="${essid}"
|
||||
col="#a1bdce"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
if [[ "$1" == "--COL" ]]; then
|
||||
echo $col
|
||||
elif [[ "$1" == "--ESSID" ]]; then
|
||||
echo $text
|
||||
elif [[ "$1" == "--ICON" ]]; then
|
||||
echo $icon
|
||||
fi
|
||||
|
||||
119
eww_laptop/scripts/workspace
Executable file
|
|
@ -0,0 +1,119 @@
|
|||
#!/bin/bash
|
||||
workspaces() {
|
||||
|
||||
ws1="ID 1 "
|
||||
ws2="ID 2 "
|
||||
ws3="ID 3 "
|
||||
ws4="ID 4 "
|
||||
ws5="ID 5 "
|
||||
ws6="ID 6 "
|
||||
ws7="ID 7 "
|
||||
ws8="ID 8 "
|
||||
ws9="ID 9 "
|
||||
ws10="ID 10 "
|
||||
|
||||
# check if Occupied
|
||||
o1=$(hyprctl workspaces | grep "$ws1" )
|
||||
o2=$(hyprctl workspaces | grep "$ws2" )
|
||||
o3=$(hyprctl workspaces | grep "$ws3" )
|
||||
o4=$(hyprctl workspaces | grep "$ws4" )
|
||||
o5=$(hyprctl workspaces | grep "$ws5" )
|
||||
o6=$(hyprctl workspaces | grep "$ws6" )
|
||||
o7=$(hyprctl workspaces | grep "$ws7" )
|
||||
o8=$(hyprctl workspaces | grep "$ws8" )
|
||||
o9=$(hyprctl workspaces | grep "$ws9" )
|
||||
o10=$(hyprctl workspaces | grep "$ws10" )
|
||||
|
||||
# check if Focused
|
||||
f1=$(hyprctl monitors | grep "workspace: 1 " )
|
||||
f2=$(hyprctl monitors | grep "workspace: 2 " )
|
||||
f3=$(hyprctl monitors | grep "workspace: 3 " )
|
||||
f4=$(hyprctl monitors | grep "workspace: 4 " )
|
||||
f5=$(hyprctl monitors | grep "workspace: 5 " )
|
||||
f6=$(hyprctl monitors | grep "workspace: 6 " )
|
||||
f7=$(hyprctl monitors | grep "workspace: 7 " )
|
||||
f8=$(hyprctl monitors | grep "workspace: 8 " )
|
||||
f9=$(hyprctl monitors | grep "workspace: 9 " )
|
||||
f10=$(hyprctl monitors | grep "workspace: 10 " )
|
||||
|
||||
if [ "$o1" != "" ]; then
|
||||
ic_1="①"
|
||||
else
|
||||
ic_1=""
|
||||
fi
|
||||
if [ "$o2" != "" ]; then
|
||||
ic_2="②"
|
||||
else
|
||||
ic_2=""
|
||||
fi
|
||||
if [ "$o3" != "" ]; then
|
||||
ic_3="③"
|
||||
else
|
||||
ic_3=""
|
||||
fi
|
||||
if [ "$o4" != "" ]; then
|
||||
ic_4="④"
|
||||
else
|
||||
ic_4=""
|
||||
fi
|
||||
if [ "$o5" != "" ]; then
|
||||
ic_5="⑤"
|
||||
else
|
||||
ic_5=""
|
||||
fi
|
||||
if [ "$o6" != "" ]; then
|
||||
ic_6="⑥"
|
||||
else
|
||||
ic_6=""
|
||||
fi
|
||||
if [ "$o7" != "" ]; then
|
||||
ic_7="⑦"
|
||||
else
|
||||
ic_7=""
|
||||
fi
|
||||
if [ "$o8" != "" ]; then
|
||||
ic_8="⑧"
|
||||
else
|
||||
ic_8=""
|
||||
fi
|
||||
if [ "$o9" != "" ]; then
|
||||
ic_9="➈"
|
||||
else
|
||||
ic_9=""
|
||||
fi
|
||||
if [ "$o10" != "" ]; then
|
||||
ic_10="➉"
|
||||
else
|
||||
ic_10=""
|
||||
fi
|
||||
|
||||
if [ "$f1" != "" ]; then
|
||||
ic_1="➊"
|
||||
elif [ "$f2" != "" ]; then
|
||||
ic_2="➋"
|
||||
elif [ "$f3" != "" ]; then
|
||||
ic_3="➌"
|
||||
elif [ "$f4" != "" ]; then
|
||||
ic_4="➍"
|
||||
elif [ "$f5" != "" ]; then
|
||||
ic_5="➎"
|
||||
elif [ "$f6" != "" ]; then
|
||||
ic_6="➏"
|
||||
elif [ "$f7" != "" ]; then
|
||||
ic_7="➐"
|
||||
elif [ "$f8" != "" ]; then
|
||||
ic_8="➑"
|
||||
elif [ "$f9" != "" ]; then
|
||||
ic_9="➒"
|
||||
elif [ "$f10" != "" ]; then
|
||||
ic_10="➓"
|
||||
fi
|
||||
|
||||
#ic_1=$(hyprctl workspaces)
|
||||
#ic_2="t"
|
||||
echo "(box :class \"works\" :orientation \"h\" :spacing 5 :space-evenly \"false\" (button :onclick \"hyprctl dispatch workspace 1\" :class \"$un$o1$f1\" \"$ic_1\") (button :onclick \"hyprctl dispatch workspace 2\" :class \"$un$o2$f2\" \"$ic_2\") (button :onclick \"hyprctl dispatch workspace 3\" :class \"$un$o3$f3\" \"$ic_3\") (button :onclick \"hyprctl dispatch workspace 4\" :class \"$un$o4$f4\" \"$ic_4\") (button :onclick \"hyprctl dispatch workspace 5\" :class \"$un$o5$f5\" \"$ic_5\") (button :onclick \"hyprctl dispatch workspace 6\" :class \"$un$o6$f6\" \"$ic_6\") (button :onclick \"hyprctl dispatch workspace 7\" :class \"$un$o7$f7\" \"$ic_7\") (button :onclick \"hyprctl dispatch workspace 8\" :class \"$un$o8$f8\" \"$ic_8\") (button :onclick \"hyprctl dispatch workspace 9\" :class \"$un$o9$f9\" \"$ic_9\") (button :onclick \"hyprctl dispatch workspace 10\" :class \"$un$o10$f10\" \"$ic_10\"))"
|
||||
}
|
||||
workspaces
|
||||
tail -f /tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/hyprland.log | grep -E --line-buffered "Changed to workspace|focus to surface" | while read -r; do
|
||||
workspaces
|
||||
done
|
||||
172
hypr_laptop/hyprland.conf
Normal file
|
|
@ -0,0 +1,172 @@
|
|||
#
|
||||
#fix the fucking portal
|
||||
exec-once=systemctl --user import-environment
|
||||
exec-once=dbus-update-activation-environment --all
|
||||
#
|
||||
|
||||
monitor=eDP-1,1920x1080@144,0x0,1
|
||||
monitor=,highrr,1920x0,1
|
||||
input {
|
||||
kb_file=/home/dashie/.config/keymap.xkb #us with dead_diaeresis on shift + ' to get ä ö ü
|
||||
repeat_delay=200
|
||||
natural_scroll=false
|
||||
follow_mouse=1
|
||||
force_no_accel=true
|
||||
|
||||
touchpad {
|
||||
natural_scroll=yes
|
||||
tap-to-click=yes
|
||||
}
|
||||
}
|
||||
|
||||
general {
|
||||
sensitivity=1.0 # for mouse cursor
|
||||
|
||||
gaps_in=5
|
||||
gaps_out=10
|
||||
border_size=3
|
||||
col.active_border=0xFFFF0000 0xFF00FF00 0xFF0000FF 60deg
|
||||
col.inactive_border=0x66333333
|
||||
|
||||
apply_sens_to_raw=0 # whether to apply the sensitivity to raw input (e.g. used by games where you aim using your mouse)
|
||||
|
||||
}
|
||||
|
||||
decoration {
|
||||
rounding=10
|
||||
blur=yes
|
||||
blur=1
|
||||
blur_size=3 # minimum 1
|
||||
blur_passes=1 # minimum 1
|
||||
blur_new_optimizations=true
|
||||
}
|
||||
|
||||
animations {
|
||||
enabled=1
|
||||
animation=windowsMove,1,3,default
|
||||
animation=windows,1,5,default
|
||||
animation=border,1,10,default
|
||||
animation=fade,1,10,default
|
||||
animation=workspaces,1,3,default
|
||||
}
|
||||
|
||||
dwindle {
|
||||
preserve_split=true
|
||||
pseudotile=0 # enable pseudotiling on dwindle
|
||||
}
|
||||
|
||||
gestures {
|
||||
workspace_swipe=yes
|
||||
}
|
||||
|
||||
misc {
|
||||
no_vfr=false
|
||||
# animate_manual_resizes=true
|
||||
# enable_swallow=true
|
||||
# swallow_regex=^(.*)(Alacritty)(.*)$
|
||||
}
|
||||
|
||||
# debug {
|
||||
# overlay=true
|
||||
# }
|
||||
|
||||
#reserve place for bar
|
||||
#monitor=eDP-1,addreserved,45,0,0,0
|
||||
|
||||
# example window rules
|
||||
# for windows named/classed as abc and xyz
|
||||
windowrule=opacity 80,^(.*)(dunst)(.*)$
|
||||
windowrule=float,^(.*)(Calculator)(.*)$
|
||||
#windowrule=tile,xyz
|
||||
#windowrule=float,abc
|
||||
#windowrule=pseudo,abc
|
||||
#windowrule=monitor 0,xyz
|
||||
|
||||
# example binds
|
||||
bind=SUPER,S,exec,grim -g "$(slurp)" - | wl-copy
|
||||
bind=SUPER,F,exec,firefox
|
||||
bind=SUPER,T,exec,alacritty
|
||||
bind=SUPER,Q,killactive,
|
||||
bind=SUPER,M,exit,
|
||||
bind=SUPER,E,exec,nautilus --new-window
|
||||
bind=SUPER,V,togglefloating,
|
||||
bind=SUPER,R,exec,wofi -I -m -s $HOME/.config/wofi/style.css -t alacritty --show drun -o DP-3
|
||||
bind=SUPERSHIFT,r,exec, wofi -I -m -s $HOME/.config/wofi/style.css -t alacritty --show run -o DP-3
|
||||
bind=SUPER,C,togglesplit
|
||||
bind=SUPER,B,fullscreen
|
||||
bind=SUPER,G,exec,calculator --gui
|
||||
bind=SUPERSHIFT,L,exec, playerctl --all-players -a pause & swaylock -c 000000 & systemctl suspend
|
||||
bind=,XF86AudioMute,exec, $HOME/.config/eww/scripts/toggle-mute
|
||||
bind=,XF86AudioLowerVolume,exec, $HOME/.config/eww/scripts/change-volume sink -5%
|
||||
bind=,XF86AudioRaiseVolume,exec, $HOME/.config/eww/scripts/change-volume sink +5%
|
||||
bind=,XF86AudioPlay,exec, playerctl --player=ncspot,firefox play-pause
|
||||
bind=,XF86AudioNext,exec, playerctl --player=ncspot,firefox next
|
||||
bind=,XF86AudioPrev,exec, playerctl --player=ncspot,firefox previous
|
||||
bind=,XF86MonBrightnessDown,exec, $HOME/.config/eww/scripts/change-brightness brightness 10%-
|
||||
bind=,XF86MonBrightnessUp,exec, $HOME/.config/eww/scripts/change-brightness brightness +10%
|
||||
bind=SUPERSHIFT,S,exec, grim -g "$(slurp)" - | swappy -f -
|
||||
bind=SUPERSHIFTALT,S,exec, grim -g "$(slurp)" $HOME/gits/ost-3semester/Screenshots/$(date +'%Y-%m-%d-%I:%M:%S.png') && (date +'%Y-%m-%d-%I:%M:%S.png') | wl-copy
|
||||
bind=SUPER,D,exec, $HOME/.config/eww/scripts/cockpit_toggle
|
||||
bind=,Print,exec, grim - | wl-copy
|
||||
# bind=SUPERALT,H,pass,^(wlroots)$
|
||||
# bind=SUPERALT,left,pass,^(wlroots)$
|
||||
# bind=SUPERALT,right,pass,^(wlroots)$
|
||||
# bind=SUPERALT,up,pass,^(wlroots)$
|
||||
# bind=SUPERALT,down,pass,^(wlroots)$
|
||||
|
||||
bind=SUPER,bracketleft,movefocus,l
|
||||
bind=SUPER,bracketright,movefocus,r
|
||||
bind=SUPER,semicolon,movefocus,u
|
||||
bind=SUPER,apostrophe,movefocus,d
|
||||
|
||||
bind=SUPER,left,movewindow,l
|
||||
bind=SUPER,right,movewindow,r
|
||||
bind=SUPER,up,movewindow,u
|
||||
bind=SUPER,down,movewindow,d
|
||||
|
||||
# bind=SUPERALT,left,movecursortocorner,2
|
||||
# bind=SUPERALT,left,exec, hyprctl dispatch movewindow && hyprctl dispatch moveactive -1000 300 && sleep 0.5 && hyprctl dispatch togglefloating
|
||||
|
||||
bind=SUPER,1,workspace,1
|
||||
bind=SUPER,2,workspace,2
|
||||
bind=SUPER,3,workspace,3
|
||||
bind=SUPER,4,workspace,4
|
||||
bind=SUPER,5,workspace,5
|
||||
bind=SUPER,6,workspace,6
|
||||
bind=SUPER,7,workspace,7
|
||||
bind=SUPER,8,workspace,8
|
||||
bind=SUPER,9,workspace,9
|
||||
bind=SUPER,0,workspace,10
|
||||
|
||||
bind=SUPERSHIFT,1,movetoworkspace,1
|
||||
bind=SUPERSHIFT,2,movetoworkspace,2
|
||||
bind=SUPERSHIFT,3,movetoworkspace,3
|
||||
bind=SUPERSHIFT,4,movetoworkspace,4
|
||||
bind=SUPERSHIFT,5,movetoworkspace,5
|
||||
bind=SUPERSHIFT,6,movetoworkspace,6
|
||||
bind=SUPERSHIFT,7,movetoworkspace,7
|
||||
bind=SUPERSHIFT,8,movetoworkspace,8
|
||||
bind=SUPERSHIFT,9,movetoworkspace,9
|
||||
bind=SUPERSHIFT,0,movetoworkspace,10
|
||||
|
||||
bind=SUPER,mouse_down,workspace,e+1
|
||||
bind=SUPER,mouse_up,workspace,e-1
|
||||
bindm=SUPER,mouse:272,movewindow
|
||||
bindm=SUPER,mouse:273,resizewindow
|
||||
|
||||
binde=SUPER,O,resizeactive,-20 0
|
||||
binde=SUPER,P,resizeactive,20 0
|
||||
binde=SUPER,K,resizeactive,0 -20
|
||||
binde=SUPER,L,resizeactive,0 20
|
||||
|
||||
#autostart programs
|
||||
#exec=~/Documents/scripts/hyprstart.sh
|
||||
#exec=hyprstart.sh
|
||||
exec-once=hyprpaper
|
||||
exec-once=eww daemon
|
||||
exec-once=eww open bar
|
||||
exec-once=nheko
|
||||
# exec-once=flatpak run --branch=stable --arch=x86_64 --command=/app/bin/schildichat-desktop --file-forwarding chat.schildi.desktop --enable-features=ozonePlatform,WebRTCPipeWireCapturer --ozone-platform=wayland
|
||||
exec-once=firefox
|
||||
exec-once=nextcloud
|
||||
exec-once=alacritty -e ncspot
|
||||
127
hypr_laptop/hyprlandd.conf
Normal file
|
|
@ -0,0 +1,127 @@
|
|||
monitor=,1080x1920@60,0x0,1
|
||||
input {
|
||||
repeat_delay=200
|
||||
natural_scroll=false
|
||||
follow_mouse=1
|
||||
force_no_accel=true
|
||||
|
||||
touchpad {
|
||||
natural_scroll=yes
|
||||
tap-to-click=yes
|
||||
}
|
||||
}
|
||||
|
||||
general {
|
||||
sensitivity=1.0 # for mouse cursor
|
||||
|
||||
gaps_in=5
|
||||
gaps_out=10
|
||||
border_size=3
|
||||
col.active_border=0x66ee1111
|
||||
col.inactive_border=0x66333333
|
||||
|
||||
apply_sens_to_raw=0 # whether to apply the sensitivity to raw input (e.g. used by games where you aim using your mouse)
|
||||
|
||||
}
|
||||
|
||||
decoration {
|
||||
rounding=10
|
||||
blur=yes
|
||||
blur=1
|
||||
blur_size=3 # minimum 1
|
||||
blur_passes=1 # minimum 1
|
||||
blur_new_optimizations=true
|
||||
|
||||
drop_shadow=false
|
||||
}
|
||||
|
||||
animations {
|
||||
enabled=1
|
||||
animation=windowsMove,1,3,default
|
||||
animation=windows,1,5,default
|
||||
animation=border,1,10,default
|
||||
animation=fade,1,10,default
|
||||
animation=workspaces,1,3,default
|
||||
}
|
||||
|
||||
dwindle {
|
||||
preserve_split=true
|
||||
pseudotile=0 # enable pseudotiling on dwindle
|
||||
}
|
||||
|
||||
gestures {
|
||||
workspace_swipe=yes
|
||||
}
|
||||
|
||||
misc {
|
||||
no_vfr=false
|
||||
# animate_manual_resizes=true
|
||||
enable_swallow=true
|
||||
swallow_regex=^(.*)(Alacritty)(.*)$
|
||||
}
|
||||
|
||||
# debug {
|
||||
# overlay=true
|
||||
# }
|
||||
|
||||
#reserve place for bar
|
||||
#monitor=eDP-1,addreserved,45,0,0,0
|
||||
|
||||
# example window rules
|
||||
# for windows named/classed as abc and xyz
|
||||
#windowrule=tile,xyz
|
||||
#windowrule=float,abc
|
||||
#windowrule=pseudo,abc
|
||||
#windowrule=monitor 0,xyz
|
||||
|
||||
# example binds
|
||||
bind=SUPER,T,exec,alacritty
|
||||
bind=SUPER,Q,killactive,
|
||||
bind=SUPER,M,exit,
|
||||
bind=SUPER,V,togglefloating,
|
||||
bind=SUPER,C,togglesplit
|
||||
bind=SUPER,B,fullscreen
|
||||
bind=SUPER,H,exec,alacritty
|
||||
|
||||
bind=SUPER,bracketleft,movefocus,l
|
||||
bind=SUPER,bracketright,movefocus,r
|
||||
bind=SUPER,semicolon,movefocus,u
|
||||
bind=SUPER,apostrophe,movefocus,d
|
||||
|
||||
bind=SUPERALT,left,movewindow,l
|
||||
bind=SUPERALT,right,movewindow,r
|
||||
bind=SUPERALT,up,movewindow,u
|
||||
bind=SUPERALT,down,movewindow,d
|
||||
|
||||
bind=SUPER,1,workspace,1
|
||||
bind=SUPER,2,workspace,2
|
||||
bind=SUPER,3,workspace,3
|
||||
bind=SUPER,4,workspace,4
|
||||
bind=SUPER,5,workspace,5
|
||||
bind=SUPER,6,workspace,6
|
||||
bind=SUPER,7,workspace,7
|
||||
bind=SUPER,8,workspace,8
|
||||
bind=SUPER,9,workspace,9
|
||||
bind=SUPER,0,workspace,10
|
||||
|
||||
bind=SUPERSHIFT,1,movetoworkspace,1
|
||||
bind=SUPERSHIFT,2,movetoworkspace,2
|
||||
bind=SUPERSHIFT,3,movetoworkspace,3
|
||||
bind=SUPERSHIFT,4,movetoworkspace,4
|
||||
bind=SUPERSHIFT,5,movetoworkspace,5
|
||||
bind=SUPERSHIFT,6,movetoworkspace,6
|
||||
bind=SUPERSHIFT,7,movetoworkspace,7
|
||||
bind=SUPERSHIFT,8,movetoworkspace,8
|
||||
bind=SUPERSHIFT,9,movetoworkspace,9
|
||||
bind=SUPERSHIFT,0,movetoworkspace,10
|
||||
|
||||
bind=SUPER,mouse_down,workspace,e+1
|
||||
bind=SUPER,mouse_up,workspace,e-1
|
||||
bindm=SUPER,mouse:272,movewindow
|
||||
bindm=SUPER,mouse:273,resizewindow
|
||||
|
||||
binde=SUPER,O,resizeactive,-20 0
|
||||
binde=SUPER,P,resizeactive,20 0
|
||||
binde=SUPER,K,resizeactive,0 -20
|
||||
binde=SUPER,L,resizeactive,0 20
|
||||
|
||||
5
hypr_laptop/hyprpaper.conf
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
|
||||
# wallpaper
|
||||
preload = /home/dashie/Pictures/backgrounds/Monitor3.jpg
|
||||
wallpaper = eDP-1,/home/dashie/Pictures/backgrounds/Monitor3.jpg
|
||||
ipc = off
|
||||
16
setup.sh
|
|
@ -1,6 +1,20 @@
|
|||
find $PWD -maxdepth 10 -mindepth 1 -type d -exec ln -s '{}' $HOME/.config/ \;
|
||||
find $PWD -maxdepth 1 -mindepth 0 -exec ln -s '{}' $HOME/.config/ \;
|
||||
mv $HOME/.config/.zshrc ../.zshrc
|
||||
unlink $HOME/.config/.git
|
||||
unlink $HOME/.config/.gitignore
|
||||
unlink $HOME/.config/README.md
|
||||
unlink $HOME/.config/eww_desktop
|
||||
unlink $HOME/.config/hypr_desktop
|
||||
unlink $HOME/.config/eww_laptop
|
||||
unlink $HOME/.config/hypr_laptop
|
||||
unlink $HOME/.config/setup.sh
|
||||
unlink $HOME/.config/dotFiles
|
||||
gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'
|
||||
|
||||
if [ "$1" = "laptop" ]; then
|
||||
ln -s $PWD/eww_laptop $HOME/.config/eww
|
||||
ln -s $PWD/hypr_laptop $HOME/.config/hypr
|
||||
elif [ "$1" = "desktop" ]; then
|
||||
ln -s $PWD/eww_desktop $HOME/.config/eww
|
||||
ln -s $PWD/hypr_desktop $HOME/.config/hypr
|
||||
fi
|
||||
|
|
|
|||