diff --git a/modules/ewwbar/eww-config/dashboard/dashboard.scss b/modules/ewwbar/eww-config/dashboard/dashboard.scss new file mode 100644 index 0000000..a413efb --- /dev/null +++ b/modules/ewwbar/eww-config/dashboard/dashboard.scss @@ -0,0 +1,25 @@ +.dash_window { + background-color: $bkgrnd; + border-radius: 16px; +} + +.btn_logout, .btn_restart, .btn_shutdown, .btn_switch_windows { + font-size: 40px; + font-weight: bold; +} + +.btn_logout { + color: #7a49a5; +} + +.btn_restart { + color: #ffa500; +} + +.btn_shutdown { + color: #4a8bad; +} + +.btn_switch_windows { + color: #0dc5ff; +} diff --git a/modules/ewwbar/eww-config/dashboard/dashboard.yuck b/modules/ewwbar/eww-config/dashboard/dashboard.yuck new file mode 100644 index 0000000..fc7432b --- /dev/null +++ b/modules/ewwbar/eww-config/dashboard/dashboard.yuck @@ -0,0 +1,79 @@ + + +(defwidget logout [] + (box :class "dash_window" + :vexpand "false" + :hexpand "false" + (button :class "btn_logout" + :onclick "hyprctl dispatch exit" + "󰍃"))) + +(defwidget restart [] + (box :class "dash_window" + :vexpand "false" + :hexpand "false" + (button :class "btn_restart" + :onclick "systemctl reboot" + "󰜉"))) + +(defwidget shutdown [] + (box :class "dash_window" + :vexpand "false" + :hexpand "false" + (button :class "btn_shutdown" + :onclick "systemctl poweroff" + "󰐥"))) + +(defwidget reboot_windows [] + (box :class "dash_window" + :vexpand "false" + :hexpand "false" + (button :class "btn_switch_windows" + :onclick "kitty @ launch" + ;; :onclick "kitty --session /home/nixolas/.config/eww/scripts/switch-to-windows-kitty.conf -T switch-to-windows-elevation" + ""))) + +;; Set up prompt window for sudo password +;; that trigglers on reboot_windows, +;; and runs the windows command + + +(defwindow logout + :stacking "bg" + :focusable "false" + :monitor 0 + :geometry (geometry :x 1400 + :y 200 + :width 75 + :height 75) + (logout)) + +(defwindow restart + :stacking "bg" + :focusable "false" + :monitor 0 + :geometry (geometry :x 1400 + :y 280 + :width 75 + :height 75) + (restart)) + +(defwindow shutdown + :stacking "bg" + :focusable "false" + :monitor 0 + :geometry (geometry :x 1400 + :y 360 + :width 75 + :height 75) + (shutdown)) + +(defwindow reboot_windows + :stacking "bg" + :focusable "false" + :monitor 0 + :geometry (geometry :x 1400 + :y 440 + :width 75 + :height 75) + (reboot_windows)) diff --git a/modules/ewwbar/eww-config/eww.scss b/modules/ewwbar/eww-config/eww.scss index b7275dd..4ca301f 100644 --- a/modules/ewwbar/eww-config/eww.scss +++ b/modules/ewwbar/eww-config/eww.scss @@ -7,12 +7,13 @@ $light_bkgrnd: rgba(60, 60, 60, 0.8); @import "./modules/center-clock.scss" @import "./modules/volume-osd.scss" +@import "./dashboard/dashboard.scss" //Global Styles .bar-main { background-color: $bkgrnd; color: #FFFFFF; - border-radius: 10; + border-radius: 10px; padding-left: 10px; padding-right: 10px; } @@ -38,7 +39,7 @@ $light_bkgrnd: rgba(60, 60, 60, 0.8); .active-workspace { background-color: rgba(150, 150, 150, 0.4); - border-radius: 10; + border-radius: 10px; padding-left: 10px; padding-right: 10px; } @@ -46,7 +47,7 @@ $light_bkgrnd: rgba(60, 60, 60, 0.8); .side-stuff { background-color: $bkgrnd; color: #FFFFFF; - border-radius: 10; + border-radius: 10px; padding-left: 10px; padding-right: 10px; font-size: 1.2rem; diff --git a/modules/ewwbar/eww-config/eww.yuck b/modules/ewwbar/eww-config/eww.yuck index ef42bfb..5180554 100644 --- a/modules/ewwbar/eww-config/eww.yuck +++ b/modules/ewwbar/eww-config/eww.yuck @@ -160,3 +160,4 @@ (defvar open_vol_osd false) (defvar ANIM_DURATION "500ms") (include "./modules/volume-osd.yuck") +(include "./dashboard/dashboard.yuck") diff --git a/modules/ewwbar/eww-config/scripts/switch-to-windows-kitty.conf b/modules/ewwbar/eww-config/scripts/switch-to-windows-kitty.conf new file mode 100644 index 0000000..d9d984f --- /dev/null +++ b/modules/ewwbar/eww-config/scripts/switch-to-windows-kitty.conf @@ -0,0 +1 @@ +launch echo "Elevation required to default to Grub entry 2 on reboot"; sudo grub-reboot 1; sudo reboot diff --git a/modules/hyprland/default.nix b/modules/hyprland/default.nix index dd59a5a..493dcec 100644 --- a/modules/hyprland/default.nix +++ b/modules/hyprland/default.nix @@ -44,7 +44,7 @@ in exec-once = [ "${pkgs.swww}/bin/swww init & sleep 0.5 & ${pkgs.swww}/bin/swww /home/nixolas/Downloads/RecountERD.png" - "eww open bar" + "eww open bar;eww open logout;eww open restart;eww open shutdown;eww open reboot_windows" ]; input = { diff --git a/modules/hyprland/displays.nix b/modules/hyprland/displays.nix index 689e7b2..6ea45c7 100644 --- a/modules/hyprland/displays.nix +++ b/modules/hyprland/displays.nix @@ -7,19 +7,26 @@ let in { wayland.windowManager.hyprland.settings = { - workspace = if (hostname == "NicksNixDesktop") then [ - "1,monitor:DP-3,default:true" - "3,monitor:DP-3" - "5,monitor:DP-3" - "7,monitor:DP-3" - "9,monitor:DP-3" - "2,monitor:DP-2,default:true" - "4,monitor:DP-2" - "6,monitor:DP-2" - "8,monitor:DP-2" - ] else [ + windowrulev2 = [ + "float,class:^(kitty)$,title:^switch-to-windows-elevation" + # "center,class:^(kitty)$,title:^switch-to-windows-elevation" + # "size 40% 40%,class:^(kitty)$,title:^switch-to-windows-elevation" + ]; - ]; + workspace = if (hostname == "NicksNixDesktop") then [ + "1,monitor:DP-3,default:true" + "3,monitor:DP-3" + "5,monitor:DP-3" + "7,monitor:DP-3" + "9,monitor:DP-3" + + "2,monitor:DP-2,default:true" + "4,monitor:DP-2" + "6,monitor:DP-2" + "8,monitor:DP-2" + ] else [ + + ]; }; } diff --git a/modules/kitty.nix b/modules/kitty.nix index b4ef0ad..3b89979 100644 --- a/modules/kitty.nix +++ b/modules/kitty.nix @@ -12,6 +12,7 @@ in # theme = "colbalt-neon"; settings = { + allow_remote_control = true; shell = "zsh"; background_blur = "4"; background_opacity = "0.8";