diff --git a/eww/eww.scss b/eww/eww.scss new file mode 100644 index 0000000..d785b17 --- /dev/null +++ b/eww/eww.scss @@ -0,0 +1,41 @@ + /* Widgets */ +.lorem-text { + background: darkgrey; + color: black; +} + +.music { + background: transparent; + color: transparent; + + &--off { + background: transparent; + color: transparent; + } + + &--on { + background: #8ce513; + color: #010101; + } + + &--spotify { + background: #17d860; + color: #282828; + } + + &--firefox { + background: #fd8728; + color: #010101; + } + + &--mpv { + background: #420042; + color: white; + } + + &--chromium { + background: #1a73e8; + color: white; + } +} + diff --git a/eww/eww.yuck b/eww/eww.yuck new file mode 100644 index 0000000..bfee065 --- /dev/null +++ b/eww/eww.yuck @@ -0,0 +1,46 @@ +(include "./widgets/music.yuck") +(include "./widgets/lorem.yuck") + +(defwindow topbar_0 + :monitor 1 + :geometry (geometry :x "0%" + :y "0%" + :width "90%" + :height "10px" + :anchor "top center") + :stacking "bg" + :exclusive true + :reserve (struts :side "top" :distance "4%") + :windowtype "dock" + (bar0)) + +(defwidget bar0 [] + (centerbox :orientation "h" + (left) + (center) + (right))) + +(defwindow left [] + (box :orientation 'h' + :class: 'left' + :space-evenly true + :spacing 5 + :halign 'start' + (loremText :text "Workspaces"))) + + +(defwidget center [] + (box :orientation 'h' + :class 'center' + :space-evenly false + :spacing 5 + (media))) + + +(defwidget right [] + (box :orientation 'h' + :class 'right' + :space-evenly false + :spacing 5 + :halign 'end' + (loremText :text "Bar stuff"))) diff --git a/eww/scripts/getvol b/eww/scripts/getvol new file mode 100755 index 0000000..4e4275d --- /dev/null +++ b/eww/scripts/getvol @@ -0,0 +1,12 @@ +#!/bin/sh + +if command -v pamixer &>/dev/null; then + if [ true == $(pamixer --get-mute) ]; then + echo 0 + exit + else + pamixer --get-volume + fi +else + amixer -D pulse sget Master | awk -F '[^0-9]+' '/Left:/{print $3}' +fi diff --git a/eww/widgets/hypr_workspaces.yuck b/eww/widgets/hypr_workspaces.yuck new file mode 100644 index 0000000..e69de29 diff --git a/eww/widgets/lorem.yuck b/eww/widgets/lorem.yuck new file mode 100644 index 0000000..e1f4821 --- /dev/null +++ b/eww/widgets/lorem.yuck @@ -0,0 +1,5 @@ +(defwidget loremText [text] + (label :text text + :class 'lorem-text') + + ) diff --git a/eww/widgets/music.yuck b/eww/widgets/music.yuck new file mode 100644 index 0000000..0622570 --- /dev/null +++ b/eww/widgets/music.yuck @@ -0,0 +1,33 @@ +; icons used can be found on https://www.nerdfonts.com/cheat-sheet +(defvar playerIcons `{ + "spotify": "", + "mpv": "", + "firefox": "", + "chromium": "" +}`) +(defvar playerRegex "spotify|firefox|mpv|chromium") ; don't forget to update this with your icons +(defvar separator " | ") ; separator between artist and title +(defvar ellipsisIcon "…") ; your icon to display in case of ellipsis +(defvar ellipsisArtist 20) ; set length for ellipsis on artist +(defvar ellipsisTitle 25) ; set length for ellipsis on title +(defwidget media [] + (box :class "media" + :halign "center" + :valign "center" + :class { playerctl == '' || objectlength(playerctl) == 0 + ? 'music--off' + : matches(playerctl.player, playerRegex) + ? 'music--' + playerctl.player + : 'music--on' } + { playerctl == '' || objectlength(playerctl) == 0 + ? '' + : matches(playerctl.player, playerRegex) + ? "${playerIcons[playerctl.player]} ${substring(playerctl.artist, 0, ellipsisArtist)}${strlength(playerctl.artist) >= ellipsisArtist ? ellipsisIcon : ''} | ${substring(playerctl.title, 0, ellipsisTitle)}${strlength(playerctl.title) >= ellipsisTitle ? ellipsisIcon : ''}" + : "${playerctl.player} - ${substring(playerctl.artist, 0, ellipsisArtist)}${strlength(playerctl.artist) >= ellipsisArtist ? ellipsisIcon : ''} | ${ substring(playerctl.title, 0, ellipsisTitle)}${strlength(playerctl.title) >= ellipsisTitle ? ellipsisIcon : ''}" + } + ) +) + +(deflisten playerctl :initial "" + `playerctl --follow metadata --format '{"player": "{{ playerName }}", "trackid": "{{ mpris:trackid }}", "length": "{{ duration(mpris:length) }}", "artUrl": "{{ mrpis:artUrl }}", "album": "{{ album }}", "albumArtist": "{{ xesam:albumArtist }}", "artist": "{{ artist }}", "autoRating": "{{ xesam:autoRating }}", "discNumber": "{{ xesam:discNumber }}", "title": "{{ title }}", "trackNumber": "{{ xesam:trackNumber }}", "url": "{{ xesam:url }}", "position": "{{ position }}"}'` +) diff --git a/qt6ct/qt6ct.conf b/qt6ct/qt6ct.conf index 6853d1c..4cb2199 100644 --- a/qt6ct/qt6ct.conf +++ b/qt6ct/qt6ct.conf @@ -25,7 +25,7 @@ underline_shortcut=1 wheel_scroll_lines=3 [SettingsWindow] -geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\a\x80\0\0\0\0\0\0\v3\0\0\x2\xe\0\0\a\x80\0\0\0\0\0\0\v?\0\0\x2\x1a\0\0\0\x1\x2\0\0\0\a\x80\0\0\a\x80\0\0\0\0\0\0\v3\0\0\x2\xe) +geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\a\x80\0\0\0\0\0\0\xe\xe9\0\0\x4\x1f\0\0\a\x80\0\0\0\0\0\0\xe\xff\0\0\x4\x37\0\0\0\x1\x2\0\0\0\a\x80\0\0\a\x80\0\0\0\0\0\0\xe\xe9\0\0\x4\x1f) [Troubleshooting] force_raster_widgets=1 diff --git a/uwsm/env b/uwsm/env index b6bbb3b..6df9c80 100644 --- a/uwsm/env +++ b/uwsm/env @@ -17,3 +17,5 @@ export XDG_MENU_PREFIX=arch- export MOZ_ENABLE_WAYLAND=1 export GRIMBLAST_EDITOR='swappy -f' + +export PATH=$PATH:/home/mpuchstein/.local/bin diff --git a/vim/vimrc b/vim/vimrc index 80bdfe1..d8e6d67 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -17,6 +17,7 @@ call plug#begin() Plug 'ryanoasis/vim-devicons' Plug 'PhilRunninger/nerdtree-visual-selection' Plug 'elkowar/yuck.vim' + Plug 'eraserhd/parinfer-rust', {'do':'cargo build --release'} call plug#end() " Enable plugins and load plugin for the detected file type.