Hyprland stable

This commit is contained in:
Cedric Bonhomme 2024-03-30 13:16:01 +01:00
parent d987481a85
commit 92e559e299
19 changed files with 306 additions and 113 deletions

View file

@ -90,9 +90,9 @@ dunst &
# Manage desktops
"${HOME}/.local/share/go/bin/btops" &
# Widgets
eww daemon
eww open bar
eww open clock
eww daemon --config ~/.config/eww/eww-x11.yuck
eww open bar --config ~/.config/eww/eww-x11.yuck
eww open clock --config ~/.config/eww/eww-x11.yuck
#bspc subscribe node_state | while read -r _ _ _ _ state flag; do
# if [[ "$state" != fullscreen ]]; then continue; fi
# if [[ "$flag" == on ]]; then

View file

@ -0,0 +1,233 @@
(defvar time_rev false)
(defvar eww "/usr/bin/eww")
(deflisten window-title :initial "..." "sh ~/.config/eww/scripts/get-window-title")
(deflisten workspaces-hypr
`hyprland-workspaces ALL`)
(deflisten workspaces
`workspaces`)
(deflisten cal
`clock`)
(deflisten cover-path :initial "/tmp/cover.png"
`inotifywait /tmp/cover.png -m -e CLOSE_WRITE --format %w --quiet`)
(deflisten music :initial "Title"
`playerctl metadata --format '{"title":"{{title}}","artist":"{{artist}}","album":"{{album}}"}' -F`)
(deflisten music-position :initial "{'position':'0','duration':' '}"
`playerctl metadata --format '{"elapsed":"{{duration(position)}}","total":"{{duration(mpris:length)}}","elapsed-ms":{{position}},"total-ms":{{mpris:length}}}' -F`)
(deflisten display-music :initial "false"
`playerctl status -F`
)
(defpoll xtitle :interval "0.5s" :initial ""
`xdotool getactivewindow getwindowname | sed 's/ [—|-] [a-zA-Z]*$//g'`)
(defpoll music-position-percent :interval "1s" :initial "0"
`mixer position`)
(defpoll mascot :interval "30m" :initial "images/ikuyo.png"
`fish -c 'random choice "images/bocchi.png" "images/ikuyo.png" "images/ryo.png" "images/nijika.png"'`)
(defpoll time :interval "10s"
`date +'{"hour":"%H","min":"%M"}'`)
(defpoll date :interval "30m"
`date +'{"year":"%Y","month":"%m","day":"%d"}'`)
(defwidget workspaces-hypr []
(eventbox :onscroll "hyprctl dispatch workspace `echo {} | sed 's/up/+/\' | sed 's/down/-/'`1"
(box :space-evenly false :spacing 0 :halign "start" :valign "center" :vexpend true :hexpend true :class "workspaces"
(for i in workspaces-hypr
(button
:onclick "hyprctl dispatch workspace ${i.id}"
:class "${i.class}"
" ${i.name} ")))))
(defwidget window-title []
(label :class "inline" :text {window-title} :valign "center" :wrap "false" :limit-width 120 :visible {window-title != ""})
)
(defwidget clock []
(box :orientation "h" :class "clock" :space-evenly "false" :spacing 0
(image :path {mascot} :image-width 90 :image-height 225)
(box :orientation "v" :space-evenly "false" :spacing 5 :valign "center"
(literal :content cal)
(box :orientation "h" :class "date" :space-evenly "false" :spacing 5 :halign "end"
(box :class "day-side" {date.day})
(label :class "hour-side" :text "")
(box :class "month-side" {date.month})
(label :class "hour-side" :text "")
(box :class "year-side" {date.year}))
)
)
)
(defwidget progress-bar []
(box :orientation "v" :class "full-music-bar" :spacing 0
(scale :orientation "h" :value {music-position-percent} :min 0 :max 100 :draw-value false :onchange "mpc seek {}%")
)
)
(defwidget cover []
(box :orientation "v" :class "cover" :space-evenly "false" :spacing 0
(image :path {cover-path} :image-width 300 :image-height 300)
)
)
(defwidget workspaces []
(literal :content workspaces)
)
(defwidget inline-clock []
(eventbox :onhover "${eww} update time_rev=true"
:onhoverlost "${eww} update time_rev=false"
(box :orientation "h" :class "inline inline-clock" :space-evenly "false" :spacing 0 :halign "end"
(box :orientation "h" :class "" :space-evenly "false" :spacing 0 :halign "end"
(label :class "prefix" :text " ")
(box :class "hour-side" {time.hour})
(label :class "" :text ":")
(box :class "day-side" {time.min})
)
(revealer :transition "slideleft" :reveal time_rev :duration "350ms"
(box :orientation "h" :class "inline-date" :space-evenly "false" :spacing 0 :halign "end"
(label :class "prefix" :text " ")
(box :class "day-side" {date.day})
(label :class "hour-side" :text "")
(box :class "month-side" {date.month})
(label :class "hour-side" :text "")
(box :class "year-side" {date.year})
)
)
)
)
)
(defwidget inline-music []
(revealer :transition "slideleft" :reveal {display-music == "Playing" ? "true" : "false"} :duration "350ms"
(box :orientation "h" :class "inline inline-music" :space-evenly "false" :spacing 0 :halign "end"
(label :class "prefix" :text " ")
(image :path {cover-path} :class "inline-cover" :image-width 28 :image-height 28)
(label :class "" :text {music.title} :wrap "false" :limit-width 60 :show_truncated "true")
(label :class "separator" :text "")
(box :class "day-side" {music-position.elapsed})
(label :class "separator" :text "")
(box :class "" {music-position.total})
)
)
)
(defwidget xtitle []
(box :orientation "h" :class "inline inline-xtitle" :space-evenly "false" :spacing 10 :halign "end" :visible {xtitle != ""}
(label :class "" :text {xtitle} :wrap "false" :limit-width 60)
)
)
(defwidget bar []
(box :class "bar" :orientation "v" :space-evenly "false" :spacing 0
(progress-bar)
(centerbox :class "bar" :orientation "h"
(workspaces)
(xtitle)
(box :orientation "h" :space-evenly "false" :spacing 10 :halign "end"
(inline-music)
(inline-clock)
)
)
)
)
(defwidget bar-hypr []
(box :class "bar" :orientation "v" :space-evenly "false" :spacing 0
(progress-bar)
(centerbox :class "bar" :orientation "h"
(workspaces-hypr)
(window-title)
(box :orientation "h" :space-evenly "false" :spacing 10 :halign "end"
(inline-music)
(inline-clock)
)
)
)
)
(defwindow calendar
:monitor 0
:stacking "bg"
:geometry (geometry
:x "-100px"
:y "-80px"
:width "100px"
:height "100px"
:anchor "bottom right")
(calendar :show-details false :show-heading false :show-day-names false :show-week-numbers false :tooltip "${date.day}-${date.month}-${date.year}" :day {date.day} :month {date.month} :year {date.year}))
(defwindow clock
:monitor 0
:stacking "bg"
:windowtype "desktop"
:geometry (geometry
:x "7px"
:y "7px"
:width "100px"
:height "100px"
:anchor "bottom right")
(clock)
)
(defwindow progress-bar
:monitor 0
:stacking "bg"
:windowtype "desktop"
:geometry (geometry
:x "9px"
:y "3px"
:width "1904px"
:anchor "top left")
(progress-bar)
)
(defwindow cover
:monitor 0
:stacking "bg"
:windowtype "desktop"
:geometry (geometry
:x "-7px"
:y "40px"
:width "100px"
:height "100px"
:anchor "top right")
(cover)
)
(defwindow bar
:monitor 0
:windowtype "dock"
:stacking "bg"
:wm-ignore "false"
:geometry (geometry
:x "7px"
:y "3px"
:height "28px"
:width "1904px"
:anchor "top left")
(bar)
)
(defwindow bar-hypr
:monitor 0
:exclusive true
:stacking "bg"
:geometry (geometry
:x "7px"
:y "3px"
:height "28px"
:width "1904px"
:anchor "top center")
(bar-hypr)
)

View file

@ -216,6 +216,7 @@ calendar {
border-radius: 10px;
color: $foreground;
padding: 0 1em;
font-size: 13px;
&-music {
}
&-clock {

View file

@ -6,9 +6,6 @@
(deflisten workspaces-hypr
`hyprland-workspaces ALL`)
(deflisten workspaces
`workspaces`)
(deflisten cal
`clock`)
@ -25,9 +22,6 @@
`playerctl status -F`
)
(defpoll xtitle :interval "0.5s" :initial ""
`xdotool getactivewindow getwindowname | sed 's/ [—|-] [a-zA-Z]*$//g'`)
(defpoll music-position-percent :interval "1s" :initial "0"
`mixer position`)
@ -42,17 +36,15 @@
(defwidget workspaces-hypr []
(eventbox :onscroll "hyprctl dispatch workspace `echo {} | sed 's/up/+/\' | sed 's/down/-/'`1"
(box :space-evenly true :spacing 0 :halign "start" :valign "center" :vexpend true :hexpend true :class "workspaces"
(box :space-evenly false :spacing 0 :halign "start" :valign "center" :vexpend true :hexpend true :class "workspaces"
(for i in workspaces-hypr
(button
:onclick "hyprctl dispatch workspace ${i.id}"
:class "${i.class}"
"${i.name}")))))
" ${i.name} ")))))
(defwidget window-title []
(box :orientation "h" :class "inline inline-xtitle" :space-evenly "false" :spacing 10 :halign "end" :visible {window-title != ""}
(label :class "" :text {window-title} :wrap "false" :limit-width 60)
)
(label :class "inline" :text {window-title} :valign "center" :wrap "false" :limit-width 120 :visible {window-title != ""})
)
(defwidget clock []
@ -82,10 +74,6 @@
)
)
(defwidget workspaces []
(literal :content workspaces)
)
(defwidget inline-clock []
(eventbox :onhover "${eww} update time_rev=true"
:onhoverlost "${eww} update time_rev=false"
@ -114,7 +102,7 @@
(revealer :transition "slideleft" :reveal {display-music == "Playing" ? "true" : "false"} :duration "350ms"
(box :orientation "h" :class "inline inline-music" :space-evenly "false" :spacing 0 :halign "end"
(label :class "prefix" :text " ")
(image :path {cover-path} :class "inline-cover" :image-width 28 :image-height 28)
;(image :path {cover-path} :class "inline-cover" :image-width 28 :image-height 28)
(label :class "" :text {music.title} :wrap "false" :limit-width 60 :show_truncated "true")
(label :class "separator" :text "")
(box :class "day-side" {music-position.elapsed})
@ -124,26 +112,6 @@
)
)
(defwidget xtitle []
(box :orientation "h" :class "inline inline-xtitle" :space-evenly "false" :spacing 10 :halign "end" :visible {xtitle != ""}
(label :class "" :text {xtitle} :wrap "false" :limit-width 60)
)
)
(defwidget bar []
(box :class "bar" :orientation "v" :space-evenly "false" :spacing 0
(progress-bar)
(centerbox :class "bar" :orientation "h"
(workspaces)
(xtitle)
(box :orientation "h" :space-evenly "false" :spacing 10 :halign "end"
(inline-music)
(inline-clock)
)
)
)
)
(defwidget bar-hypr []
(box :class "bar" :orientation "v" :space-evenly "false" :spacing 0
(progress-bar)
@ -207,20 +175,6 @@
(cover)
)
(defwindow bar
:monitor 0
:windowtype "dock"
:stacking "bg"
:wm-ignore "false"
:geometry (geometry
:x "7px"
:y "3px"
:height "28px"
:width "1904px"
:anchor "top left")
(bar)
)
(defwindow bar-hypr
:monitor 0
:exclusive true

View file

@ -1,6 +1,6 @@
# Source a file (multi-file configs)
source = ~/.config/hypr/hyprland/general.conf
source = ~/.config/hypr/hyprland/env.conf
source = ~/.config/hypr/hyprland/general.conf
source = ~/.config/hypr/hyprland/keybinds.conf
source = ~/.config/hypr/hyprland/execs.conf
source = ~/.config/hypr/hyprland/rules.conf
source = ~/.config/hypr/hyprland/keybinds.conf

View file

@ -5,14 +5,13 @@ env = QT_QPA_PLATFORMTHEME,qt6ct
#env = QT_PLATFORM_PLUGIN,kde
env = XDG_CURRENT_DESKTOP,Hyprland
#env = XDG_CURRENT_DESKTOP,Hyprland
env = XDG_SESSION_TYPE,wayland
env = XDG_SESSION_DESKTOP,Hyprland
env = KRITA_NO_STYLE_OVERRIDE,1
env = GDK_BACKEND,wayland,x11
#env = QT_QPA_PLATFORM,xcb
env = QT_QPA_PLATFORM,xcb
env = QT_QPA_PLATFORM,wayland
# env = QT_QPA_PLATFORMTHEME,qt6ct #env = QT_STYLE_OVERRIDE,kvantum
env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1
env = QT_AUTO_SCREEN_SCALE_FACTOR,1

View file

@ -1,47 +1,49 @@
##################################################
# #
# Theme #
##################################################
# #
exec-once = swaybg -m fill -i ~/.config/feh/wallpaper.png &
exec-once = wal -Rnq &
exec-once = hyprctl setcursor Bibata-Original-Classic 24
##################################################
exec-once = hyprctl setcursor Bibata-Original-Classic 24 &
# #
# Plugins #
##################################################
exec-once = hyprpm reload
# #
# exec-once = hyprpm reload &
exec-once = otd-daemon &
##################################################
# Appmenu #
##################################################
exec-once = kded6 &
exec-once = qdbus6 org.kde.kded6 /kded org.kde.kded6.loadModule appmenu &
exec-once = ~/bin/qmenu_registrar &
exec-once = dunst &
##################################################
# #
# Sound #
##################################################
# #
exec-once = pipewire-autostart.sh &
##################################################
# #
# Music #
##################################################
# #
exec-once = mpd &
exec-once = playerctld daemon &
exec-once = mpDris2 &
##################################################
# #
# Widgets #
##################################################
# #
exec-once = hyprland-autoname-workspaces &
#exec-once = waybar -c ~/.config/waybar/config-hypr &
exec-once = eww daemon &
exec-once = eww open bar-hypr &
exec-once = eww open clock &
##################################################
# #
# Clipboard #
##################################################
# #
exec-once = wl-paste --type text --watch cliphist store
exec-once = wl-paste --type image --watch cliphist store
##################################################
# #
# User #
##################################################
# #
exec-once = gammastep -l 44.481:0.3545 &
exec-once = transmission-daemon &
exec-once = ~/bin/transmission-rss &
exec-once = vdirsyncer sync &
# #
# Appmenu #
# #
exec-once = dunst &
exec-once = kded6 &
exec-once = qdbus6 org.kde.kded6 /kded org.kde.kded6.loadModule appmenu &
exec-once = qmenu_registrar &
#exec-once = /usr/lib/plasma-hud/plasma-hud &

View file

@ -105,7 +105,7 @@ binds {
master {
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
new_is_master = true
new_is_master = false
}
gestures {

View file

@ -10,6 +10,8 @@ bind=$mainMod,F,fullscreen,
bind=$mainMod,SPACE, exec, rofi -show drun -fullscreen -monitor -4 --terminal kitty -theme app -drun-categories System,Utility,Network,Office,Settings,Game,Qt,Development,Graphics,GTK,AudioVideo,Audio,Video,Viewer,WebBrowser
bind=$mainMod + SHIFT, SPACE , exec, rofi -show drun -fullscreen -monitor -4 --terminal kitty -theme manga -drun-categories Manga
bind=$mainMod + SHIFT, A , exec, ~/bin/qmenu_hud
#bind=$mainMod + SHIFT, A , exec, qdbus com.github.zren.PlasmaHUD /PlasmaHUD com.github.zren.PlasmaHUD.toggleHUD
bind=$mainMod, ESCAPE, exec, ~/.config/waybar/waybar.sh
bind=$mainMod + SHIFT,T,pseudo,
@ -45,16 +47,16 @@ bind=$mainMod,8,workspace,8
bind=$mainMod,9,workspace,9
bind=$mainMod,0,workspace,10
bind=ALT,1,movetoworkspace,1
bind=ALT,2,movetoworkspace,2
bind=ALT,3,movetoworkspace,3
bind=ALT,4,movetoworkspace,4
bind=ALT,5,movetoworkspace,5
bind=ALT,6,movetoworkspace,6
bind=ALT,7,movetoworkspace,7
bind=ALT,8,movetoworkspace,8
bind=ALT,9,movetoworkspace,9
bind=ALT,0,movetoworkspace,10
bind=$mainMod + SHIFT,1,movetoworkspace,1
bind=$mainMod + SHIFT,2,movetoworkspace,2
bind=$mainMod + SHIFT,3,movetoworkspace,3
bind=$mainMod + SHIFT,4,movetoworkspace,4
bind=$mainMod + SHIFT,5,movetoworkspace,5
bind=$mainMod + SHIFT,6,movetoworkspace,6
bind=$mainMod + SHIFT,7,movetoworkspace,7
bind=$mainMod + SHIFT,8,movetoworkspace,8
bind=$mainMod + SHIFT,9,movetoworkspace,9
bind=$mainMod + SHIFT,0,movetoworkspace,10
bind=CTRL,SPACE,exec,dunstctl close
bind=CTRL+SHIFT,SPACE,exec,dunstctl close-all

View file

@ -3,5 +3,6 @@ layerrule = blur, gtk-layer-shell
layerrule = blur, eww
layerrule = blur, laucher
layerrule = blur, notifications
windowrule = rounding 0, Rofi
layerrule = ignorezero, waybar
layerrule = blur, waybar
layerrule = blur, rofi

View file

@ -84,6 +84,7 @@ DEFAULT = ""
"qutebrowser" = " "
"konqueror" = " "
"Vivaldi-stable" = " "
"vivaldi-stable" = " "
"Steam" = " "
"steam" = " "
"steamwebhelper" = " "
@ -161,7 +162,7 @@ DEFAULT = ""
"easyeffects" = "󰺣 "
"lsp-plugins" = "󰺣 "
"kaidan" = "󰭹 "
"KotatogramDesktop" = "󰭹 "
"Kotatogram" = "󰭹 "
"betterbird" = "󰛮 "
"kdeconnect.app" = " "
"Ardour" = "🎹"
@ -174,3 +175,4 @@ DEFAULT = ""
"plasma-systemmonitor" = " "
"Eww" = " "
"Rofi" = ""
"OpenTabletDriver" = "󰻎 "

View file

@ -1,9 +1,6 @@
configuration {
font: "IosevkaLyteTerm Nerd Font 11";
// icon-theme: "kora";
icon-theme: "Deepin2022-Dark";
//icon-theme: "Uos-fulldistro-icons";
// icon-theme: "buuf-nestort";
show-icons: true;
threads: 0;
scroll-method: 0;

View file

@ -17,25 +17,25 @@
"modules-left": [
//"custom/rofi",
"hyprland/workspaces",
"hyprland/workspaces"
//"hyprland/submap",
//"temperature",
//"idle_inhibitor",
"mpd"
],
"modules-center": [
"hyprland/window"
],
"modules-right": [
"custom/weather",
"clock#date",
"mpd",
//"custom/weather",
"clock"
//"backlight",
//"custom/storage",
//"memory",
//"cpu",
//"battery",
//"pulseaudio",
"wireplumber"
//"pulseaudio"
//"wireplumber"
],
@ -285,7 +285,7 @@
"hyprland/workspaces": {
"all-outputs": true,
"format": "{icon}",
"format": "{name}",
"format-icons": {
"1": "",
"2": "",

View file

@ -1,7 +1,7 @@
* {
/* `otf-font-awesome` is required to be installed for icons */
font-family: IosevkaLyteTerm Nerd Font;
font-size: 9pt;
font-size: 13px;
font-weight: 900;
margin: 0;
padding: 0;
@ -13,7 +13,7 @@
/* Reset all styles */
* {
border: none;
border-radius: 3px;
border-radius: 10px;
min-height: 0;
margin: 0.2em 0.3em 0.2em 0.3em;
}
@ -64,7 +64,6 @@ window#waybar.hidden {
/* border-radius: 20px; */
/* padding-left: 10px; */
/* padding-right: 10px; */
color: #64727d;
}
/* Each module */
@ -103,14 +102,16 @@ window#waybar.hidden {
color: #e5e5e5;
/* color: #bf616a; */
border-radius: 20px;
background-color: #1e1e1e;
background-color: #0B1D35;
opacity: 0.8;
}
#window,
#workspaces {
border-radius: 20px;
padding: 0px 10px;
background-color: #1e1e1e;
background-color: #0B1D35;
opacity: 0.8;
}
#cpu {

View file

@ -7,4 +7,4 @@ killall -q waybar
while pgrep -x waybar >/dev/null; do sleep 1; done
# Launch main
waybar
waybar -c ~/.config/waybar/config-hypr

View file

@ -59,7 +59,7 @@ set -x SDL_AUDIODRIVER alsa
## Aliases
alias imv 'imv -c "exec _wid=\$(xdo id);xprop -f WM_CLIENT_MACHINE 8s -set WM_CLIENT_MACHINE \$(hostname) -id \$_wid;xprop -f _NET_WM_PID 32c -set _NET_WM_PID \$imv_pid -id \$_wid;pidswallow -gt \$_wid"'
#alias imv 'imv -c "exec _wid=\$(xdo id);xprop -f WM_CLIENT_MACHINE 8s -set WM_CLIENT_MACHINE \$(hostname) -id \$_wid;xprop -f _NET_WM_PID 32c -set _NET_WM_PID \$imv_pid -id \$_wid;pidswallow -gt \$_wid"'
alias wal 'wal -o bspwmrc'
alias powa 'loginctl poweroff'
alias bocchi 'sudo poweroff'

View file

@ -1187,3 +1187,4 @@ include ~/.cache/wal/colors-kitty.conf
#: }}}
# }}}
confirm_os_window_close 0

View file

@ -1,6 +1,6 @@
* {{
background: #00000000;
background-color: #00000066;
background-color: {background}80;
background-entry: #00000033;
background-alt: {color5}80;
foreground: #f2f2f2EE;

View file

@ -41,7 +41,7 @@ c.aliases = {'mpv': 'spawn --userscript view_in_mpv', 'q': 'quit', 'w': 'session
# environment.
# Type: String
# c.qt.force_platformtheme = 'qt6ct'
c.qt.force_platformtheme = ""
c.qt.force_platformtheme = "qt6ct"
# Always restore open sites when qutebrowser is reopened.
c.auto_save.session = True