nix dotfiles
This commit is contained in:
commit
7b8005c867
27 changed files with 1728 additions and 0 deletions
81
navi/laniakea/eww/eww.scss
Normal file
81
navi/laniakea/eww/eww.scss
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
* {
|
||||
all: unset;
|
||||
font-family: IosevkaTerm Nerd Font;
|
||||
}
|
||||
|
||||
.workspaces button {
|
||||
border-radius: 5px;
|
||||
padding: 4px;
|
||||
padding-left: 8px;
|
||||
padding-right: 8px;
|
||||
}
|
||||
|
||||
.inactive {
|
||||
background-color: #181825;
|
||||
}
|
||||
|
||||
.active_workspace {
|
||||
color: #181926;
|
||||
background-color: #b7bdf8;
|
||||
font-weight: 900;
|
||||
}
|
||||
|
||||
.music {
|
||||
border-radius: 10px;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
color: #b4befe;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.bar {
|
||||
background-color: #11111b;
|
||||
border-radius: 16px;
|
||||
color: #cdd6f4;
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
.time {
|
||||
color: #b4befe;
|
||||
font-weight: 900;
|
||||
}
|
||||
|
||||
.battery {
|
||||
color: #cba6f7;
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.volume {
|
||||
color: #cba6f7;
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.wifi {
|
||||
color: #89dceb;
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.layout {
|
||||
color: #a6e3a1;
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
tooltip {
|
||||
padding: 3px 7px;
|
||||
border-radius: 10px;
|
||||
background-color: #11111b;
|
||||
color: white;
|
||||
border-color: #b4befe;
|
||||
border-width: 2px;
|
||||
border-style: solid;
|
||||
}
|
||||
|
||||
menu {
|
||||
padding: 3px 7px;
|
||||
border-radius: 10px;
|
||||
background-color: #11111b;
|
||||
color: white;
|
||||
border-color: #b4befe;
|
||||
border-width: 2px;
|
||||
border-style: solid;
|
||||
}
|
||||
108
navi/laniakea/eww/eww.yuck
Normal file
108
navi/laniakea/eww/eww.yuck
Normal file
|
|
@ -0,0 +1,108 @@
|
|||
(defwidget bar []
|
||||
(centerbox :orientation "h"
|
||||
(workspaces)
|
||||
(music)
|
||||
(status)
|
||||
)
|
||||
)
|
||||
|
||||
(defwidget workspaces []
|
||||
(box :class "workspaces"
|
||||
:orientation "h"
|
||||
:halign "start"
|
||||
:spacing 10
|
||||
(button
|
||||
:class {active_workspace == 1 ? "active_workspace" : "inactive"}
|
||||
:onclick "hyprctl dispatch workspace 1" 1
|
||||
)
|
||||
(button
|
||||
:class {active_workspace == 2 ? "active_workspace" : "inactive"}
|
||||
:onclick "hyprctl dispatch workspace 2" 2)
|
||||
(button
|
||||
:class {active_workspace == 3 ? "active_workspace" : "inactive"}
|
||||
:onclick "hyprctl dispatch workspace 3" 3)
|
||||
(button
|
||||
:class {active_workspace == 4 ? "active_workspace" : "inactive"}
|
||||
:onclick "hyprctl dispatch workspace 4" 4)
|
||||
(button
|
||||
:class {active_workspace == 5 ? "active_workspace" : "inactive"}
|
||||
:onclick "hyprctl dispatch workspace 5" "")
|
||||
(button
|
||||
:class {active_workspace == 6 ? "active_workspace" : "inactive"}
|
||||
:onclick "hyprctl dispatch workspace 6" " ")
|
||||
)
|
||||
)
|
||||
|
||||
(defpoll active_workspace :interval "1s" :initial 1
|
||||
"hyprctl activeworkspace -j | jq .id"
|
||||
)
|
||||
|
||||
(defwidget music []
|
||||
(eventbox :class "music"
|
||||
:orientation "h"
|
||||
:halign "center"
|
||||
:onclick "playerctl play-pause"
|
||||
{music != "" ? " ${music}" : ""}
|
||||
)
|
||||
)
|
||||
|
||||
(deflisten music :initial ""
|
||||
"playerctl --follow metadata --format '{{ artist }} - {{ title }}' || true"
|
||||
)
|
||||
|
||||
(defwidget status []
|
||||
(box :class "status" :orientation "h" :halign "end" :space-evenly false :spacing 20
|
||||
(systray :orientation "h" :space-evenly false :spacing 10
|
||||
)
|
||||
(eventbox :class "layout"
|
||||
:onclick "./toggle_layout.sh"
|
||||
"${layout}"
|
||||
)
|
||||
(box :class "wifi" :tooltip wifi
|
||||
"${wifi}"
|
||||
)
|
||||
(eventbox
|
||||
:class "volume"
|
||||
:timeout "1000ms"
|
||||
:onclick "pavucontrol"
|
||||
:onscroll "./volume_scroll.sh {}"
|
||||
"${volume}%"
|
||||
)
|
||||
(box :class "battery" :tooltip {EWW_BATTERY.BAT0.status}
|
||||
{ " ${EWW_BATTERY.BAT0.capacity}%"}
|
||||
)
|
||||
(box :class "time"
|
||||
:tooltip date
|
||||
{formattime(EWW_TIME, "%H:%M")}
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defpoll volume :interval "100ms"
|
||||
"./get_volume.sh"
|
||||
)
|
||||
|
||||
(defpoll wifi :interval "5s" :initial " ..."
|
||||
"./get_wifi.sh"
|
||||
)
|
||||
|
||||
(defpoll layout :interval "1s" :initial " EN"
|
||||
"./get_layout.sh"
|
||||
)
|
||||
|
||||
(defpoll date :interval "5m"
|
||||
"date +'%A, %d %B %Y'"
|
||||
)
|
||||
|
||||
(defwindow bar
|
||||
:monitor 0
|
||||
:windowtype "dock"
|
||||
:geometry (geometry :x "0%"
|
||||
:y "9px"
|
||||
:width "98%"
|
||||
:height "30px"
|
||||
:anchor "top center"
|
||||
)
|
||||
:exclusive true
|
||||
(bar)
|
||||
)
|
||||
6
navi/laniakea/eww/get_layout.sh
Executable file
6
navi/laniakea/eww/get_layout.sh
Executable file
|
|
@ -0,0 +1,6 @@
|
|||
#!/bin/sh
|
||||
layout=$(hyprctl devices -j | jq -r '.keyboards[] | select(.name == "josefadamcik-sofle") | .active_keymap')
|
||||
case "$layout" in
|
||||
*Hebrew*) echo " HE" ;;
|
||||
*) echo " EN" ;;
|
||||
esac
|
||||
2
navi/laniakea/eww/get_volume.sh
Executable file
2
navi/laniakea/eww/get_volume.sh
Executable file
|
|
@ -0,0 +1,2 @@
|
|||
#! /bin/sh
|
||||
wpctl get-volume @DEFAULT_AUDIO_SINK@ | sed -r 's/Volume: //g' | xargs -n1 | awk '{print $1*100}' | xargs -n 1 echo "$1"
|
||||
14
navi/laniakea/eww/get_wifi.sh
Executable file
14
navi/laniakea/eww/get_wifi.sh
Executable file
|
|
@ -0,0 +1,14 @@
|
|||
#!/bin/sh
|
||||
iface=$(ip link | awk '/state UP/ && !/lo/ {print $2}' | tr -d ':' | grep -v eth | head -1)
|
||||
ssid=$(iwgetid "$iface" -r 2>/dev/null)
|
||||
strength=$(awk "/$iface/ {print int(\$3 * 100 / 70)}" /proc/net/wireless 2>/dev/null)
|
||||
if [ -z "$ssid" ]; then
|
||||
echo " disconnected"
|
||||
else
|
||||
if [ "$strength" -ge 75 ]; then icon=""
|
||||
elif [ "$strength" -ge 50 ]; then icon=""
|
||||
elif [ "$strength" -ge 25 ]; then icon=""
|
||||
else icon=""
|
||||
fi
|
||||
echo "$icon $ssid $strength%"
|
||||
fi
|
||||
2
navi/laniakea/eww/toggle_layout.sh
Executable file
2
navi/laniakea/eww/toggle_layout.sh
Executable file
|
|
@ -0,0 +1,2 @@
|
|||
#!/bin/sh
|
||||
hyprctl switchxkblayout josefadamcik-sofle next
|
||||
6
navi/laniakea/eww/volume_scroll.sh
Executable file
6
navi/laniakea/eww/volume_scroll.sh
Executable file
|
|
@ -0,0 +1,6 @@
|
|||
#!/bin/sh
|
||||
if [ "$1" == "up" ]; then
|
||||
wpctl set-volume @DEFAULT_SINK@ 5%+ -l 1.0
|
||||
else
|
||||
wpctl set-volume @DEFAULT_SINK@ 5%- -l 1.0
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue