Compare commits

..

7 Commits

Author SHA1 Message Date
fd621da61b adding dropshadows to networkinfo 2025-05-08 01:03:48 +02:00
5dfc5add07 adding features to net info 2025-05-07 01:56:43 +02:00
8dca3edd78 remembering HTML syntax 2025-05-06 00:11:38 +02:00
373ae8e6e5 Update README.md 2025-05-06 00:10:17 +02:00
11d5e6b1a0 testing images in readme 2025-05-06 00:08:54 +02:00
52d9cbbc31 adding more missing deps 2025-05-06 00:03:04 +02:00
d6299a5e0c adding screenshot bind 2025-05-06 00:01:02 +02:00
8 changed files with 174 additions and 46 deletions

View File

@@ -1,3 +1,4 @@
# My Hyprland setup dotfiles # My Hyprland setup dotfiles
These files can be used to reproduce my Hyprland setup on ArchLinux based distros. These files can be used to reproduce my Hyprland setup on ArchLinux based distros.
<img src=screen.png>

View File

@@ -9,8 +9,9 @@
border-radius: 20px; border-radius: 20px;
border-color: #db5e5e; border-color: #db5e5e;
border-style: solid; border-style: solid;
border-width: 1px; box-shadow: 0px 0px 2px rgba(0, 0, 0, .6);
} }
.buttons { .buttons {
padding: 10px; padding: 10px;
background-color: rgba(172, 89, 89, 0.4); background-color: rgba(172, 89, 89, 0.4);
@@ -18,41 +19,91 @@
border-color: #2b1111; border-color: #2b1111;
border-style: solid; border-style: solid;
border-width: 1px; border-width: 1px;
box-shadow: 0px 0px 2px rgba(0, 0, 0, .6);
}
.header {
background-color: #221f1f;
border-radius: 20px;
padding: 5px;
box-shadow: 0px 0px 2px rgba(0, 0, 0, .6);
} }
.topcontent { .topcontent {
margin-top: 50px; margin-top: 50px;
padding: 20px; padding: 10px;
background-color: rgba(29, 29, 29, 0.2); background-color: #221f1f;
border-radius: 100px; border-radius: 20px;
//border-color: #db5e5e;
//border-style: solid;
border-width: 1px; border-width: 1px;
box-shadow: 0px 0px 2px rgba(0, 0, 0, .6);
} }
.centercontent { .centercontent {
padding: 20px; padding: 20px;
//margin: 10px; background-color: #221f1f;
background-color: rgba(37, 23, 23, 0.4);
border-radius: 20px; border-radius: 20px;
//border-color: #db5e5e;
//border-style: solid;
border-width: 1px; border-width: 1px;
box-shadow: 0px 0px 2px rgba(0, 0, 0, .6);
}
.vpncontent {
padding-left: 75px;
padding-right: 75px;
padding-bottom: 0px;
border-radius: 20px;
background-color: #221f1f;
box-shadow: 0px 0px 2px rgba(0, 0, 0, .6);
}
.netcontent {
padding-left: 20px;
padding-right: 20px;
padding-top: 7px;
padding-bottom: 13px;
border-radius: 20px;
background-color: #221f1f;
box-shadow: 0px 0px 2px rgba(0, 0, 0, .6);
} }
.bottomcontent { .bottomcontent {
padding: 10px; padding: 10px;
} }
.neticon {
font-size: 50px;
padding-left: 70px;
}
.nettext {
padding-left: 70px;
}
.vpnicon {
font-size: 50px;
}
.netgraph {
background-color: #db5e5e;
border-style: solid;
border-width: 1px;
border-color: #2b1111;
color: #bb5a5a;
}
.infolabel { .infolabel {
padding: 20px; padding: 20px;
} }
.name {
padding : 0px;
}
.translation {
padding: 1px;
margin-right: 11px;
font-size: 80%;
}
/* .exitbutton {
[scratchpads.network] font-size: 140%;
command = "nm-connection editor" padding-right: 10px;
class = "nm-connection-editor"
size ="600px 800px" }
margin = 50 .infobutton {
unfocus = "hide" font-size: 120%;
animation = "fromRight" padding-left: 10px;
multi = true
}
*/ .infobutton:hover, .exitbutton:hover {
color:#ad3535;
transition: all 1s ease;
}

View File

@@ -7,16 +7,26 @@
:interval "30s" :interval "30s"
`./scripts/netinfo.sh 1`) `./scripts/netinfo.sh 1`)
(defpoll contype :initial "x"
:interval "30s"
`./scripts/netinfo.sh 1 | cut -c 1`)
(defpoll nameserver :initial "getting info..." (defpoll nameserver :initial "getting info..."
:interval "30s" :interval "30s"
`cat /etc/resolv.conf | grep "nameserver" | awk '{print $2}'`) `cat /etc/resolv.conf | grep "nameserver" | awk '{print $2}'`)
(defpoll vpnstatus :initial "3"
:interval "30s"
`./scripts/vpninfo.sh`)
(deflisten hostname :initial "getting info..." (deflisten hostname :initial "getting info..."
`cat /etc/hostname`) `cat /etc/hostname`)
; netWindow ; netWindow
; ---------------------------------- ; ----------------------------------
; | content | ; | content |
@@ -31,15 +41,40 @@
; | -------------------- | ; | -------------------- |
; | | ; | |
; ---------------------------------- ; ----------------------------------
(defwidget header []
(box :orientation "h" :class "header"
;:halign "center"
:valign "start"
(button :class "infobutton" :valign "center" :halign "start" :onclick "pypr toggle networkinfo && hyprctl dispatch bringactivetotop" "")
(box :valign "start":orientation "v" :halign "center" :class "namebox"
(label :valign "start" :halign "end" :text "ネットワーク" :class "name")
(label :valign "start" :halign "end" :text "[Network]" :class "translation"))
(button :class "exitbutton" :valign "center" :halign "end" :onclick "eww close network" "")
))
(defwidget topcontent [] (defwidget topcontent []
(box :orientation "h" :class "topcontent" (box :orientation "h" :class "topcontent"
:halign "center" :valign "center"
:valign "start" (box :orientation "v"
(infobox :name "Hostname:" :info hostname) (box :halign "start" :width 65 :class "neticon"
)) {contype == "e"
? "󰈀"
: contype == "w"
? ""
: ""})
(box :halign "start" :class "device" :class "nettext"
{contype == "e"
? "Wired"
: contype == "w"
? "Wireless"
: "Unknown connection type"})
);)
(infobox :halign "start" :class "hostname" :name "Hostname:" :info hostname)))
(defwidget content [] (defwidget content []
(box :orientation "v" :class "content" (box :orientation "v" :class "content"
:halign "end" :halign "end"
(header)
(topcontent) (topcontent)
(centercontent) (centercontent)
(lowercontent) (lowercontent)
@@ -48,7 +83,7 @@
(defwidget centercontent [] (defwidget centercontent []
(box :orientation "h" :class "centercontent" (box :orientation "h" :class "centercontent"
:halign "end" :halign "end"
:valign "start" :valign "center"
(infobox :name "Interface:" :info interface) (infobox :name "Interface:" :info interface)
(infobox :name "IP Address:" :info ipaddress) (infobox :name "IP Address:" :info ipaddress)
(infobox :name "DNS Server:" :info nameserver) (infobox :name "DNS Server:" :info nameserver)
@@ -56,11 +91,33 @@
)) ))
(defwidget lowercontent[] (defwidget lowercontent[]
(box :orientation "h" :class "lowercontent" (box :orientation "h" :class "lowercontent"
(vpncontent)
(netcontent)))
(defwidget netcontent[]
(box :orientation "h" :class "netcontent"
:halign "center" :halign "center"
:valign "center" :valign "center"
(netbox :type "Download":dev interface :speed {EWW_NET[interface].NET_DOWN}) (netbox :type "Download":dev interface :speed {EWW_NET[interface].NET_DOWN})
(netbox :type "Upload":dev interface :speed {EWW_NET[interface].NET_UP}))) (netbox :type "Upload":dev interface :speed {EWW_NET[interface].NET_UP})))
(defwidget vpncontent[]
(box :orientation "v" :class "vpncontent"
:halign "center"
:valign "center"
(label :text "VPN Status:")
(box :width 65 :class "vpnicon"
{ vpnstatus == 1
? "󱚨"
: vpnstatus == 2
? "󰣫"
: "󰍀"
})
(box :width 65
{ vpnstatus == 1
? "Connected"
: vpnstatus == 2
? "Tailscale"
: "Disconnected"
})))
(defwidget bottomcontent [] (defwidget bottomcontent []
(box :orientation "h" :class "bottomcontent" (box :orientation "h" :class "bottomcontent"
:halign "end" :halign "end"
@@ -69,8 +126,8 @@
(defwidget infobox [name info] (defwidget infobox [name info]
(box :orientation "v" :class "infobox" (box :orientation "v" :class "infobox"
:halign "center" ;:halign "center"
:valign "center" ;:valign "center"
(infolabel :text name) (infolabel :text name)
(infolabel :text info))) (infolabel :text info)))
@@ -78,15 +135,24 @@
(box :orientation "horizontal" :class "buttons" (box :orientation "horizontal" :class "buttons"
:halign "end" :halign "end"
:valign "end" :valign "end"
(button :onclick "pypr toggle network && hyprctl dispatch bringactivetotop" (button :onclick "pypr toggle network && hyprctl dispatch bringactivetotop"
"Open Connection Editor"))) "Open Connection Editor")))
;; Labels:
(defwidget infolabel [text] (defwidget infolabel [text]
(label :text text :class "infolabel" (label :text text :class "infolabel"
:halign "center" ;:halign "center"
:valign "center")) ;:valign "center"
))
;;*
;(defwidget headlabel [text]
; (label :text text :class "headlabel"
; :halign "center"
; :valign "center"))
;(defwidget sublabel [text]
;(label :text text :class "sublabel"
; :halign "center"
; :valign "center"))
;*/
(defwidget netbox [type dev speed] (defwidget netbox [type dev speed]
(box :orientation "v" :class "netbox" (box :orientation "v" :class "netbox"
:halign "center" :halign "center"
@@ -95,27 +161,27 @@
(netGraph :speed speed) (netGraph :speed speed)
(box :width 65 (box :width 65
{speed / 1000000 > 0.5 {speed / 1000000 > 0.5
? "${round(speed / 1000000, 0)} Mb" ? "${round(speed / 1000000, 0)} Mbit/s"
: speed / 1000 > 0.5 : speed / 1000 > 0.5
? "${round(speed / 1000, 0)} Kb" ? "${round(speed / 1000, 0)} Kbit/s"
: "${round(speed, 0)} b"}))) : "${round(speed, 0)} bit/s"})))
(defwidget netGraph [speed] (defwidget netGraph [speed]
(graph :value speed :time-range "30s")) (graph :class "netgraph" :value speed :time-range "30s"))
(defwindow network (defwindow network
:class network_window :class network_window
:monitor 1 :monitor 1
:geometry (geometry :x "20px" :geometry (geometry :x "20px"
:y "50px" :y "0px"
:width "560px" :width "560px"
:height "85%" :height "80%"
:anchor "right center") :anchor "right center")
:stacking "fg" :stacking "fg"
;:reserve (struts :distance "10px" :side "top") ;;only for x11 ;:reserve (struts :distance "10px" :side "top") ;;only for x11
;:windowtype "dock" ;;only for x11 ;:windowtype "dock" ;;only for x11
;:wm-ignore false ;;only for x11 ;:wm-ignore false ;;only for x11
;(header)
(content)) (content))

8
config/eww/scripts/vpninfo.sh Executable file
View File

@@ -0,0 +1,8 @@
#!/bin/sh
if ip --brief addr | grep -q "tun" ; then
echo 1
elif ip --brief addr | grep -q "tail" ; then
echo 2
else
echo 3
fi

View File

@@ -23,9 +23,9 @@ autogenerated = 0 # remove this line to remove the warning
################ ################
# See https://wiki.hyprland.org/Configuring/Monitors/ # See https://wiki.hyprland.org/Configuring/Monitors/
#monitor=,preferred,auto,auto monitor=,preferred,auto,auto
monitor = DP-1, 1920x1080@60, 0x0, 1 #monitor = DP-1, 1920x1080@60, 0x0, 1
monitor = DP-2, 3840x1080@144, 980x1080, 1 #monitor = DP-2, 3840x1080@144, 980x1080, 1
################### ###################
### MY PROGRAMS ### ### MY PROGRAMS ###
@@ -245,6 +245,7 @@ bind = $mainMod, J, togglesplit, # dwindle
bind = $mainMod, M, fullscreen, 1 bind = $mainMod, M, fullscreen, 1
bind = $mainMod SHIFT, M, fullscreen bind = $mainMod SHIFT, M, fullscreen
bind = $mainMod SHIFT, A, exec, pypr toggle pavucontrol && hyprctl dispatch bringactivetotop bind = $mainMod SHIFT, A, exec, pypr toggle pavucontrol && hyprctl dispatch bringactivetotop
bind = , PRINT, exec, hyprshot -m output
# Move focus with mainMod + arrow keys # Move focus with mainMod + arrow keys
bind = $mainMod, left, movefocus, l bind = $mainMod, left, movefocus, l
bind = $mainMod, right, movefocus, r bind = $mainMod, right, movefocus, r
@@ -318,4 +319,4 @@ windowrule = suppressevent maximize, class:.*
windowrule = nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0 windowrule = nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0
windowrule = float, class:nm-connection-editor windowrule = float, class:nm-connection-editor
windowrule = float, class:zen,title:Picture-in-Picture windowrule = float, class:zen,title:Picture-in-Picture

View File

@@ -7,7 +7,8 @@ makepkg -i
popd popd
yay -S hyprcursor hyprgraphics hypridle hyprland hyprland-protocols hyprland-qt-support hyprland-qtutils hyprlock \ yay -S hyprcursor hyprgraphics hypridle hyprland hyprland-protocols hyprland-qt-support hyprland-qtutils hyprlock \
hyprpolkitagent hyprutils hyprwayland-scanner xdg-desktop-portal-hyprland pyprland flatpak \ hyprpolkitagent hyprutils hyprwayland-scanner xdg-desktop-portal-hyprland pyprland flatpak \
xdg-desktop-portal xdg-desktop-portal-gtk xdg-desktop-portal-kde sddm xdg-utils waybar eww kvantum swaync kitty xdg-desktop-portal xdg-desktop-portal-gtk xdg-desktop-portal-kde sddm xdg-utils waybar eww kvantum swaync kitty \
pavucontrol bluez nwg-look hyprshot
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/ flatpak remote-add --if-not-exists flathub https://dl.flathub.org/
flatpak install zen flatpak install zen

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 MiB

After

Width:  |  Height:  |  Size: 1.4 MiB