From 5a834ec5a3dfddf5eaff17974cd8f37dc165ede6 Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Sun, 5 Feb 2023 07:09:48 -0600 Subject: [PATCH] alot of messing with what I like for a desktop --- alacritty/alacritty-btop.yml | 9 ++ alacritty/alacritty.yml | 2 +- awesome/rules.fnl | 2 +- eww/eww.scss | 53 ++++++++-- eww/eww.yuck | 179 ++++++++++++++++++++++----------- eww/scripts/appname | 3 +- eww/scripts/workspace | 2 +- hypr/hyprland.conf | 18 ++-- hypr/scripts/dynamic-float.sh | 9 ++ modules/desktop.nix | 4 +- modules/emacs.nix | 6 +- rofi/launchers-git/launcher.sh | 1 + scripts/emacslof | 2 +- user/home.nix | 2 +- 14 files changed, 204 insertions(+), 88 deletions(-) create mode 100644 alacritty/alacritty-btop.yml create mode 100755 hypr/scripts/dynamic-float.sh diff --git a/alacritty/alacritty-btop.yml b/alacritty/alacritty-btop.yml new file mode 100644 index 0000000..6412398 --- /dev/null +++ b/alacritty/alacritty-btop.yml @@ -0,0 +1,9 @@ +window: + # Window dimensions (changes require restart) + # + # Specified in number of columns/lines, not pixels. + # If both are `0`, this setting is ignored. + dimensions: + columns: 200 + lines: 150 + opacity: 1.0 diff --git a/alacritty/alacritty.yml b/alacritty/alacritty.yml index e6d8247..5dd0003 100644 --- a/alacritty/alacritty.yml +++ b/alacritty/alacritty.yml @@ -20,7 +20,7 @@ window: #dimensions: # columns: 0 # lines: 0 - opacity: 0.80 + opacity: 0.90 dynamic_title: true # Window position (changes require restart) diff --git a/awesome/rules.fnl b/awesome/rules.fnl index 41060c1..611a3f1 100644 --- a/awesome/rules.fnl +++ b/awesome/rules.fnl @@ -41,7 +41,7 @@ :floating true :raise true ;; :height (dpi 1200) - :width (dpi 1950) + :width (dpi 1400) :screen 1 :sticky true :placement awful.placement.centered diff --git a/eww/eww.scss b/eww/eww.scss index 8d9c390..84850a2 100644 --- a/eww/eww.scss +++ b/eww/eww.scss @@ -44,7 +44,7 @@ $darktransparent: rgba(40, 42, 54, 0.97); .bar_class { background-color: $backtransparent; border-radius: 20px 20px 20px 20px; - box-shadow: 2px 2px 5px 5px #101010; + box-shadow: 5px 5px 4px 4px #202020; margin: 8px 18px 13px 18px; } .module { @@ -121,31 +121,56 @@ tooltip label { border-radius: 10px; } .brightbar { - margin-bottom: 2px; + color: $base09; + background-color: $widget-background; + border-radius: 5px; } + +.bright_label { + color: $base09; +} + +.bright_icon { + font-size: 18; + color: $base09; + margin: 0px 15px 0px 3px; +} + .volbar trough highlight { background-color: $base08; border-radius: 10px; } -.volbar { - margin-bottom: 2px; + +.vol_module, .bright_module { + background-color: rgba(00, 00, 00, 0.0); + margin: 0px 3px 0px 5px; } + +.volbar { + color: $base08; + background-color: $widget-background; + border-radius: 5px; +} + +.vol_label { + color: $base08; +} + .volume_icon { font-size: 18; color: $base08; margin: 0px 15px 0px 3px; } - .module_essid { font-size: 18; - color: $base0C; + // color: $base0C; margin: 0px 10px 0px 0px; } -.module-wif { +.module-wifi { font-size: 18; - color: $base0C; - margin: 0px 10px 0px 10px; + // color: $base0C; + margin: 0px 25px 0px 0px; } .iconlauncher { @@ -170,7 +195,13 @@ tooltip label { color: $base0D; margin: 8px 11px 8px 8px; } -.iconbat, .iconmem, .iconcpu { +.iconvol { + margin: 10px 11px 8px 8px; +} +.iconbright { + margin: 10px 14px 10px 8px; +} +.iconbat, .iconmem, .iconcpu .iconvol .iconbright { font-size: 12; } .mem_label { @@ -221,7 +252,7 @@ tooltip label { .works { font-size: 22px; font-weight: normal; - margin: 2px 0px 0px 20px; + margin: 7px 0px 0px 20px; background-color: rgba(00, 00, 00, 0.0); } diff --git a/eww/eww.yuck b/eww/eww.yuck index db4f6c7..4af8de6 100644 --- a/eww/eww.yuck +++ b/eww/eww.yuck @@ -31,8 +31,36 @@ ;; widgets (defwidget workspaces [] - (literal - :content workspace)) + (literal + :content workspace)) + +;; (defwidget workspaces [] +;; (box +;; :class "works" +;; :orientation "h" +;; :spacing 5 +;; :space-evenly "false" +;; :valign "center" +;; (button +;; :onclick "hyprctl dispatch workspace 1" +;; :onrightclick "hyprctl dispatch workspace 1 && $HOME/.config/hypr/themes/neon/scripts/default_app" +;; :class "0$o1$f1" "") +;; (button +;; :onclick "hyprctl dispatch workspace 2" +;; :onrightclick "hyprctl dispatch workspace 2 && $HOME/.config/hypr/themes/neon/scripts/default_app" +;; :class "0$o2$f2" "") +;; (button +;; :onclick "hyprctl dispatch workspace 3" +;; :onrightclick "hyprctl dispatch workspace 3 && $HOME/.config/hypr/themes/neon/scripts/default_app" +;; :class "0$o3$f3" "") +;; (button +;; :onclick "hyprctl dispatch workspace 4" +;; :onrightclick "hyprctl dispatch workspace 4 && $HOME/.config/hypr/themes/neon/scripts/default_app" +;; :class "0$o4$f4" "") +;; (button +;; :onclick "hyprctl dispatch workspace 5" +;; :onrightclick "hyprctl dispatch workspace 5 && $HOME/.config/hypr/themes/neon/scripts/default_app" +;; :class "0$o5$f5" ""))) (defwidget appnames [] (eventbox @@ -64,57 +92,58 @@ :class "app-button" :onclick "hyprctl dispatch killactive 1" "")))))) -(defwidget bright [] - (eventbox - :onhover "${EWW_CMD} update br_reveal=true" - :onhoverlost "${EWW_CMD} update br_reveal=false" - :visible {HOST == "kaladin" ? "false" : "true"} - (box - :class "module" - :space-evenly "false" - :orientation "h" - :spacing "3" - (scale - :class "brightbar" - :value brightness_percent - :orientation "h" - :tooltip "${brightness_percent}%" - :max 100 - :min 0 - :onchange "brightnessctl s {}%" ) - (label - :text "" - :class "bright_icon" - :tooltip "brightness")))) +;; (defwidget bright [] +;; (eventbox +;; :onhover "${EWW_CMD} update br_reveal=true" +;; :onhoverlost "${EWW_CMD} update br_reveal=false" +;; :visible {HOST == "kaladin" ? "false" : "true"} +;; (box +;; :class "module" +;; :space-evenly "false" +;; :orientation "h" +;; :spacing "3" +;; (scale +;; :class "brightbar" +;; :value brightness_percent +;; :orientation "h" +;; :tooltip "${brightness_percent}%" +;; :max 100 +;; :min 0 +;; :onchange "brightnessctl s {}%" ) +;; (label +;; :text "" +;; :class "bright_icon" +;; :tooltip "brightness")))) -(defwidget volume [] - (eventbox - :onhover "${EWW_CMD} update vol_reveal=true" - :onhoverlost "${EWW_CMD} update vol_reveal=false" - (box - :class "module-2" - :space-evenly "false" - :orientation "h" - :spacing "3" - (scale - :class "volbar" - :value volume_percent - :draw-value: true - :orientation "h" - :tooltip "${volume_percent}%" - :max 150 - :min 0 - :onchange "pamixer --set-volume {}" ) - (button - :onclick "scripts/pop audio" - :class "volume_icon" - "墳")))) +;; (defwidget volume [] +;; (eventbox +;; :onhover "${EWW_CMD} update vol_reveal=true" +;; :onhoverlost "${EWW_CMD} update vol_reveal=false" +;; (box +;; :class "module-2" +;; :space-evenly "false" +;; :orientation "h" +;; :spacing "3" +;; (scale +;; :class "volbar" +;; :value volume_percent +;; :draw-value: true +;; :orientation "h" +;; :tooltip "${volume_percent}%" +;; :max 150 +;; :min 0 +;; :onchange "pamixer --set-volume {}" ) +;; (button +;; :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 + :class "wifi" :vexpand "false" :hexpand "false" :space-evenly "false" @@ -126,7 +155,7 @@ :class "module_essid" :text ESSID_WLAN)) (button - :class "module-wif" + :class "module-wifi" :onclick "networkmanager_dmenu" WLAN_ICON)))) @@ -150,6 +179,46 @@ :text "${round(EWW_BATTERY['BAT1'].capacity, 0)}%" :class "bat_label"))) +(defwidget bright [] + (box + :class "bright_module" + :vexpand "false" + :hexpand "false" + :spacing 5 + (circular-progress + :class "brightbar" + :value brightness_percent + :thickness 3 + (button + :class "iconbright" + ;; :onclick "scripts/pop audio" + :tooltip "${brightness_percent}%" + "")) + (label + :text brightness_percent + :class "bright_label"))) + +(defwidget volume [] + (box + :class "vol_module" + :vexpand "false" + :hexpand "false" + :spacing 5 + (circular-progress + :class "volbar" + :value volume_percent + :thickness 3 + :max 150 + :min 0 + (button + :class "iconvol" + :onclick "scripts/pop audio" + :tooltip "${volume_percent}%" + "墳")) + (label + :text volume_percent + :class "vol_label"))) + (defwidget cpu [] (box :class "cpu_module" @@ -205,13 +274,7 @@ :spacing "0" (label :text clock_full - :class "clock_time_class" ) - (revealer :transition "slideleft" - :reveal {HOST == "kaladin" ? false : time_rev} - :duration "250ms" - (button - :class "clock_date_class" - :onclick "scripts/pop calendar" clock_date))))) + :class "clock_time_class" )))) (defwidget notif_button [] (box @@ -274,14 +337,14 @@ :space-evenly false :halign "end" :class "right_modules" - (bright) - (volume) - (wifi) (sep) (cpu) (mem) + (volume) + (bright) (bat) (sep) + (wifi) (notif_button) (nextcloud_button))) @@ -300,7 +363,7 @@ :x "15px" :y "3px" :width "100%" - :height "0px" + :height "60px" :anchor "bottom center") :stacking "fg" :windowtype "dock" diff --git a/eww/scripts/appname b/eww/scripts/appname index 3504d84..663185a 100755 --- a/eww/scripts/appname +++ b/eww/scripts/appname @@ -20,11 +20,12 @@ module() { echo "(box \ :orientation \"h\" \ :halign \"start\" \ + :valign \"center\" \ :space-evenly false \ (image \ :class \"app-icon\" \ :path \"$iconpath\" \ - :image-width \"18\") \ + :image-width \"28\") \ (label \ :class \"app-name\" \ :limit-width \"35\" \ diff --git a/eww/scripts/workspace b/eww/scripts/workspace index 7da7be5..41495db 100755 --- a/eww/scripts/workspace +++ b/eww/scripts/workspace @@ -49,7 +49,7 @@ fi } module() { #output eww widget -echo "(eventbox :onscroll \"echo {} | sed -e 's/up/-1/g' -e 's/down/+1/g' | xargs hyprctl dispatch workspace\" \ +echo "(eventbox :onscroll \"echo {} | sed -e 's/up/-1/g' -e 's/down/+1/g' | xargs hyprctl dispatch workspace\" :valign \"center\" \ (box :class \"works\" :orientation \"h\" :spacing 5 :space-evenly \"false\" :valign \"center\" \ (button :onclick \"hyprctl dispatch 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 workspace 2\" :onrightclick \"hyprctl dispatch workspace 2 && $HOME/.config/hypr/themes/neon/scripts/default_app\" :class \"0$o2$f2\" \"${ic[2]}\") \ diff --git a/hypr/hyprland.conf b/hypr/hyprland.conf index 09c4bab..f8dedbc 100644 --- a/hypr/hyprland.conf +++ b/hypr/hyprland.conf @@ -49,22 +49,24 @@ gestures { decoration { rounding=18 - active_opacity=0.90 + multisample_edges=true + active_opacity=0.97 inactive_opacity=0.75 fullscreen_opacity=1.0 blur=true blur_new_optimizations=true - blur_size=2# minimum 1 - blur_passes=5 # minimum 1, more passes = more resource intensive. + blur_size=10 # minimum 1 + blur_passes=3 # minimum 1, more passes = more resource intensive. + blur_ignore_opacity=false # Your blur "amount" is blur_size * blur_passes, but high blur_size (over around 5-ish) will produce artifacts. # if you want heavy blur, you need to up the blur_passes. # the more passes, the more you can up the blur_size without noticing artifacts. drop_shadow=true - shadow_range=20 - shadow_offset=10 10 - shadow_scale=1.0 - shadow_render_power=2 - col.shadow = rgba(00000066) + shadow_range=15 + shadow_offset=5 5 + shadow_scale=0.99 + shadow_render_power=1 + col.shadow = rgba(000000cc) dim_inactive=true dim_strength=0.2 } diff --git a/hypr/scripts/dynamic-float.sh b/hypr/scripts/dynamic-float.sh new file mode 100755 index 0000000..18f5074 --- /dev/null +++ b/hypr/scripts/dynamic-float.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +function handle { + if [[ ${1:0:12} == "activewindow" ]]; then + echo ${1:0} + fi +} + +socat - UNIX-CONNECT:/tmp/hypr/$(echo $HYPRLAND_INSTANCE_SIGNATURE)/.socket2.sock | while read line; do handle $line; done diff --git a/modules/desktop.nix b/modules/desktop.nix index 6e4ae34..6b09b24 100644 --- a/modules/desktop.nix +++ b/modules/desktop.nix @@ -73,11 +73,11 @@ with lib; enable = true; settings = rec { initial_session = { - command = "dbus-run-session startplasma-wayland"; + command = "hyprland"; user = "chris"; }; default_session = { - command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time -r --window-padding 2 --cmd 'dbus-run-session startplasma-wayland' -s /etc/greetd/environments"; + command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time -r --window-padding 2 --cmd 'hyprland' -s /etc/greetd/environments"; user = "greeter"; }; plasma_session = { diff --git a/modules/emacs.nix b/modules/emacs.nix index 7ee23e1..b5a257b 100644 --- a/modules/emacs.nix +++ b/modules/emacs.nix @@ -4,7 +4,7 @@ with lib; { services.emacs = { enable = true; - package = with pkgs; ((emacsPackagesFor emacsNativeComp).emacsWithPackages + package = with pkgs; ((emacsPackagesFor emacsPgtk).emacsWithPackages (epkgs: with epkgs; [ vterm magit @@ -23,8 +23,8 @@ with lib; which-key exec-path-from-shell no-littering - tree-sitter - tree-sitter-langs + # tree-sitter + # tree-sitter-langs rustic evil evil-collection diff --git a/rofi/launchers-git/launcher.sh b/rofi/launchers-git/launcher.sh index 89e7d67..5ed7804 100755 --- a/rofi/launchers-git/launcher.sh +++ b/rofi/launchers-git/launcher.sh @@ -13,6 +13,7 @@ else fi rofi -no-lazy-grab -modi combi -show combi -combi-modi "drun,run" -theme launchers-git/"$style".rasi +# wofi --show drun,run # $@ & diff --git a/scripts/emacslof b/scripts/emacslof index 1ff1c63..ef57b38 100755 --- a/scripts/emacslof +++ b/scripts/emacslof @@ -27,7 +27,7 @@ if [ $(pgrep -c emacsclient) -gt 0 ]; then emacswin=$(echo $emacsrg | sed 's/.*\: //') echo $emacswin - exec wlrctl toplevel focus title:"$emacswin" + exec wlrctl toplevel focus app_id:emacs exit fi fi diff --git a/user/home.nix b/user/home.nix index 4320839..487a0a9 100644 --- a/user/home.nix +++ b/user/home.nix @@ -2,7 +2,7 @@ { imports = [ - ./modules/hyprland.nix + # ./modules/hyprland.nix ]; # Home Manager needs a bit of information about you and the # paths it should manage.