diff --git a/README.org b/README.org index d1e7a01..5cc435c 100644 --- a/README.org +++ b/README.org @@ -183,7 +183,7 @@ services.xserver = { displayManager = { startx.enable = true; sddm = { - enable = true; + enable = false; }; session = [ { @@ -361,6 +361,7 @@ rsync jq ripgrep fd +socat ffmpeg-full imagemagick libheif @@ -420,6 +421,7 @@ libnotify rofi-wayland wofi waybar +tridactyl-native eww-wayland wlrctl hyprpaper @@ -605,6 +607,7 @@ services.emacs = { no-littering tree-sitter tree-sitter-langs + rustic evil evil-collection general @@ -2272,6 +2275,8 @@ I also use home-manager for managing dotfiles. This means that everything is con }; }; + home.file.".mozilla/native-messaging-hosts".source = "/run/current-system/sw/lib/mozilla/native-messaging-hosts"; + home.file.".mozilla/firefox/nw77o6yc.default/chrome" = { source = ../firefox/chrome; recursive = true; @@ -2296,9 +2301,7 @@ I also use home-manager for managing dotfiles. This means that everything is con source = ../fish/functions; }; - home.file.".config/hypr" = { - source = ../hypr; - }; + home.file.".config/hypr".source = config.lib.file.mkOutOfStoreSymlink ../hypr; home.file.".config/dunst" = { source = ../dunst; @@ -2491,8 +2494,10 @@ I also use home-manager for managing dotfiles. This means that everything is con After = [ "graphical-session.target" ]; # PartOf = [ "plasma-workspace.target" ]; }; - - # Install = { WantedBy = [ "plasma-workspace.target" ]; }; + Service = { + Environment = ["PATH=/etc/profiles/per-user/chris/bin" + "WAYLAND_DISPLAY=wayland-1"]; + }; }; }; diff --git a/eww/eww.scss b/eww/eww.scss index 00dfe6e..044a56f 100644 --- a/eww/eww.scss +++ b/eww/eww.scss @@ -3,7 +3,7 @@ Created by saimoom **/ *{ all: unset; font-family: feather; - font-family: mononoki Nerd Font; + font-family: VictorMono Nerd Font; } $background: rgba(00, 00, 00, 0.7); @@ -20,10 +20,31 @@ $purple: #C574DD; $teal: #79E6F3; $white: #FDFDFD; +$base00: #282a36; +$base01: #34353e; +$base02: #43454f; +$base03: #78787e; +$base04: #a5a5a9; +$base05: #e2e4e5; +$base06: #eff0eb; +$base07: #f1f1f0; +$base08: #ff5c57; +$base09: #ff9f43; +$base0A: #f3f99d; +$base0B: #5af78e; +$base0C: #9aedfe; +$base0D: #57c7ff; +$base0E: #ff6ac1; +$base0F: #b2643c; +$basetransparent: rgba(40, 42, 54, 0.0); +$backtransparent: rgba(40, 42, 54, 0.7); + /** General **/ .bar_class { - background-color: $background; + background-color: $backtransparent; border-radius: 20px 20px 20px 20px; + box-shadow: 2px 2px 5px 5px #101010; + margin: 8px 18px 13px 18px; } .module { margin: 0px 0px 0px 0px; @@ -31,9 +52,12 @@ $white: #FDFDFD; } .side{ - background-color: $background; + background-color: $backtransparent; border-width: 0px; - padding: 0px 30px 0px 30px; + padding: 30px 30px 0px 30px; + border-radius: 20px 20px 20px 20px; + box-shadow: 2px 2px 5px 5px #101010; + margin: 8px 18px 13px 18px; } .center_modules { @@ -43,7 +67,7 @@ $white: #FDFDFD; /** tooltip!! **/ tooltip.background { - background-color: $background; + background-color: $backtransparent; font-size: 18; border-radius: 10px; color: $white; @@ -57,34 +81,34 @@ tooltip label { /** Widgets **/ .clock_time_class, .clock_minute_class { - font-size: 28; + font-size: 16; } .clock_date_class { - font-size: 24; + font-size: 16; margin: 0px 20px 0px -1px; - color: $red; + color: $base08; } .clock_time_class { - color: $white; + color: $base0B; font-weight: bold; margin: 0px 20px 0px 5px; } .notif_button { - font-size: 28; - margin: 0px 20px 0px 0px; - color: $white; + font-size: 18; + margin: 2px 20px 0px 0px; + color: $base05; } .membar { - color: $orange; - background-color: $widget-background; - border-radius: 10px; + color: $base0A; + background-color: $base01; + border-radius: 5px; } .batbar { - color: $purple; + color: $base0E; background-color: $widget-background; - border-radius: 10px; + border-radius: 5px; } .brightbar trough highlight { background-image: linear-gradient(to right, $orange 30%, #f2cdcd 50%, $orange 100% *50); @@ -95,53 +119,54 @@ tooltip label { border-radius: 10px; } .volume_icon { - font-size: 22; - color: $blue; - margin: 0px 10px 0px 10px; + font-size: 18; + color: $base08; + margin: 0px 10px 0px 10px; } .module_essid { font-size: 18; - color: $blue; - margin: 0px 10px 0px 0px; + color: $base0C; + margin: 0px 10px 0px 0px; } .module-wif { - font-size: 22; - color: $blue; - margin: 0px 10px 0px 5px; + font-size: 18; + color: $base0C; + margin: 0px 10px 0px 10px; } .iconlauncher { color: $white; - font-size: 36px; + font-size: 10px; margin: 0px 10px 0px 15px; } + .iconsearch { color: $white; - font-size: 24px; + font-size: 18px; } .iconmem { - color: $orange; + color: $base0A; } .iconbat { - color: $purple; + color: $base0B; } .iconbat, .iconmem { font-size: 15; - margin: 15px; + margin: 10px; } .bright_icon { - font-size: 22; - color: $orange; - margin: 0px 10px 0px 10px; + font-size: 18; + color: $base09; + margin: 0px 10px 0px 10px; } .separ { - color: $grey; + color: $base03; font-weight: bold; - font-size: 22px; + font-size: 24px; margin: 0px 8px 0px 8px; } @@ -151,19 +176,20 @@ tooltip label { .mem_module { background-color: rgba(00, 00, 00, 0.0); - border-radius: 16px; - margin: 0px 10px 0px 3px; + border-radius: 16px; + margin: 0px 10px 0px 3px; } + .bat_module { background-color: rgba(00, 00, 00, 0.0); - border-radius: 16px; - margin: 0px 10px 0px 10px; + border-radius: 16px; + margin: 0px 10px 0px 10px; } .works { - font-size: 28px; + font-size: 22px; font-weight: normal; - margin: 10px 0px 0px 10px; + margin: 2px 0px 0px 20px; background-color: rgba(00, 00, 00, 0.0); } @@ -174,23 +200,23 @@ tooltip label { /* Unoccupied */ .0 { - color: $grey; + color: $base03; } /* Occupied */ .01, .02, .03, .04, .05, .06, .07, .08, .09 { - color: $white; + color: $base05; } /* Focused */ .011, .022, .033, .044, .055, .066, .077, .088, .099{ - color: $purple; + color: $base0D; } // Calendar .cal { - background-color: $background; + background-color: $backtransparent; font-family: mononoki Nerd Font; font-size: 18px; font-weight: normal; @@ -287,43 +313,44 @@ color: $black; .app-name { - color: $blue; - font-size : 20px; - font-weight : bold; - margin : 10px 0px 0px 0px; + color: $base0D; + font-size : 14px; + font-weight : bold; + padding : 4px 0px 0px 0px; } .app-icon { - margin : 8px 10px 0px 0px; + margin : 6px 10px 0px 0px; + } .app-button { - color: $blue; - font-size : 30px; - font-weight : bold; - margin : 0px 15px 0px 15px; + color: $base0D; + font-size : 20px; + font-weight : bold; + margin : 0px 15px 0px 15px; } .launcher-icon { - margin : 5px -5px 10px 15px; + margin : 9px 0px 10px 15px; } .audio-box { background-color: $background; - border-radius: 16px; + border-radius: 16px; } .speaker_icon { - background-size: cover; + 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; + background-position: center; + min-height: 70px; + min-width: 75px; + margin: 10px 20px 5px 20px; + border-radius: 12px; } .speaker_text { - color: $blue; + color: $base0D; font-size : 26px; font-weight : bold; margin: 20px 0px 0px 0px; @@ -441,7 +468,7 @@ font-family: JetBrainsMono Nerd Font Mono; } .label_temp { - color : $blue; + color : $base0D; font-size : 35px; font-weight : bold; margin : 0px 0px 0px 0px; @@ -450,13 +477,13 @@ font-family: JetBrainsMono Nerd Font Mono; } .label_stat { - color : $blue; + color : $base0D; font-size : 38px; font-weight : bold; } .label_quote { - color : $blue; + color : $base0D; font-size : 18px; padding-bottom: 10px; font-weight : normal; @@ -467,10 +494,10 @@ font-family: JetBrainsMono Nerd Font Mono; background-color: $widget-background; padding: 33px 27px 27px 27px; border-radius: 12px; - color: $blue; - font-size : 18px; - font-style : italic; - font-family: Cartograph CF; + color: $base0D; + font-size : 12px; + font-style : italic; + font-family: Cartograph CF; box-shadow: 0px 0px 6px 6px rgb(0, 0, 0, .4);} .stats-box { @@ -482,7 +509,7 @@ font-family: JetBrainsMono Nerd Font Mono; .stats-icon { font-size: 23px; - color: $blue; + color: $base0D; font-family: JetBrainsMono Nerd Font Mono; } @@ -580,59 +607,54 @@ scale trough { } .notification { - all: unset; - background-color: $widget-background; - padding: 20px 25px 20px 17px; + all: unset; + background-color: $base00; + padding: 10px 15px 10px 7px; margin: 0px 15px 0px 15px; - border-radius: 12px; + border-radius: 12px; border-width: 2px; border-style: solid; - border-color: $red;} + border-color: $base09;} .notification-header { - all: unset; - background-color: $widget-background; - padding: 20px 25px 20px 17px; + all: unset; + background-color: $base00; + padding: 10px 15px 10px 7px; margin: 20px 15px 10px 15px; - border-radius: 12px; + border-radius: 12px; border-width: 2px; border-style: solid; - border-color: $green;} + border-color: $base0A;} .notification-icon { color: $white; - font-size: 36px; - margin: 0px 20px 0px 10px; + font-size: 16px; + margin: 0px 10px 0px 0px; } .notification-appname { - font-family: "Inter Nerd Font"; font-size: 14px; font-weight: bold; color: $orange; } .notification-summary { - font-family: "Inter Nerd Font"; font-size: 18px; font-weight: bold; color: $white; } .notification-body { - font-family: "Inter Nerd Font"; font-size: 14px; color: $white; } .notification-label { - font-family: "Mononoki Nerd Font"; font-size: 30px; color: $blue; margin: 0px 50px 0px 0px; } .notification-action { - font-family: "Mononoki Nerd Font"; font-size: 36px; color: $white; margin: 0px 0px 0px 20px; diff --git a/eww/eww.yuck b/eww/eww.yuck index 39f3b37..00713e8 100644 --- a/eww/eww.yuck +++ b/eww/eww.yuck @@ -3,13 +3,13 @@ (include "sidebar.yuck") (include "notifications.yuck") -(defpoll clock_time :interval "5s" "date '+\%l\%M \%p'") +(defpoll clock_time :interval "5s" "date '+\%l:\%M \%p'") (defpoll clock_date :interval "1h" "date '+%b %d, %Y'") (defpoll calendar_day :interval "2h" "date '+%d'") (defpoll calendar_year :interval "2h" "date '+%Y'") -(defpoll volume_percent :interval "1s" "scripts/sbvol --get") -(defpoll mic_percent :interval "3s" "amixer -D pulse sget Capture | grep 'Left:' | awk -F'[][]' '{ print $2 }' | tr -d '%' | head -n 1") -(defpoll brightness_percent :interval "5s" "light") +(defpoll volume_percent :interval "1s" "~/bin/getvol | cut -c 1-2") +(defpoll mic_percent :interval "3s" "pamixer --get-volume --default-source") +(defpoll brightness_percent :interval "5s" "scripts/bright") (defpoll COL_WLAN :interval "1m" "scripts/wifi --COL") (defpoll ESSID_WLAN :interval "1m" "scripts/wifi --ESSID") (defpoll WLAN_ICON :interval "1m" "scripts/wifi --ICON") @@ -26,21 +26,6 @@ ;; widgets -(defwidget launcher [] - (box - :class "launcher_module" - :orientation "h" - (button - :onclick "rofi -no-lazy-grab -show drun -theme ~/.config/hypr/themes/neon/rofi/launcher.rasi &" - (image - :class "launcher-icon" - :path "favicon.ico" - :image-width 36)) - (button - :onclick "rofi -show filebrowser &" - :class "iconsearch" "") - )) - (defwidget workspaces [] (literal :content workspace)) @@ -48,32 +33,32 @@ (defwidget appnames [] (eventbox :onhover "${EWW_CMD} update control_reveal=true" - :onhoverlost "${EWW_CMD} update control_reveal=false" + :onhoverlost "${EWW_CMD} update control_reveal=false" (box - :orientation "h" - :space-evenly "false" - :vexpand "false" - :hexpand "false" - (literal - :content appname) - (revealer - :transition "slideright" - :reveal control_reveal - :duration "350ms" - (box - :vexpand "false" - :hexpand "false" - :orientation "h" - :space-evenly "false" - (button - :class "app-button" - :onclick "hyprctl dispatch togglefloating 1" "") - (button - :class "app-button" - :onclick "hyprctl dispatch fullscreen 1" "") - (button - :class "app-button" - :onclick "hyprctl dispatch killactive 1" "")))))) + :orientation "h" + :space-evenly "false" + :vexpand "false" + :hexpand "false" + (literal + :content appname) + (revealer + :transition "slideright" + :reveal control_reveal + :duration "250ms" + (box + :vexpand "false" + :hexpand "false" + :orientation "h" + :space-evenly "false" + (button + :class "app-button" + :onclick "hyprctl dispatch togglefloating 1" "") + (button + :class "app-button" + :onclick "hyprctl dispatch fullscreen 1" "") + (button + :class "app-button" + :onclick "hyprctl dispatch killactive 1" "")))))) (defwidget bright [] (eventbox @@ -86,15 +71,15 @@ :spacing "3" (revealer :transition "slideright" - :reveal br_reveal - :duration "350ms" + :reveal br_reveal + :duration "250ms" (scale :class "brightbar" - :value brightness_percent - :orientation "h" - :tooltip "${brightness_percent}%" - :max 100 - :min 0 - :onchange "light -S {}" )) + :value brightness_percent + :orientation "h" + :tooltip "${brightness_percent}%" + :max 100 + :min 0 + :onchange "brightnessctl s {}%" )) (label :text "" :class "bright_icon" @@ -111,41 +96,40 @@ :spacing "3" (revealer :transition "slideright" - :reveal vol_reveal - :duration "350ms" + :reveal vol_reveal + :duration "250ms" (scale - :class "volbar" - :value volume_percent - :orientation "h" - :tooltip "${volume_percent}%" - :max 100 - :min 0 - :onchange "amixer -D pulse sset Master {}%" )) + :class "volbar" + :value volume_percent + :orientation "h" + :tooltip "${volume_percent}%" + :max 100 + :min 0 + :onchange "pamixer --set-volume {}" )) (button - :onclick "scripts/pop audio_ctl" - :class "volume_icon" - "墳")))) + :onclick "scripts/pop audio" + :class "volume_icon" + "墳")))) (defwidget wifi [] (eventbox :onhover "${EWW_CMD} update wifi_rev=true" - :onhoverlost "${EWW_CMD} update wifi_rev=false" - (box - :vexpand "false" - :hexpand "false" - :space-evenly "false" - (revealer - :transition "slideright" - :reveal wifi_rev - :duration "350ms" - (label - :class "module_essid" - :text ESSID_WLAN - )) - (button - :class "module-wif" - :onclick "networkmanager_dmenu" - WLAN_ICON)))) + :onhoverlost "${EWW_CMD} update wifi_rev=false" + (box + :vexpand "false" + :hexpand "false" + :space-evenly "false" + (revealer + :transition "slideright" + :reveal wifi_rev + :duration "250ms" + (label + :class "module_essid" + :text ESSID_WLAN)) + (button + :class "module-wif" + :onclick "networkmanager_dmenu" + WLAN_ICON)))) (defwidget bat [] (box @@ -153,13 +137,13 @@ :vexpand "false" :hexpand "false" (circular-progress - :value {EWW_BATTERY["BAT0"].capacity} + :value {EWW_BATTERY["BAT1"].capacity} :class "batbar" :thickness 4 (button :onclick "scripts/pop system" :class "iconbat" - :tooltip "battery on ${EWW_BATTERY["BAT0"].capacity}%" + :tooltip "${EWW_BATTERY["BAT1"].capacity}% battery left" " ")))) (defwidget mem [] @@ -191,7 +175,7 @@ :class "clock_time_class" ) (revealer :transition "slideleft" :reveal time_rev - :duration "350ms" + :duration "250ms" (button :class "clock_date_class" :onclick "scripts/pop calendar" clock_date))))) @@ -202,7 +186,7 @@ :space-evenly "false" :orientation "h" (button - :onclick "if ${EWW_CMD} state | grep 'rightside: false' ; then ${EWW_CMD} update rightside=true ; else ${EWW_CMD} update rightside=false ; fi" + :onclick "if ${EWW_CMD} state | grep 'rightside: false' ; then ${EWW_CMD} update rightside=true ; else ${EWW_CMD} update rightside=false ; fi" (label :text "")))) @@ -230,8 +214,6 @@ :space-evenly false :halign "start" :class "left_modules" - (launcher) - (sep) (workspaces))) (defwidget center [] (box @@ -242,20 +224,19 @@ (appnames))) (defwidget right [] (box - :orientation "h" - :space-evenly false - :halign "end" - :class "right_modules" - (bright) - (volume) - (wifi) - (sep) - (bat) - (mem) - (sep) - (clock_module) - (notif_button) -)) + :orientation "h" + :space-evenly false + :halign "end" + :class "right_modules" + (bright) + (volume) + (wifi) + (sep) + (bat) + (mem) + (sep) + (clock_module) + (notif_button))) (defwidget bar_layout [] (centerbox @@ -270,9 +251,9 @@ :exclusive true :geometry (geometry :x "15px" - :y "10px" - :width "98%" - :height "20px" + :y "3px" + :width "100%" + :height "0px" :anchor "bottom center") :stacking "fg" :windowtype "dock" @@ -336,11 +317,11 @@ :hexpand "false" (scale :value volume_percent - :orientation "h" - :onchange "amixer -D pulse sset Master {}%" - :tooltip "volume on ${volume_percent}%" - :max 100 - :min 0)))) + :orientation "h" + :onchange "amixer -D pulse sset Master {}%" + :tooltip "volume on ${volume_percent}%" + :max 100 + :min 0)))) (label :text "_____________________________________" :class "audio_sep" @@ -403,7 +384,7 @@ :orientation "h" :space-evenly "false" (circular-progress - :value {EWW_BATTERY["BAT0"].capacity} + :value {EWW_BATTERY["BAT1"].capacity} :class "sys_bat" :thickness 9 (label :text "" @@ -423,12 +404,12 @@ :limit-width 9 :wrap false) (label - :text "${EWW_BATTERY["BAT0"].capacity}%" + :text "${EWW_BATTERY["BAT1"].capacity}%" :halign "start" :class "sys_text_bat_sub" :limit-width 22 :wrap false) - (label :text "${EWW_BATTERY["BAT0"].status}" + (label :text "${EWW_BATTERY["BAT1"].status}" :halign "start" :class "sys_text_bat_sub" :limit-width 22 @@ -481,13 +462,12 @@ :focusable "false" :screen 1 :monitor 0 - :geometry - (geometry - :x "20" - :y "7%" - :anchor "top right" - :width "290px" - :height "120px") + :geometry (geometry + :x "20" + :y "0" + :anchor "bottom right" + :width "290px" + :height "120px") (system)) @@ -498,19 +478,19 @@ :class "cal" :orientation "v" (box - :class "cal-in" - (calendar - :day calendar_day - :year calendar_year)))) + :class "cal-in" + (calendar + :day calendar_day + :year calendar_year)))) (defwindow calendar :stacking "fg" :focusable "false" :screen 1 :monitor 0 - :geometry (geometry - :x "20" - :y "7%" - :anchor "top right" - :width "270px" - :height "60px") -(cal)) + :geometry (geometry + :x "20" + :y "0" + :anchor "bottom right" + :width "270px" + :height "60px") + (cal)) diff --git a/eww/favicon.ico b/eww/favicon.ico new file mode 100644 index 0000000..5fd2a00 Binary files /dev/null and b/eww/favicon.ico differ diff --git a/eww/notifications.yuck b/eww/notifications.yuck index 8feca7f..0395f1f 100644 --- a/eww/notifications.yuck +++ b/eww/notifications.yuck @@ -2,7 +2,7 @@ :geometry (geometry :x "0px" :y "0px" :width "1px" - :height "93%" + :height "63%" :anchor "bottom right") :stacking "fg" :monitor "0" @@ -15,7 +15,7 @@ (revealer :transition "slideleft" :reveal rightside - :duration "550ms" + :duration "250ms" (rightside)))) (defvar rightside false) @@ -53,7 +53,7 @@ (scroll :vscroll "true" :hscroll "false" - :height 840 + :height 740 :width 200 (literal :content notifications) diff --git a/eww/scripts/appname b/eww/scripts/appname new file mode 100755 index 0000000..bb28cc8 --- /dev/null +++ b/eww/scripts/appname @@ -0,0 +1,37 @@ +#!/usr/bin/env bash + +#define icons for workspaces 1-9 +#icontheme=$(geticons -U) +icontheme=$(grep "gtk-icon-theme-name" "$HOME"/.config/gtk-3.0/settings.ini | cut --delimiter="=" -f 2) + +workspaces() { +if [[ ${1:0:12} == "activewindow" ]]; then #set focused workspace + string=${1:14} + class="${string/,*/}" + export title=${string/,/, } + [[ $title == ", " ]] && unset title + export iconpath=$(geticons "$class" -s 16 -c 1 -t "$icontheme" | head -n 1) +fi +} + +module() { +#output eww widget +echo "(box \ + :orientation \"h\" \ + :halign \"start\" \ + :space-evenly false \ + (image \ + :class \"app-icon\" \ + :path \"$iconpath\" \ + :image-width \"18\") \ + (label \ + :class \"app-name\" \ + :limit-width \"35\" \ + :text \"$title\" \ + :tooltip \"$title\"))" +} + +socat -u UNIX-CONNECT:/tmp/hypr/"$HYPRLAND_INSTANCE_SIGNATURE"/.socket2.sock - | while read -r event; do +workspaces "$event" +module +done diff --git a/eww/scripts/bright b/eww/scripts/bright new file mode 100755 index 0000000..d621dbb --- /dev/null +++ b/eww/scripts/bright @@ -0,0 +1,3 @@ +#!/bin/sh + +brightnessctl | rg Current | awk '{print $4}' | sed 's/(\(.*\)%)/\1/' diff --git a/eww/scripts/notifications b/eww/scripts/notifications new file mode 100755 index 0000000..1478a6c --- /dev/null +++ b/eww/scripts/notifications @@ -0,0 +1,55 @@ +#!/usr/bin/env bash + +tmp=/tmp/dunst-history.json + +notif() { +export ids=($(dunstctl history | jq '.data[] | .[].id.data')) + +printf "\n (box \ + :orientation \"v\" \ + :space-evenly \"false\" \ + :spacing \"20\" \ + :halign \"start\" " + +for id in "${ids[@]}"; do + mapfile -t notif < <(jq -r ".data[] | .[] | select(.id.data == $id) | .appname.data, .icon_path.data, .summary.data, .body.data" "$tmp" | sed -r '/^\s*$/d' | sed -e 's/\%/ percent/g') + printf "(eventbox :onclick \"dunstctl history-pop $id && dunstctl action 0 && dunstctl close\" \ + (box \ + :class \"notification\" \ + :orientation \"h\" \ + :width 300 \ + :space-evenly \"false\" \ + (image \ + :class \"notification-icon\" \ + :path \"${notif[1]}\" \ + :image-height 50 \ + :image-width 100) \ + (box \ + :orientation \"v\" \ + :space-evenly \"false\" \ + :valign \"left\" \ + :width 300 \ + :spacing 10 \ + (label \ + :xalign 0 \ + :wrap "true" \ + :class \"notification-appname\" \ + :text \"${notif[0]}\") \ + (label \ + :xalign 0 \ + :wrap "true" \ + :class \"notification-summary\" \ + :text \"${notif[2]}\") \ + (label \ + :xalign 0 \ + :wrap "true" \ + :class \"notification-body\" \ + :text \"${notif[3]}\"))))" +done +printf ") \n" +} + +notif +tail --follow $tmp 2> /dev/null | grep --line-buffered "aa{sv}" | while read -r; do +notif +done diff --git a/eww/scripts/pop b/eww/scripts/pop index aef82e8..4f7f352 100755 --- a/eww/scripts/pop +++ b/eww/scripts/pop @@ -1,20 +1,20 @@ -#!/bin/bash +#!/usr/bin/env 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 + eww open calendar } # Open widgets if [[ ! -f "$LOCK_FILE" ]]; then - ${EWW_BIN} -c $HOME/.config/eww/bar close system music_win audio_ctl + eww close system music_win audio_ctl touch "$LOCK_FILE" run && echo "ok good!" else - ${EWW_BIN} -c $HOME/.config/eww/bar close calendar + eww close calendar rm "$LOCK_FILE" && echo "closed" fi } @@ -25,16 +25,16 @@ 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 + eww open system } # Open widgets if [[ ! -f "$LOCK_FILE_MEM" ]]; then - ${EWW_BIN} -c $HOME/.config/eww/bar close calendar music_win audio_ctl + eww close calendar music_win audio_ctl touch "$LOCK_FILE_MEM" run && echo "ok good!" else - ${EWW_BIN} -c $HOME/.config/eww/bar close system + eww close system rm "$LOCK_FILE_MEM" && echo "closed" fi } @@ -45,16 +45,16 @@ 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 + eww open music_win } # Open widgets if [[ ! -f "$LOCK_FILE_SONG" ]]; then - ${EWW_BIN} -c $HOME/.config/eww/bar close system calendar + eww close system calendar touch "$LOCK_FILE_SONG" run && echo "ok good!" else - ${EWW_BIN} -c $HOME/.config/eww/bar close music_win + eww close music_win rm "$LOCK_FILE_SONG" && echo "closed" fi } @@ -66,16 +66,16 @@ 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 + eww open audio_ctl } # Open widgets if [[ ! -f "$LOCK_FILE_AUDIO" ]]; then - ${EWW_BIN} -c $HOME/.config/eww/bar close system calendar music + eww close system calendar music touch "$LOCK_FILE_AUDIO" run && echo "ok good!" else - ${EWW_BIN} -c $HOME/.config/eww/bar close audio_ctl + eww close audio_ctl rm "$LOCK_FILE_AUDIO" && echo "closed" fi } diff --git a/eww/scripts/wifi b/eww/scripts/wifi index 5d7cc59..f44045a 100755 --- a/eww/scripts/wifi +++ b/eww/scripts/wifi @@ -1,26 +1,22 @@ -#!/bin/bash +#!/bin/sh status=$(nmcli g | grep -oE "disconnected") -essid=$(nmcli c | grep wlp2s0 | awk '{print ($1)}') +essid=$(nmcli -t -f active,ssid dev wifi | grep '^yes' | cut -d: -f2) if [ $status ] ; then - icon="" + icon="睊" text="" col="#575268" else - icon="" + 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 - +case $1 in + --COL) echo $col;; + --ESSID) echo $text;; + --ICON) echo $icon;; +esac diff --git a/eww/scripts/workspace b/eww/scripts/workspace index f202ef1..40a2578 100755 --- a/eww/scripts/workspace +++ b/eww/scripts/workspace @@ -1,56 +1,72 @@ -#!/bin/sh -workspaces() { +#!/usr/bin/env bash -ws1="1" -ws2="2" -ws3="3" -ws4="4" -ws5="5" -ws6="6" +#define icons for workspaces 1-9 +ic=(0     輸  " " " " ) -# 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 +#initial check for occupied workspaces +for num in $(hyprctl workspaces | grep ID | awk '{print $3}'); do + export o"$num"="$num" +done + +#initial check for focused workspace +for num in $(hyprctl monitors | grep -B 4 "focused: yes" | awk 'NR==1{print $3}'); do + export f"$num"="$num" + export fnum=f"$num" + export mon=$(hyprctl monitors | grep -B 2 "\($num\)" | awk 'NR==1{print $2}') +done + +workspaces() { +if [[ ${1:0:9} == "workspace" ]] && [[ ${1:11} != "special" ]]; then #set focused workspace + unset -v "$fnum" + num=${1:11} + export f"$num"="$num" + export fnum=f"$num" + +elif [[ ${1:0:10} == "focusedmon" ]]; then #set focused workspace following monitor focus change + unset -v "$fnum" + string=${1:12} + num=${string##*,} + export mon=${string/,*/} + export f"$num"="$num" + export fnum=f"$num" + +elif [[ ${1:0:13} == "moveworkspace" ]] && [[ ${1##*,} == "$mon" ]]; then #Set focused workspace following swapactiveworkspace + unset -v "$fnum" + string=${1:15} + num=${string/,*/} + export f"$num"="$num" + export fnum=f"$num" + +elif [[ ${1:0:15} == "createworkspace" ]]; then #set Occupied workspace + num=${1:17} + export o"$num"="$num" + export onum=o"$num" + +elif [[ ${1:0:16} == "destroyworkspace" ]]; then #unset unoccupied workspace + num=${1:18} + unset -v o"$num" +fi +} +module() { +#output eww widget +echo "(eventbox :onscroll \"echo {} | sed -e 's/up/-1/g' -e 's/down/+1/g' | xargs hyprctl dispatch workspace\" \ + (box :class \"works\" :orientation \"h\" :spacing 5 :space-evenly \"false\" :valign \"center\" \ + (button :onclick \"hyprctl dispatch exec \'~/.config/hypr/themes/neon/scripts/workspace 1\'\" :onrightclick \"hyprctl dispatch workspace 1 && $HOME/.config/hypr/themes/neon/scripts/default_app\" :class \"0$o1$f1\" \"${ic[1]}\") \ + (button :onclick \"hyprctl dispatch exec \'~/.config/hypr/themes/neon/scripts/workspace 2\'\" :onrightclick \"hyprctl dispatch workspace 2 && $HOME/.config/hypr/themes/neon/scripts/default_app\" :class \"0$o2$f2\" \"${ic[2]}\") \ + (button :onclick \"hyprctl dispatch exec \'~/.config/hypr/themes/neon/scripts/workspace 3\'\" :onrightclick \"hyprctl dispatch workspace 3 && $HOME/.config/hypr/themes/neon/scripts/default_app\" :class \"0$o3$f3\" \"${ic[3]}\") \ + (button :onclick \"hyprctl dispatch exec \'~/.config/hypr/themes/neon/scripts/workspace 4\'\" :onrightclick \"hyprctl dispatch workspace 4 && $HOME/.config/hypr/themes/neon/scripts/default_app\" :class \"0$o4$f4\" \"${ic[4]}\") \ + (button :onclick \"hyprctl dispatch exec \'~/.config/hypr/themes/neon/scripts/workspace 5\'\" :onrightclick \"hyprctl dispatch workspace 5 && $HOME/.config/hypr/themes/neon/scripts/default_app\" :class \"0$o5$f5\" \"${ic[5]}\") \ + (button :onclick \"hyprctl dispatch exec \'~/.config/hypr/themes/neon/scripts/workspace 6\'\" :onrightclick \"hyprctl dispatch workspace 6 && $HOME/.config/hypr/themes/neon/scripts/default_app\" :class \"0$o6$f6\" \"${ic[6]}\") \ + (button :onclick \"hyprctl dispatch exec \'~/.config/hypr/themes/neon/scripts/workspace 7\'\" :onrightclick \"hyprctl dispatch workspace 7 && $HOME/.config/hypr/themes/neon/scripts/default_app\" :class \"0$o7$f7\" \"${ic[7]}\") \ + (button :onclick \"hyprctl dispatch exec \'~/.config/hypr/themes/neon/scripts/workspace 8\'\" :onrightclick \"hyprctl dispatch workspace 8 && $HOME/.config/hypr/themes/neon/scripts/default_app\" :class \"0$o8$f8\" \"${ic[8]}\") \ + (button :onclick \"hyprctl dispatch exec \'~/.config/hypr/themes/neon/scripts/workspace 9\'\" :onrightclick \"hyprctl dispatch workspace 9 && $HOME/.config/hypr/themes/neon/scripts/default_app\" :class \"0$o9$f9\" \"${ic[9]}\") \ + )\ + )" +} + +module + +socat -u UNIX-CONNECT:/tmp/hypr/"$HYPRLAND_INSTANCE_SIGNATURE"/.socket2.sock - | while read -r event; do +workspaces "$event" +module done diff --git a/eww/sidebar.yuck b/eww/sidebar.yuck index 658c264..2ad3cac 100644 --- a/eww/sidebar.yuck +++ b/eww/sidebar.yuck @@ -1,8 +1,8 @@ (defwindow sidebar :geometry (geometry :x "0px" - :y "0px" + :y "10px" :width "1px" - :height "1024" + :height "724" :anchor "bottom left") :stacking "fg" :monitor "0" @@ -10,14 +10,16 @@ (defwidget sidebar [] (eventbox - :halign "start" - :onhover "${EWW_CMD} update side=true" - :onhoverlost "${EWW_CMD} update side=false" - (revealer - :transition "slideright" - :reveal side - :duration "550ms" - (side)))) + :class "side_class" + :halign "start" + :onhover "${EWW_CMD} update side=true" + :onhoverlost "${EWW_CMD} update side=false" + (revealer + :transition "slideright" + :reveal side + :duration "250ms" + (side)))) + (defvar side false) ;; background @@ -30,7 +32,6 @@ :halign "start" (fetch) (top) - (music-side) (system-side) (tray)) ) @@ -41,53 +42,9 @@ :space-evenly "false" :spacing "30" :halign "center" - (date) - (weather)) + (date)) ) -;; Music Widgets -(defwidget music-side [] - (box - :class "music-player" - :orientation "h" - :space-evenly "false" - :spacing 15 - :halign "center" - :valign "start" - :hexpand "true" - :width "" - (box - :class "album_art" - :style "background-image: url('${art}');") - (box - :orientation "v" - :space-evenly "false" - :valign "center" - :halign "center" - :spacing 10 - (label - :class "song" - :limit-width 15 - :text title) - (label - :class "artist" - :limit-width 15 - :text artist) - (box - :orientation "h" - :space-evenly "false" - :valign "center" - :halign "center" - :spacing 25 - (button :class "btn_prev" :onclick "scripts/music previous" "玲") - (button :class "btn_play" :onclick "scripts/music toggle" playpause) - (button :class "btn_next" :onclick "scripts/music next" "怜"))))) - -(defpoll art :interval "1s" "scripts/music coverloc") -(defpoll title :interval "1s" "scripts/music title") -(defpoll artist :interval "1s" "scripts/music artist") -(defpoll playpause :interval "1s" "scripts/music statusicon") - ;; weather (defwidget weather [] (box @@ -187,22 +144,22 @@ :value {(EWW_DISK["/"].used / EWW_DISK["/"].total) * 100} :class "scale" :width 280)) - (box - :class "stats" - :hexpand "false" - :vexpand "false" - :space-evenly "false" - (label - :tooltip "${gpu}%" - :class "stats-icon" - :text "調") - (scale - :min 0 - :max 101 - :active false - :value gpu - :class "scale" - :width 280)) + ;; (box + ;; :class "stats" + ;; :hexpand "false" + ;; :vexpand "false" + ;; :space-evenly "false" + ;; (label + ;; :tooltip "${gpu}%" + ;; :class "stats-icon" + ;; :text "調") + ;; (scale + ;; :min 0 + ;; :max 101 + ;; :active false + ;; :value gpu + ;; :class "scale" + ;; :width 280)) (box :class "stats" :hexpand "false" @@ -220,7 +177,7 @@ :value volume_percent :class "scale" :width 280 - :onchange "amixer sset Master {}%") + :onchange "pamixer --set-volume {}") ))) (deflisten gpu "scripts/gpu") @@ -237,17 +194,17 @@ :class "poweroff" :halign "center" :tooltip "Shut Down" - :onclick "kitty poweroff &" "⏻") + :onclick "alacritty poweroff &" "⏻") (button :class "reboot" :halign "center" :tooltip "Reboot" - :onclick "kitty reboot &" "") + :onclick "alacritty reboot &" "") (button :class "firmware" :halign "center" :tooltip "Reboot to EFI" - :onclick "kitty systemctl reboot --firmware &" "拉") + :onclick "alacritty systemctl reboot --firmware &" "拉") (button :class "exit" :halign "center" @@ -257,9 +214,9 @@ :class "restart" :halign "center" :tooltip "edit Config" - :onclick "footclient nvim ~/.config/hypr/hyprland.conf &" ""))) + :onclick "emacsclient ~/.config/hypr/hyprland.conf &" ""))) -(defpoll uptime :interval "1m" "uptime -p | sed -e 's/up //;s/ hours,/h/;s/ minutes/m/'") +(defpoll uptime :interval "1m" "uptime | awk '{print $3}' | sed 's/,//;s/\(.*\):\(.*\)/\1 h \2 m/") (defpoll packages :interval "5m" `pacman -Q | wc -l`) (defpoll kernal :interval "5m" `uname -r`) (defpoll name :interval "5m" `whoami`) @@ -286,10 +243,10 @@ :class "uptime" :halign "start" :text " : ${uptime}") - (label - :class "packages" - :halign "start" - :text " : ${packages}") + ;; (label + ;; :class "packages" + ;; :halign "start" + ;; :text " : ${packages}") (label :class "kernal" :halign "start" diff --git a/hypr/hyprland.conf b/hypr/hyprland.conf index 832a831..ff985d0 100644 --- a/hypr/hyprland.conf +++ b/hypr/hyprland.conf @@ -89,19 +89,16 @@ misc:disable_autoreload = true # example window rules # for windows named/classed as abc and xyz -#windowrule=move 69 420,abc -#windowrule=size 420 69,abc -#windowrule=tile,xyz -#windowrule=float,abc -#windowrule=pseudo,abc windowrule=opaque,firefox windowrule=float,dolphin +windowrule=float,mpv windowrule=size 90% 76%,mpv windowrule=center,mpv windowrule=float,pulsemixer -windowrule=workspace special,mpv windowrule=workspace 1,firefox windowrule=workspace 2,emacs +windowrule=float,btop +windowrule=size 60% 60%,btop # example binds bind=SUPER,RETURN,exec,alacritty @@ -110,10 +107,13 @@ bind=SUPERSHIFT,Q,exit, bind=SUPERSHIFT,D,exec,dolphin bind=SUPERSHIFT,F,togglefloating, bindr=SUPER,Super_L,exec,/home/chris/bin/launcher.sh -bindr=SUPERALT,Alt_L,exec,/home/chris/bin/windows.sh +bindr=ALT,Alt_L,exec,/home/chris/bin/window.sh +bind=SUPER,w,exec,/home/chris/bin/window.sh bind=SUPER,E,exec,/home/chris/bin/emacslof +bind=SUPER,d,exec,emacsclient -c -e '(dired-jump)' bind=SUPER,B,exec,/home/chris/bin/fflof bind=SUPER,A,exec,alacritty --class pulsemixer -e pulsemixer +bind=SUPERCTRL,/,exec,alacritty --class btop -e btop bind=SUPER,P,exec,/home/chris/bin/rbw.sh bind=SUPER,M,fullscreen,1 @@ -168,6 +168,9 @@ binde=, XF86AudioMute, exec, pamixer -t binde=, XF86MonBrightnessUp, exec, brightnessctl s +10% binde=, XF86MonBrightnessDown, exec, brightnessctl s 10%- +bind=SUPERCTRL,b,exec,eww.sh +bind=SUPERALT,n,exec,eww update rightside=true + bindm=SUPER,mouse:272,movewindow bindm=SUPER,mouse:273,resizewindow diff --git a/scripts/getvol b/scripts/getvol index e1d5718..85493ed 100755 --- a/scripts/getvol +++ b/scripts/getvol @@ -1,4 +1,5 @@ #!/bin/sh echo $(pamixer --get-volume-human) >> /tmp/vol +echo $(pamixer --get-volume-human) diff --git a/scripts/window.sh b/scripts/window.sh index 355b629..f465423 100755 --- a/scripts/window.sh +++ b/scripts/window.sh @@ -4,8 +4,6 @@ list_windows() ( wlrctl window list ) -window=$(list_windows | rofi -sync -dmenu -p "select window..." -theme ~/.config/rofi/launchers-git/laptop-rbw.rasi | awk '{print $1}' | sed 's/://') - -echo $window +window=$(list_windows | rofi -i -sync -dmenu -p " " -theme ~/.config/rofi/launchers-git/laptop-rbw.rasi | awk '{print $1}' | sed 's/://') wlrctl window focus $window diff --git a/system/kaladin/configuration.nix b/system/kaladin/configuration.nix index e936b8b..cb3a93a 100644 --- a/system/kaladin/configuration.nix +++ b/system/kaladin/configuration.nix @@ -95,7 +95,7 @@ displayManager = { startx.enable = true; sddm = { - enable = true; + enable = false; }; session = [ { @@ -242,6 +242,7 @@ jq ripgrep fd + socat ffmpeg-full imagemagick libheif @@ -296,6 +297,7 @@ rofi-wayland wofi waybar + tridactyl-native eww-wayland wlrctl hyprpaper @@ -462,6 +464,7 @@ no-littering tree-sitter tree-sitter-langs + rustic evil evil-collection general diff --git a/system/syl/configuration.nix b/system/syl/configuration.nix index 772af97..089b950 100644 --- a/system/syl/configuration.nix +++ b/system/syl/configuration.nix @@ -88,7 +88,7 @@ displayManager = { startx.enable = true; sddm = { - enable = true; + enable = false; }; session = [ { @@ -261,6 +261,7 @@ jq ripgrep fd + socat ffmpeg-full imagemagick libheif @@ -315,6 +316,7 @@ rofi-wayland wofi waybar + tridactyl-native eww-wayland wlrctl hyprpaper @@ -448,6 +450,7 @@ no-littering tree-sitter tree-sitter-langs + rustic evil evil-collection general diff --git a/user/home.nix b/user/home.nix index 05740da..214e833 100644 --- a/user/home.nix +++ b/user/home.nix @@ -316,6 +316,8 @@ }; }; + home.file.".mozilla/native-messaging-hosts".source = "/run/current-system/sw/lib/mozilla/native-messaging-hosts"; + home.file.".mozilla/firefox/nw77o6yc.default/chrome" = { source = ../firefox/chrome; recursive = true; @@ -340,9 +342,7 @@ source = ../fish/functions; }; - home.file.".config/hypr" = { - source = ../hypr; - }; + home.file.".config/hypr".source = config.lib.file.mkOutOfStoreSymlink ../hypr; home.file.".config/dunst" = { source = ../dunst; @@ -535,8 +535,10 @@ After = [ "graphical-session.target" ]; # PartOf = [ "plasma-workspace.target" ]; }; - - # Install = { WantedBy = [ "plasma-workspace.target" ]; }; + Service = { + Environment = ["PATH=/etc/profiles/per-user/chris/bin" + "WAYLAND_DISPLAY=wayland-1"]; + }; }; };