From c0699f971dbec2716a023dcbe557c66fa2da988e Mon Sep 17 00:00:00 2001 From: Dakedres Date: Mon, 12 Jan 2026 19:42:58 -0700 Subject: [PATCH] basilisk but actually + cleanup --- home/.basilisk | 1 - home/.basilisk/.gitignore | 1 + home/.basilisk/README.md | 8 + home/.basilisk/bin/bas | 163 ++++++ home/.basilisk/bin/basilisk-session | 24 + home/.basilisk/binds | 109 ++++ home/.basilisk/components | 85 +++ home/.basilisk/genctl | 112 ++++ home/.basilisk/install | 7 + home/.basilisk/niri/animations.minimal.kdl | 23 + home/.basilisk/niri/animations.none.kdl | 23 + home/.basilisk/niri/config.kdl | 527 ++++++++++++++++++ home/.basilisk/niri/genbinds | 91 +++ home/.basilisk/niri/reload | 7 + .../share/wayland-sessions/basilisk.desktop | 6 + home/.basilisk/uninstall | 5 + home/.basilisk/waybar/animations.css | 7 + home/.basilisk/waybar/config.jsonc | 125 +++++ home/.basilisk/waybar/generate.js | 192 +++++++ home/.basilisk/waybar/package-lock.json | 490 ++++++++++++++++ home/.basilisk/waybar/package.json | 5 + home/.basilisk/waybar/style.css | 200 +++++++ home/.basilisk/waybar/style.scss | 225 ++++++++ home/.basilisk/waybar/watch-power-menu-state | 4 + lib/shchemes | 2 +- paths | 1 - 26 files changed, 2440 insertions(+), 3 deletions(-) delete mode 160000 home/.basilisk create mode 100644 home/.basilisk/.gitignore create mode 100644 home/.basilisk/README.md create mode 100755 home/.basilisk/bin/bas create mode 100755 home/.basilisk/bin/basilisk-session create mode 100644 home/.basilisk/binds create mode 100644 home/.basilisk/components create mode 100755 home/.basilisk/genctl create mode 100755 home/.basilisk/install create mode 100644 home/.basilisk/niri/animations.minimal.kdl create mode 100644 home/.basilisk/niri/animations.none.kdl create mode 100644 home/.basilisk/niri/config.kdl create mode 100755 home/.basilisk/niri/genbinds create mode 100755 home/.basilisk/niri/reload create mode 100644 home/.basilisk/share/wayland-sessions/basilisk.desktop create mode 100755 home/.basilisk/uninstall create mode 100644 home/.basilisk/waybar/animations.css create mode 100644 home/.basilisk/waybar/config.jsonc create mode 100644 home/.basilisk/waybar/generate.js create mode 100644 home/.basilisk/waybar/package-lock.json create mode 100644 home/.basilisk/waybar/package.json create mode 100644 home/.basilisk/waybar/style.css create mode 100644 home/.basilisk/waybar/style.scss create mode 100755 home/.basilisk/waybar/watch-power-menu-state diff --git a/home/.basilisk b/home/.basilisk deleted file mode 160000 index 38c9b90..0000000 --- a/home/.basilisk +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 38c9b900a36727bc05c97bb393d5641b012e94e3 diff --git a/home/.basilisk/.gitignore b/home/.basilisk/.gitignore new file mode 100644 index 0000000..40b878d --- /dev/null +++ b/home/.basilisk/.gitignore @@ -0,0 +1 @@ +node_modules/ \ No newline at end of file diff --git a/home/.basilisk/README.md b/home/.basilisk/README.md new file mode 100644 index 0000000..c8b4af5 --- /dev/null +++ b/home/.basilisk/README.md @@ -0,0 +1,8 @@ +# Dependencies +- `swaybg` +- `swaylock-effects` +- `swayidle` +- `rofi` +- `waybar` +- `inotify-tools` +- `imagemagick` diff --git a/home/.basilisk/bin/bas b/home/.basilisk/bin/bas new file mode 100755 index 0000000..eb530ad --- /dev/null +++ b/home/.basilisk/bin/bas @@ -0,0 +1,163 @@ +#!/bin/sh +export SCHEME="$(xrescat basilisk.theme)" +export BAS_ROOT="$(dirname "$(realpath "$0")")/../" +restart_panel() { +pkill waybar +shchemes inject "${BAS_ROOT}/waybar/style.css" +waybar \ +-c "${BAS_ROOT}/waybar/config.jsonc" \ +-s "${BAS_ROOT}/waybar/style.css" & disown + +} +notifs() { +rofication-gui + +} +power-off-monitors() { +niri msg action power-off-monitors + +} +lock() { +img="/tmp/basilisk-lock.png" +niri msg action screenshot-screen -p false -d true --path "/tmp/basilisk-lock-raw.png" +inotifywait -q -e close_write /tmp/basilisk-lock-raw.png | head -n1 +magick "/tmp/basilisk-lock-raw.png" \ +-set colorspace Gray \ +"$img" +swaylock -i "$img" & disown + +} +suspend() { +systemctl suspend && lock + +} +logout() { +loginctl terminate-session ${XDG_SESSION_ID-} + +} +shutdown() { +systemctl poweroff + +} +reboot() { +systemctl reboot + +} +reload_compositor() { +shchemes inject "${BAS_ROOT}/niri/config.kdl" + +} +reload_shell() { +"${BAS_ROOT}/genctl" + +} +timeout_daemon() { +pkill swayidle +swayidle -w \ +timeout 300 'bas lock' \ +timeout 360 'bas power-off-monitors' \ +before-sleep 'bas power-off-monitors && bas lock' & disown + +} +notif_daemon() { +pkill -f rofication-daemon +rofication-daemon & disown + +} +wallpaper() { +pkill swaybg +swaybg -i "$(xrescat basilisk.wallpaper)" + +} +theme_apps() { +shchemes inject "$HOME/.config/qutebrowser/config.py" +shchemes create_theme css > "$HOME/.config/base16.css" +shchemes create_theme css > "$HOME/.config/qutebrowser/base16.css" +pkill -HUP qutebrowser +shchemes create_theme rofi > "$HOME/.config/rofi/theme.rasi" + + +} +load() { +reload_shell +"$0" reload_compositor +"$0" restart_panel +"$0" notif_daemon +"$0" timeout_daemon +"$0" wallpaper +"$0" theme_apps + +} +rofi_report() { +[ -n "$BASILISK_ROFI_REPORT_STATE" ] && printf %s\n >> "$BASILISK_ROFI_REPORT_STATE" +rofi -dmenu -format i -matching prefix -auto-select -markup -theme-str ' +element { font: "Noto Mono 11"; } +' $BASILISK_ROFI_ARGS +[ -n "$BASILISK_ROFI_REPORT_STATE" ] && printf %s\n >> "$BASILISK_ROFI_REPORT_STATE" +} +if [ -z "$1" ]; then +case "$(printf %s\\n ' rb. Restart Panel + n. Notifications + pm. Power Off Monitors + l. Lock + ps. Suspend + pe. Log Out +pdy. Shutdown +pry. Reboot + rc. Reload Compositor + rs. Reload Shell +rdt. Reload Timeout Daemon +rdn. Reload Notification Daemon + rw. Reload Wallpaper +rat. Reload App Themes + rr. Reload All'| rofi_report)" in +0) restart_panel ;; +1) notifs ;; +2) power-off-monitors ;; +3) lock ;; +4) suspend ;; +5) logout ;; +6) shutdown ;; +7) reboot ;; +8) reload_compositor ;; +9) reload_shell ;; +10) timeout_daemon ;; +11) notif_daemon ;; +12) wallpaper ;; +13) theme_apps ;; +14) load ;; +esac +else +case "$1" in +"restart_panel") restart_panel ;; +"notifs") notifs ;; +"power-off-monitors") power-off-monitors ;; +"lock") lock ;; +"suspend") suspend ;; +"logout") logout ;; +"shutdown") shutdown ;; +"reboot") reboot ;; +"reload_compositor") reload_compositor ;; +"reload_shell") reload_shell ;; +"timeout_daemon") timeout_daemon ;; +"notif_daemon") notif_daemon ;; +"wallpaper") wallpaper ;; +"theme_apps") theme_apps ;; +"load") load ;; +"rb") restart_panel ;; +"n") notifs ;; +"pm") power-off-monitors ;; +"l") lock ;; +"ps") suspend ;; +"pe") logout ;; +"pdy") shutdown ;; +"pry") reboot ;; +"rc") reload_compositor ;; +"rs") reload_shell ;; +"rdt") timeout_daemon ;; +"rdn") notif_daemon ;; +"rw") wallpaper ;; +"rat") theme_apps ;; +"rr") load ;; +esac +fi diff --git a/home/.basilisk/bin/basilisk-session b/home/.basilisk/bin/basilisk-session new file mode 100755 index 0000000..3e45be6 --- /dev/null +++ b/home/.basilisk/bin/basilisk-session @@ -0,0 +1,24 @@ +#!/usr/bin/sh + +# Detect if being run as a user service, which implies external session management, +# exec compositor directly +if [ -n "${MANAGERPID:-}" ] && [ "${SYSTEMD_EXEC_PID:-}" = "$$" ]; then + case "$(ps -p "$MANAGERPID" -o cmd=)" in + *systemd*--user*) + exec niri --session + ;; + esac +fi + +if [ -n "$SHELL" ] && + grep -q "$SHELL" /etc/shells && + ! (echo "$SHELL" | grep -q "false") && + ! (echo "$SHELL" | grep -q "nologin"); then + if [ "$1" != '-l' ]; then + exec bash -c "exec -l '$SHELL' -c '$0 -l $*'" + else + shift + fi +fi + +niri --session -c "$(dirname "$(readlink "$0")")/../niri/config.kdl" diff --git a/home/.basilisk/binds b/home/.basilisk/binds new file mode 100644 index 0000000..aff5d39 --- /dev/null +++ b/home/.basilisk/binds @@ -0,0 +1,109 @@ +# +# Utilities +# + +Mod+slash + show-hotkey-overlay; + +Mod+Return hotkey-overlay-title="Spawn terminal" + spawn "alacritty"; + +Mod+Space repeat=false hotkey-overlay-title="Launch program" + spawn "sh" "-c" "rofi -show drun"; + +Mod+b hotkey-overlay-title="Spawn new tab" + spawn "qutebrowser"; + +Mod+v hotkey-overlay-title="Open clipboard manager" + spawn "copyq" "toggle"; + +Mod+m hotkey-overlay-title="Select file and copy to clipboard" + spawn "alacritty" "-e" "select-and-copy"; + +Mod+escape hotkey-overlay-title="Suspend session" + spawn "bas" "suspend"; + +Mod+n hotkey-overlay-title="View notifications" + spawn "bas" "view_notifs"; + +Mod+p + spawn "bas"; + +{,Shift+,Ctrl+}XF86Tools + screenshot{,-window,-screen}; + +# +# System Control +# + +{XF86AudioRaiseVolume,XF86AudioLowerVolume} allow-when-locked=true + spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ {0.1+,0.1-}"; + +XF86AudioMute allow-when-locked=true + spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle"; + +XF86AudioMicMute allow-when-locked=true + spawn-sh "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"; + +# Control Brightness +{XF86MonBrightnessUp,XF86MonBrightnessDown} allow-when-locked=true + spawn "brightnessctl" "--class=backlight" "set" "{+10%,10%-}"; + +# +# Window control +# + +Mod+q + close-window; + +Mod+g + toggle-window-floating; + +Mod+{,Shift+}f + {maximize-column,fullscreen-window}; + +Mod+t + toggle-column-tabbed-display; + +# +# Layout navigation/configuration +# + +# Overview +Mod+a + toggle-overview; + +# Focus in direction +Mod+{h,j,k,l} +Mod+{Left,Down,Up,Right} + focus-{column-left,window-or-workspace-down,window-or-workspace-up,column-right}; + +Mod+{TouchpadScrollRight,TouchpadScrollLeft} +Mod+{WheelScrollUp,WheelScrollDown} + focus-column-{right,left}; + +# Move window +Mod+Shift+{h,j,k,l} +Mod+Shift+{Left,Down,Up,Right} +# Mod+Shift+{a,s,w,d} + {consume-or-expel-window-left,move-window-down-or-to-workspace-down,move-window-up-or-to-workspace-up,consume-or-expel-window-right}; + +# Move column +Mod+Ctrl+{h,j,k,l} +Mod+Ctrl+{Left,Down,Up,Right} +# Mod+Ctrl+{a,s,w,d} + move-column-{left,to-workspace-down,to-workspace-up,right}; + +# Focus/move window/column to workspace +Mod{,+Shift,+Ctrl}+{1,2,3,4,5} + {focus,move-window-to,move-column-to}-workspace {1,2,3,4,5}; + +Mod+{,Shift+}{s,d} + {focus,move}-{window-up,window-down}; + +# Switch column size +# Mod+{z,x} + # switch-preset-column-width{-back,}; + +Mod+{z,x,c} + set-column-width "{35,50,65}%"; diff --git a/home/.basilisk/components b/home/.basilisk/components new file mode 100644 index 0000000..0128aa8 --- /dev/null +++ b/home/.basilisk/components @@ -0,0 +1,85 @@ +restart_panel,rb,Restart Panel + pkill waybar + shchemes inject "${BAS_ROOT}/waybar/style.css" + waybar \ + -c "${BAS_ROOT}/waybar/config.jsonc" \ + -s "${BAS_ROOT}/waybar/style.css" & disown + +notifs,n,Notifications + rofication-gui + +power-off-monitors,pm,Power Off Monitors + niri msg action power-off-monitors + +lock,l,Lock + # filename=$(basename -- "$(xrescat basilisk.wallpaper)") + # ext="${filename##*.}" + img="/tmp/basilisk-lock.png" + # path="$(date +"$HOME/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png")" + niri msg action screenshot-screen -p false -d true --path "/tmp/basilisk-lock-raw.png" + inotifywait -q -e close_write /tmp/basilisk-lock-raw.png | head -n1 + magick "/tmp/basilisk-lock-raw.png" \ + -set colorspace Gray \ + # -blur 0x8 \ + "$img" + swaylock -i "$img" & disown + # swaylock -i "$(xrescat basilisk.wallpaper) & disown + +suspend,ps,Suspend + systemctl suspend && lock + +logout,pe,Log Out + loginctl terminate-session ${XDG_SESSION_ID-} + +# hibernate,ph,Hibernate + # systemctl hibernate + +shutdown,pdy,Shutdown, + systemctl poweroff + +reboot,pry,Reboot, + systemctl reboot + +reload_compositor,rc,Reload Compositor, + shchemes inject "${BAS_ROOT}/niri/config.kdl" + +reload_shell,rs,Reload Shell, + "${BAS_ROOT}/genctl" + +timeout_daemon,rdt,Reload Timeout Daemon, + pkill swayidle + swayidle -w \ + timeout 300 'bas lock' \ + timeout 360 'bas power-off-monitors' \ + before-sleep 'bas power-off-monitors && bas lock' & disown + +notif_daemon,rdn,Reload Notification Daemon, + pkill -f rofication-daemon + rofication-daemon & disown + +wallpaper,rw,Reload Wallpaper + # filename=$(basename -- "$(xrescat basilisk.wallpaper)") + # ext="${filename##*.}" + # wallpaper_blur_path="/tmp/basilisk-overview-wallpaper.${ext}" + # magick convert "$(xrescat basilisk.wallpaper)" -blur 0x12 "$wallpaper_blur_path" + # awww img "$wallpaper_blur_path" -n basilisk-overview + pkill swaybg + swaybg -i "$(xrescat basilisk.wallpaper)" + # awww img "$(xrescat basilisk.wallpaper)" + +theme_apps,rat,Reload App Themes, + shchemes inject "$HOME/.config/qutebrowser/config.py" + shchemes create_theme css > "$HOME/.config/base16.css" + shchemes create_theme css > "$HOME/.config/qutebrowser/base16.css" + pkill -HUP qutebrowser + + shchemes create_theme rofi > "$HOME/.config/rofi/theme.rasi" + +load,rr,Reload All, + reload_shell + "$0" reload_compositor + "$0" restart_panel + "$0" notif_daemon + "$0" timeout_daemon + "$0" wallpaper + "$0" theme_apps diff --git a/home/.basilisk/genctl b/home/.basilisk/genctl new file mode 100755 index 0000000..5fad71a --- /dev/null +++ b/home/.basilisk/genctl @@ -0,0 +1,112 @@ +#!/bin/sh + +awk -F ',' \ + -v sq="'" \ + -v printfSn="printf %s\\\\n " \ + -v rofiTheme=' +element { font: "Noto Mono 11"; } +' ' +function endBlock() { + if(blockState == 0) { + return + } + if(blockState == 1) { + print "Warning: " name " has no body and will not be ignored" + return + } + + print name "() {" + print body + print "}" + i=f++ + funcs[i]["name"] = name + funcs[i]["icon"] = icon + funcs[i]["shortcut"] = shortcut + funcs[i]["label"] = label + + body="" + bindLinesCount=0 + blockState=0 +} + +BEGIN { + print "#!/bin/sh" + print "export SCHEME=\"$(xrescat basilisk.theme)\"" + print "export BAS_ROOT=\"$(dirname \"$(realpath \"$0\")\")/../\"" + shortcutLen=0 + blockState=0 + bindLinesCount=0 +} +/^[\t ]*#/ || length($0) == 0 { next } +/^[^\t ].*/ { + if(blockState > 1) { + endBlock() + } + sub(/^[ \t]+/, ""); + sub(/[ \t]+$/, ""); + name=$1 + shortcut=$2 + l = length(shortcut) + if(l > shortcutLen) { + shortcutLen = l + } + label=$3 + icon=$4 + body="" + blockState=1 + next +} +/^[\t ]+/ && blockState > 0 { + blockState=2 + sub(/^[ \t]+/, ""); + sub(/[ \t]+$/, ""); + body=body $0 "\n" + next +} + +function printRofiBlock() { + printf "%s", "printf %s\\\\n " sq + f=0 + for(i in funcs) { + if(f!=0) { + print "" + } + f=1 + printf "%" shortcutLen "s", funcs[i]["shortcut"] + printf "%s", ". " funcs[i]["label"] + } + printf "%s", sq "| rofi_report" +} +function printMenuBlock() { + printf "%s", "case \"$(" + printRofiBlock() + print ")\" in" + for(i in funcs) { + print i ") " funcs[i]["name"] " ;;" + } + print "esac" +} +function printCallBlock() { + print "case \"$1\" in" + for(i in funcs) { + print "\"" funcs[i]["name"] "\") " funcs[i]["name"] " ;;" + } + for(i in funcs) { + print "\"" funcs[i]["shortcut"] "\") " funcs[i]["name"] " ;;" + } + print "esac" +} +END { + endBlock() + print "rofi_report() {" + print "[ -n \"$BASILISK_ROFI_REPORT_STATE\" ] && printf %s\\n "open" >> \"$BASILISK_ROFI_REPORT_STATE\"" + print "rofi -dmenu -format i -matching prefix -auto-select -markup -theme-str " sq rofiTheme sq " $BASILISK_ROFI_ARGS" + print "[ -n \"$BASILISK_ROFI_REPORT_STATE\" ] && printf %s\\n "closed" >> \"$BASILISK_ROFI_REPORT_STATE\"" + print "}" + print "if [ -z \"$1\" ]; then" + printMenuBlock() + print "else" + printCallBlock() + print "fi" +}' "$(dirname "$0")/components" > "$(dirname "$0")/bin/bas" +chmod +x "$(dirname "$0")/bin/bas" diff --git a/home/.basilisk/install b/home/.basilisk/install new file mode 100755 index 0000000..7f9dc24 --- /dev/null +++ b/home/.basilisk/install @@ -0,0 +1,7 @@ +#!/bin/sh + +bas_root="$(dirname "$(realpath "$0")")" + +ln -s "${bas_root}/bin/bas" /usr/bin +ln -s "${bas_root}/bin/basilisk-session" /usr/bin +cp "${bas_root}/share/wayland-sessions/basilisk.desktop" /usr/share/wayland-sessions diff --git a/home/.basilisk/niri/animations.minimal.kdl b/home/.basilisk/niri/animations.minimal.kdl new file mode 100644 index 0000000..c3c4a65 --- /dev/null +++ b/home/.basilisk/niri/animations.minimal.kdl @@ -0,0 +1,23 @@ +animations { + // Uncomment to turn off all animations. + // off + + // Slow down all animations by this factor. Values below 1 speed them up instead. + // slowdown 3.0 + + + + workspace-switch { off; } + window-open { off; } + window-close { off; } + horizontal-view-movement { + // duration-ms 100 + // curve "linear" + // off; + } + window-movement { off; } + window-resize { off; } + config-notification-open-close { off; } + screenshot-ui-open { off; } + // overview-open-close { off; } +} diff --git a/home/.basilisk/niri/animations.none.kdl b/home/.basilisk/niri/animations.none.kdl new file mode 100644 index 0000000..7aefc1b --- /dev/null +++ b/home/.basilisk/niri/animations.none.kdl @@ -0,0 +1,23 @@ +animations { + // Uncomment to turn off all animations. + // off + + // Slow down all animations by this factor. Values below 1 speed them up instead. + // slowdown 3.0 + + + + workspace-switch { off; } + window-open { off; } + window-close { off; } + horizontal-view-movement { + // duration-ms 100 + // curve "linear" + off; + } + window-movement { off; } + window-resize { off; } + config-notification-open-close { off; } + screenshot-ui-open { off; } + // overview-open-close { off; } +} diff --git a/home/.basilisk/niri/config.kdl b/home/.basilisk/niri/config.kdl new file mode 100644 index 0000000..0685107 --- /dev/null +++ b/home/.basilisk/niri/config.kdl @@ -0,0 +1,527 @@ +/// This config is in the KDL format: https://kdl.dev +// "/-" comments out the following node. +// Check the wiki for a full description of the configuration: +// https://yalter.github.io/niri/Configuration:-Introduction + +// Input device configuration. +// Find the full list of options on the wiki: +// https://yalter.github.io/niri/Configuration:-Input +input { + focus-follows-mouse + warp-mouse-to-focus mode="center-xy" + + keyboard { + xkb { + // You can set rules, model, layout, variant and options. + // For more information, see xkeyboard-config(7). + + // For example: + // layout "us,ru" + // options "grp:win_space_toggle,compose:ralt,ctrl:nocaps" + + // If this section is empty, niri will fetch xkb settings + // from org.freedesktop.locale1. You can control these using + // localectl set-x11-keymap. + } + + // Enable numlock on startup, omitting this setting disables it. + numlock + } + + // Next sections include libinput settings. + // Omitting settings disables them, or leaves them at their default values. + // All commented-out settings here are examples, not defaults. + touchpad { + // off + tap + // dwt + // dwtp + // drag false + // drag-lock + natural-scroll + // accel-speed 0.2 + // accel-profile "flat" + // scroll-method "two-finger" + // disabled-on-external-mouse + } + + mouse { + // off + // natural-scroll + accel-speed 0.2 + // accel-profile "flat" + // scroll-method "no-scroll" + } + + trackpoint { + // off + // natural-scroll + // accel-speed 0.2 + // accel-profile "flat" + // scroll-method "on-button-down" + // scroll-button 273 + // scroll-button-lock + // middle-emulation + } + + // Uncomment this to make the mouse warp to the center of newly focused windows. + // warp-mouse-to-focus + + // Focus windows and outputs automatically when moving the mouse into them. + // Setting max-scroll-amount="0%" makes it work only on windows already fully on screen. + // focus-follows-mouse max-scroll-amount="0%" +} + +// debug { + // render-drm-device "/dev/dri/nvidia-gpu" +// } + +// You can configure outputs by their name, which you can find +// by running `niri msg outputs` while inside a niri instance. +// The built-in laptop monitor is usually called "eDP-1". +// Find more information on the wiki: +// https://yalter.github.io/niri/Configuration:-Outputs +// Remember to uncomment the node by removing "/-"! +/-output "eDP-1" { + // Uncomment this line to disable this output. + // off + + // Resolution and, optionally, refresh rate of the output. + // The format is "x" or "x@". + // If the refresh rate is omitted, niri will pick the highest refresh rate + // for the resolution. + // If the mode is omitted altogether or is invalid, niri will pick one automatically. + // Run `niri msg outputs` while inside a niri instance to list all outputs and their modes. + mode "1920x1080@120.030" + + // You can use integer or fractional scale, for example use 1.5 for 150% scale. + scale 2 + + // Transform allows to rotate the output counter-clockwise, valid values are: + // normal, 90, 180, 270, flipped, flipped-90, flipped-180 and flipped-270. + transform "normal" + + // Position of the output in the global coordinate space. + // This affects directional monitor actions like "focus-monitor-left", and cursor movement. + // The cursor can only move between directly adjacent outputs. + // Output scale and rotation has to be taken into account for positioning: + // outputs are sized in logical, or scaled, pixels. + // For example, a 3840×2160 output with scale 2.0 will have a logical size of 1920×1080, + // so to put another output directly adjacent to it on the right, set its x to 1920. + // If the position is unset or results in an overlap, the output is instead placed + // automatically. + position x=1280 y=0 +} + +cursor { + xcursor-theme "Mocu-Black-Right" +} +// environment { +// GTK_THEME +// } + +// Settings that influence how windows are positioned and sized. +// Find more information on the wiki: +// https://yalter.github.io/niri/Configuration:-Layout +layout { + // Set gaps around windows in logical pixels. + gaps 6 + + // When to center a column when changing focus, options are: + // - "never", default behavior, focusing an off-screen column will keep at the left + // or right edge of the screen. + // - "always", the focused column will always be centered. + // - "on-overflow", focusing a column will center it if it doesn't fit + // together with the previously focused column. + center-focused-column "never" + + // You can customize the widths that "switch-preset-column-width" (Mod+R) toggles between. + preset-column-widths { + // Proportion sets the width as a fraction of the output width, taking gaps into account. + // For example, you can perfectly fit four windows sized "proportion 0.25" on an output. + // The default preset widths are 1/3, 1/2 and 2/3 of the output. + proportion 0.33333 + proportion 0.5 + proportion 0.66667 + + // Fixed sets the width in logical pixels exactly. + // fixed 1920 + } + + // You can also customize the heights that "switch-preset-window-height" (Mod+Shift+R) toggles between. + // preset-window-heights { } + + // You can change the default width of the new windows. + default-column-width { proportion 0.5; } + // If you leave the brackets empty, the windows themselves will decide their initial width. + // default-column-width {} + + // By default focus ring and border are rendered as a solid background rectangle + // behind windows. That is, they will show up through semitransparent windows. + // This is because windows using client-side decorations can have an arbitrary shape. + // + // If you don't like that, you should uncomment `prefer-no-csd` below. + // Niri will draw focus ring and border *around* windows that agree to omit their + // client-side decorations. + // + // Alternatively, you can override it with a window rule called + // `draw-border-with-background`. + + // You can change how the focus ring looks. + focus-ring { + // Uncomment this line to disable the focus ring. + // off + + // How many logical pixels the ring extends out from the windows. + width 2 + + // Colors can be set in a variety of ways: + // - CSS named colors: "red" + // - RGB hex: "#rgb", "#rgba", "#rrggbb", "#rrggbbaa" + // - CSS-like notation: "rgb(255, 127, 0)", rgba(), hsl() and a few others. + + // Color of the ring on the active monitor. + active-color "#7fc8ff" + + // Color of the ring on inactive monitors. + // + // The focus ring only draws around the active window, so the only place + // where you can see its inactive-color is on other monitors. + inactive-color "#505050" + + // You can also use gradients. They take precedence over solid colors. + // Gradients are rendered the same as CSS linear-gradient(angle, from, to). + // The angle is the same as in linear-gradient, and is optional, + // defaulting to 180 (top-to-bottom gradient). + // You can use any CSS linear-gradient tool on the web to set these up. + // Changing the color space is also supported, check the wiki for more info. + // + // active-gradient from="#80c8ff" to="#c7ff7f" angle=45 + + // You can also color the gradient relative to the entire view + // of the workspace, rather than relative to just the window itself. + // To do that, set relative-to="workspace-view". + // + // inactive-gradient from="#505050" to="#808080" angle=45 relative-to="workspace-view" + } + + tab-indicator { + // off + // on + // hide-when-single-tab + place-within-column + gap 4 + width 4 + length total-proportion=1.0 + position "right" + gaps-between-tabs 2 + // corner-radius 8 + // active-color "red" + // inactive-color "gray" + // urgent-color "blue" + // active-gradient from="#80c8ff" to="#bbddff" angle=45 + // inactive-gradient from="#505050" to="#808080" angle=45 relative-to="workspace-view" + // urgent-gradient from="#800" to="#a33" angle=45 + } + + // You can also add a border. It's similar to the focus ring, but always visible. + border { + // The settings are the same as for the focus ring. + // If you enable the border, you probably want to disable the focus ring. + off + + width 3 + active-color "#ffc87f" + inactive-color "#505050" + + // Color of the border around windows that request your attention. + urgent-color "#9b0000" + + // Gradients can use a few different interpolation color spaces. + // For example, this is a pastel rainbow gradient via in="oklch longer hue". + // + // active-gradient from="#e5989b" to="#ffb4a2" angle=45 relative-to="workspace-view" in="oklch longer hue" + + // inactive-gradient from="#505050" to="#808080" angle=0 relative-to="workspace-view" + } + + // You can enable drop shadows for windows. + shadow { + // Uncomment the next line to enable shadows. + on + + // By default, the shadow draws only around its window, and not behind it. + // Uncomment this setting to make the shadow draw behind its window. + // + // Note that niri has no way of knowing about the CSD window corner + // radius. It has to assume that windows have square corners, leading to + // shadow artifacts inside the CSD rounded corners. This setting fixes + // those artifacts. + // + // However, instead you may want to set prefer-no-csd and/or + // geometry-corner-radius. Then, niri will know the corner radius and + // draw the shadow correctly, without having to draw it behind the + // window. These will also remove client-side shadows if the window + // draws any. + // + // draw-behind-window true + + // You can change how shadows look. The values below are in logical + // pixels and match the CSS box-shadow properties. + + // Softness controls the shadow blur radius. + softness 30 + + // Spread expands the shadow. + spread 3 + + // Offset moves the shadow relative to the window. + offset x=0 y=5 + + // You can also change the shadow color and opacity. + color "#0007" + } + + // Struts shrink the area occupied by windows, similarly to layer-shell panels. + // You can think of them as a kind of outer gaps. They are set in logical pixels. + // Left and right struts will cause the next window to the side to always be visible. + // Top and bottom struts will simply add outer gaps in addition to the area occupied by + // layer-shell panels and regular gaps. + struts { + // left 32 + // right 32 + // top 64 + // bottom 64 + } + + background-color "transparent" +} + +// Add lines like this to spawn processes at startup. +// Note that running niri as a session supports xdg-desktop-autostart, +// which may be more convenient to use. +// See the binds section below for more spawn examples. + +// This line starts waybar, a commonly used bar for Wayland compositors. +spawn-at-startup "copyq" +spawn-at-startup "sh" "-c" "bas load" +spawn-at-startup "steam" "-silent" "-system-composer" + +prefer-no-csd + +// To run a shell command (with variables, pipes, etc.), use spawn-sh-at-startup: +// spawn-sh-at-startup "qs -c ~/source/qs/MyAwesomeShell" + +hotkey-overlay { + // Uncomment this line to disable the "Important Hotkeys" pop-up at startup. + // skip-at-startup +} + +layer-rule { + match namespace="wallpaper" + place-within-backdrop true +} + +// Uncomment this line to ask the clients to omit their client-side decorations if possible. +// If the client will specifically ask for CSD, the request will be honored. +// Additionally, clients will be informed that they are tiled, removing some client-side rounded corners. +// This option will also fix border/focus ring drawing behind some semitransparent windows. +// After enabling or disabling this, you need to restart the apps for this to take effect. +// prefer-no-csd + +// You can change the path where screenshots are saved. +// A ~ at the front will be expanded to the home directory. +// The path is formatted with strftime(3) to give you the screenshot date and time. +screenshot-path "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png" + +// You can also set this to null to disable saving screenshots to disk. +// screenshot-path null + +// Animation settings. +// The wiki explains how to configure individual animations: +// https://yalter.github.io/niri/Configuration:-Animations + +//START SHCHEMES BLOCK : [ "$(xrescat basilisk.animations.windows)" == "0" ] && cat animations.none.css + +//END SHCHEMES BLOCK +//START SHCHEMES BLOCK : [ "$(xrescat basilisk.animations.windows)" == "1" ] && cat animations.minimal.css + +//END SHCHEMES BLOCK + +// Window rules let you adjust behavior for individual windows. +// Find more information on the wiki: +// https://yalter.github.io/niri/Configuration:-Window-Rules + +// Work around WezTerm's initial configure bug +// by setting an empty default-column-width. +window-rule { + // This regular expression is intentionally made as specific as possible, + // since this is the default config, and we want no false positives. + // You can get away with just app-id="wezterm" if you want. + match app-id=r#"^org\.wezfurlong\.wezterm$"# + default-column-width {} +} + +window-rule { + match app-id="steam" title=r#"^notificationtoasts_\d+_desktop$"# + default-floating-position x=10 y=10 relative-to="bottom-right" +} + +// Open the Firefox picture-in-picture player as floating by default. +window-rule { + // This app-id regular expression will work for both: + // - host Firefox (app-id is "firefox") + // - Flatpak Firefox (app-id is "org.mozilla.firefox") + match app-id=r#"firefox$"# title="^Picture-in-Picture$" + open-floating true +} + +// Example: block out two password managers from screen capture. +// (This example rule is commented out with a "/-" in front.) +/-window-rule { + match app-id=r#"^org\.keepassxc\.KeePassXC$"# + match app-id=r#"^org\.gnome\.World\.Secrets$"# + + block-out-from "screen-capture" + + // Use this instead if you want them visible on third-party screenshot tools. + // block-out-from "screencast" +} + +window-rule { + match app-id="^com.github.hluk.copyq$" + + open-floating true + default-floating-position x=8 y=8 relative-to="top-left" + default-window-height { fixed 1064; } + default-column-width { proportion 0.3; } + + // Use this instead if you want them visible on third-party screenshot tools. + // block-out-from "screencast" +} + +// Example: enable rounded corners for all windows. +// (This example rule is commented out with a "/-" in front.) +/-window-rule { + geometry-corner-radius 12 + clip-to-geometry true +} +/* + * binds { + * // Keys consist of modifiers separated by + signs, followed by an XKB key name + * // in the end. To find an XKB name for a particular key, you may use a program + * // like wev. + * // + * // "Mod" is a special modifier equal to Super when running on a TTY, and to Alt + * // when running as a winit window. + * // + * // Most actions that you can bind here can also be invoked programmatically with + * // `niri msg action do-something`. + * + * // Mod-Shift-/, which is usually the same as Mod-?, + * // shows a list of important hotkeys. + * Mod+Shift+Slash { show-hotkey-overlay; } + * + * // Suggested binds for running programs: terminal, app launcher, screen locker. + * Mod+T hotkey-overlay-title="Open a Terminal: alacritty" { spawn "alacritty"; } + * Mod+D hotkey-overlay-title="Run an Application: fuzzel" { spawn "fuzzel"; } + * Super+Alt+L hotkey-overlay-title="Lock the Screen: swaylock" { spawn "swaylock"; } + * + * // Use spawn-sh to run a shell command. Do this if you need pipes, multiple commands, etc. + * // Note: the entire command goes as a single argument. It's passed verbatim to `sh -c`. + * // For example, this is a standard bind to toggle the screen reader (orca). + * Super+Alt+S allow-when-locked=true hotkey-overlay-title=null { spawn-sh "pkill orca || exec orca"; } + * + * // Example volume keys mappings for PipeWire & WirePlumber. + * // The allow-when-locked=true property makes them work even when the session is locked. + * // Using spawn-sh allows to pass multiple arguments together with the command. + * XF86AudioRaiseVolume allow-when-locked=true { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1+"; } + * XF86AudioLowerVolume allow-when-locked=true { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1-"; } + * XF86AudioMute allow-when-locked=true { spawn-sh "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"; } + * XF86AudioMicMute allow-when-locked=true { spawn-sh "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"; } + * + * // Example brightness key mappings for brightnessctl. + * // You can use regular spawn with multiple arguments too (to avoid going through "sh"), + * // but you need to manually put each argument in separate "" quotes. + * XF86MonBrightnessUp allow-when-locked=true { spawn "brightnessctl" "--class=backlight" "set" "+10%"; } + * XF86MonBrightnessDown allow-when-locked=true { spawn "brightnessctl" "--class=backlight" "set" "10%-"; } + */ +binds { + //START SHCHEMES BLOCK : ./genbinds +Mod+slash { show-hotkey-overlay; } +Mod+Return hotkey-overlay-title="Spawn terminal" { spawn "alacritty"; } +Mod+Space repeat=false hotkey-overlay-title="Launch program" { spawn "sh" "-c" "rofi -show drun"; } +Mod+b hotkey-overlay-title="Spawn new tab" { spawn "qutebrowser"; } +Mod+v hotkey-overlay-title="Open clipboard manager" { spawn "copyq" "toggle"; } +Mod+m hotkey-overlay-title="Select file and copy to clipboard" { spawn "alacritty" "-e" "select-and-copy"; } +Mod+escape hotkey-overlay-title="Suspend session" { spawn "bas" "suspend"; } +Mod+n hotkey-overlay-title="View notifications" { spawn "bas" "view_notifs"; } +Mod+p { spawn "bas"; } +Ctrl+XF86Tools { screenshot-screen; } +XF86Tools { screenshot; } +Shift+XF86Tools { screenshot-window; } +XF86AudioLowerVolume allow-when-locked=true { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1-"; } +XF86AudioRaiseVolume allow-when-locked=true { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1+"; } +XF86AudioMute allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle"; } +XF86AudioMicMute allow-when-locked=true { spawn-sh "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"; } +XF86MonBrightnessDown allow-when-locked=true { spawn "brightnessctl" "--class=backlight" "set" "10%-"; } +XF86MonBrightnessUp allow-when-locked=true { spawn "brightnessctl" "--class=backlight" "set" "+10%"; } +Mod+q { close-window; } +Mod+g { toggle-window-floating; } +Mod+Shift+f { fullscreen-window; } +Mod+f { maximize-column; } +Mod+t { toggle-column-tabbed-display; } +Mod+a { toggle-overview; } +Mod+l { focus-column-right; } +Mod+Right { focus-column-right; } +Mod+h { focus-column-left; } +Mod+Left { focus-column-left; } +Mod+j { focus-window-or-workspace-down; } +Mod+Down { focus-window-or-workspace-down; } +Mod+k { focus-window-or-workspace-up; } +Mod+Up { focus-window-or-workspace-up; } +Mod+TouchpadScrollLeft { focus-column-left; } +Mod+WheelScrollDown { focus-column-left; } +Mod+TouchpadScrollRight { focus-column-right; } +Mod+WheelScrollUp { focus-column-right; } +Mod+Shift+l { consume-or-expel-window-right; } +Mod+Shift+Right { consume-or-expel-window-right; } +Mod+Shift+h { consume-or-expel-window-left; } +Mod+Shift+Left { consume-or-expel-window-left; } +Mod+Shift+j { move-window-down-or-to-workspace-down; } +Mod+Shift+Down { move-window-down-or-to-workspace-down; } +Mod+Shift+k { move-window-up-or-to-workspace-up; } +Mod+Shift+Up { move-window-up-or-to-workspace-up; } +Mod+Ctrl+l { move-column-right; } +Mod+Ctrl+Right { move-column-right; } +Mod+Ctrl+h { move-column-left; } +Mod+Ctrl+Left { move-column-left; } +Mod+Ctrl+j { move-column-to-workspace-down; } +Mod+Ctrl+Down { move-column-to-workspace-down; } +Mod+Ctrl+k { move-column-to-workspace-up; } +Mod+Ctrl+Up { move-column-to-workspace-up; } +Mod+Ctrl+5 { move-column-to-workspace 5; } +Mod+5 { focus-workspace 5; } +Mod+Shift+5 { move-window-to-workspace 5; } +Mod+Ctrl+1 { move-column-to-workspace 1; } +Mod+Ctrl+2 { move-column-to-workspace 2; } +Mod+Ctrl+3 { move-column-to-workspace 3; } +Mod+Ctrl+4 { move-column-to-workspace 4; } +Mod+1 { focus-workspace 1; } +Mod+2 { focus-workspace 2; } +Mod+3 { focus-workspace 3; } +Mod+4 { focus-workspace 4; } +Mod+Shift+1 { move-window-to-workspace 1; } +Mod+Shift+2 { move-window-to-workspace 2; } +Mod+Shift+3 { move-window-to-workspace 3; } +Mod+Shift+4 { move-window-to-workspace 4; } +Mod+Shift+d { move-window-down; } +Mod+d { focus-window-down; } +Mod+Shift+s { move-window-up; } +Mod+s { focus-window-up; } +Mod+c { set-column-width "65%"; } +Mod+z { set-column-width "35%"; } +Mod+x { set-column-width "50%"; } + +//END SHCHEMES BLOCK +} diff --git a/home/.basilisk/niri/genbinds b/home/.basilisk/niri/genbinds new file mode 100755 index 0000000..9982602 --- /dev/null +++ b/home/.basilisk/niri/genbinds @@ -0,0 +1,91 @@ +#!/bin/sh + +awk -F '[\t ]*' ' +function rewriteLine() { + split(m[1], opts, ",") + for(optsI = 1; optsI < length(opts); optsI++) { + lines[linesLen++] = currentLineRewrite opts[optsI] substr(slice, mEnd) + } + currentLineRewrite = currentLineRewrite opts[optsI] +} +function rewriteLines() { + for(linesI = 0; linesI < linesLen; linesI++) { + currentLineRewrite="" + mI=1 # match index relative to head + mCount=0 + mEnd=0 + slice=lines[linesI] + while(mI != 0) { + mI = match(slice, /{([^}]*)}/, m) + if(mI == 0) { + currentLineRewrite = currentLineRewrite slice + continue + } else { + currentLineRewrite = currentLineRewrite substr(slice, 0, mI - 1) + } + mCount++ + mEnd = mI + length(m[0]) + rewriteLine() + slice = substr(slice, mEnd) + } + lines[linesI]=currentLineRewrite + } +} +function endBlock() { + if(blockState == 0) { + return + } + if(blockState == 1) { + delete bindLines + bindLinesCount=0 + blockState=0 + return + } + delete lines + lines[0]=body + linesLen=1 + rewriteLines() + body="" + for(i = 0; i < linesLen; i++) { + for(j = 0; j < bindLinesCount; j++) { + print bindLines[j][i] " { " lines[i] " }" + } + } + delete bindLines + bindLinesCount=0 + blockState=0 +} + +BEGIN { + blockState=0 + bindLinesCount=0 +} +/^[\t ]*\#/ || length($0) == 0 { next } +/^[^\t ].*/ { + if(blockState > 1) { + endBlock() + } + sub(/^[ \t]+/, ""); + sub(/[ \t]+$/, ""); + delete lines + lines[0]=$0 + linesLen=1 + rewriteLines() + for(i = 0; i < linesLen; i++) { + bindLines[bindLinesCount][i]=lines[i] + } + bindLinesCount++ + blockState=1 + next +} +/^[\t ]+/ && blockState > 0 { + blockState=2 + sub(/^[ \t]+/, ""); + sub(/[ \t]+$/, ""); + body=body " " $0 + next +} + +END { + endBlock() +}' ../binds diff --git a/home/.basilisk/niri/reload b/home/.basilisk/niri/reload new file mode 100755 index 0000000..05a1250 --- /dev/null +++ b/home/.basilisk/niri/reload @@ -0,0 +1,7 @@ +#!/bin/sh + +bas_root="$(dirname "$0")" + +export SCHEME="$(xrescat basilisk.theme)" +shchemes inject "${bas_root}/config.kdl" +"${bas_root}/genctl" diff --git a/home/.basilisk/share/wayland-sessions/basilisk.desktop b/home/.basilisk/share/wayland-sessions/basilisk.desktop new file mode 100644 index 0000000..77d04e9 --- /dev/null +++ b/home/.basilisk/share/wayland-sessions/basilisk.desktop @@ -0,0 +1,6 @@ +[Desktop Entry] +Name=Basilisk +Comment=A scrollable-tiling Wayland compositor +Exec=basilisk-session +Type=Application +DesktopNames=basilisk diff --git a/home/.basilisk/uninstall b/home/.basilisk/uninstall new file mode 100755 index 0000000..960f88b --- /dev/null +++ b/home/.basilisk/uninstall @@ -0,0 +1,5 @@ +#!/bin/sh + +rm /usr/bin/bas +rm /usr/bin/basilisk-session +rm /usr/share/wayland-sessions/basilisk.desktop diff --git a/home/.basilisk/waybar/animations.css b/home/.basilisk/waybar/animations.css new file mode 100644 index 0000000..16dfe5f --- /dev/null +++ b/home/.basilisk/waybar/animations.css @@ -0,0 +1,7 @@ +.module#workspaces button { + transition: 0.1s padding, 0.1s padding; +} + +#audio #pulseaudio.preview { + transition: 0.2s color; +} diff --git a/home/.basilisk/waybar/config.jsonc b/home/.basilisk/waybar/config.jsonc new file mode 100644 index 0000000..d38035e --- /dev/null +++ b/home/.basilisk/waybar/config.jsonc @@ -0,0 +1,125 @@ +{ + "modules-left": [ + "custom/power", + "custom/rofication", + "keyboard-state", + "niri/workspaces" + ], + "modules-center": [ + "niri/window" + ], + "modules-right": [ + "group/audio", + "tray", + "bluetooth", + "clock#hour", + "clock#minutes" + ], + "layer": "top", + "position": "left", + "width": 38, + "spacing": 0, + "custom/power": { + "format": "", + "on-click": "pkill rofi || rofi-power", + "return-type": "json" + }, + "custom/rofication": { + "format": "{icon}", + "format-icons": { + "none": "", + "some": "", + "critical": "", + "error": "" + }, + "interval": 2, + "on-click": "pkill rofication-gui || rofication-gui", + "exec": "rofication-status", + "return-type": "json" + }, + "keyboard-state": { + "numlock": true, + "capslock": true, + "format": { + "numlock": "N{icon}", + "capslock": "C{icon}" + }, + "format-icons": { + "locked": "", + "unlocked": "" + } + }, + "niri/workspaces": {}, + "niri/window": { + "format": "{}", + "rotate": 90 + }, + "pulseaudio#main": { + "format": "{icon}", + "format-bluetooth": "{icon}\n", + "format-icons": { + "alsa_output.pci-0000_00_1f.3.analog-stereo": "", + "alsa_output.pci-0000_00_1f.3.analog-stereo-muted": "", + "headphone": "", + "hands-free": "", + "headset": "", + "phone": "", + "phone-muted": "", + "default": [ + "", + "", + "" + ] + }, + "format-muted": "", + "scroll-step": 2, + "on-click": "pavucontrol" + }, + "pulseaudio#preview": { + "format": "{volume}%" + }, + "pulseaudio/slider": { + "min": 0, + "max": 100, + "orientation": "vertical" + }, + "group/audio": { + "orientation": "vertical", + "drawer": { + "transition-left-to-right": false, + "transition-duration": 200 + }, + "modules": [ + "pulseaudio#main", + "pulseaudio#preview", + "pulseaudio/slider" + ] + }, + "tray": { + "icon-size": 20, + "show-passive-items": true, + "spacing": 3 + }, + "bluetooth": { + "format": "", + "format-connected": "", + "tooltip-format": "{controller_alias}\t{controller_address}\n\n{num_connections} connected", + "tooltip-format-connected": "{controller_alias}\t{controller_address}\n\n{num_connections} connected\n\n{device_enumerate}", + "tooltip-format-enumerate-connected": "{device_alias}\t{device_address}", + "tooltip-format-enumerate-connected-battery": "{device_alias}\t{device_address}\t{device_battery_percentage}%" + }, + "clock#hour": { + "format": "{:%I}", + "tooltip": true, + "tooltip-format": "{:%Y-%m-%d}", + "max-length": 5, + "interval": 60 + }, + "clock#minutes": { + "format": "{:%M}", + "tooltip": true, + "tooltip-format": "{:%Y-%m-%d}", + "max-length": 5, + "interval": 60 + } +} \ No newline at end of file diff --git a/home/.basilisk/waybar/generate.js b/home/.basilisk/waybar/generate.js new file mode 100644 index 0000000..c0c06ed --- /dev/null +++ b/home/.basilisk/waybar/generate.js @@ -0,0 +1,192 @@ +import * as FS from 'fs/promises' +import * as Path from 'path' +import * as SASS from 'sass' + +let bar = {} + +// const Section = { +// START: 'modules-left', +// MIDDLE: 'modules-center', +// END: 'modules-right' +// } +const Section = { + START: 'modules-left', + MIDDLE: 'modules-center', + END: 'modules-right' +} + +function main() { + bar[Section.START] = [] + bar[Section.MIDDLE] = [] + bar[Section.END] = [] + + // bar.mode = 'overlay' + // bar.exclusive = true + // bar.position = 'top' + // bar.height = 28 + bar.layer = 'top' + bar.position = 'left' + // bar.width = 28 + bar.width = 38 + bar.spacing = 0 + + module('custom/power', { + format: "\ue8ac", + 'on-click': "pkill rofi || rofi-power", + // 'exec': "~/.config/waybar/watch-power-menu-state", + 'return-type': "json" + }, Section.START) + + module('custom/rofication', { + format: "{icon}", + 'format-icons': { + "none": "\ue7f4", + "some": "\uf4fe", + "critical": "\uf4fe", + "error": "\ue004" + }, + 'interval': 2, + 'on-click': "pkill rofication-gui || rofication-gui", + 'exec': "rofication-status", + 'return-type': "json" + }, Section.START) + + module('keyboard-state', { + "numlock": true, + "capslock": true, + "format": { + "numlock": "N{icon}", + "capslock": "C{icon}" + }, + "format-icons": { + "locked": "", + "unlocked": "" + } + }, Section.START) + + module('niri/workspaces', { + // format: "" + }, Section.START) + + module('niri/window', { + format: "{}", + rotate: 90 + }, Section.MIDDLE) + + // module('temperature', { + // format: "{temperatureC}°C" + // }, Section.END) + + group('group/audio', { + orientation: 'vertical', + drawer: { + 'transition-left-to-right': false, + 'transition-duration': 200 + } + }, [ + component('pulseaudio#main', { + format: "{icon}", + // 'format-bluetooth': "{icon}\n\ue1a8", + "format-icons": { + "alsa_output.pci-0000_00_1f.3.analog-stereo": "\ue050", + "alsa_output.pci-0000_00_1f.3.analog-stereo-muted": "\ue04f", + "headphone": "\uf01f", + "hands-free": "\uf324", + "headset": "\ue311", + "phone": "\ue9cd", + "phone-muted": "\ue9cc", + "default": ["\ue04e", "\ue04d", "\ue050" ] + }, + "format-muted": "\ue04f", + // "format-icons": { + // "mute": "\ue04e", + // "quiet": "\ue04d", + // "medium": "\ue050", + // "loud": "\ue050" + // }, + // states: [ "mute", "quiet", "medium", "loud" ], + 'scroll-step': 2, + 'on-click': 'pavucontrol' + }), + component('pulseaudio#preview', { + format: "{volume}%", + // rotate: 90 + }), + component('pulseaudio/slider', { + "min": 0, + "max": 100, + "orientation": "vertical" + }) + ], Section.END) + + module('tray', { + 'icon-size': 20, + 'show-passive-items': true, + 'spacing': 3 + }, Section.END) + + module('bluetooth', { + "format": "\ue1a7", + "format-connected": "\ue1a8", + // "format-connected-battery": "\ue1a8", + "tooltip-format": "{controller_alias}\t{controller_address}\n\n{num_connections} connected", + "tooltip-format-connected": "{controller_alias}\t{controller_address}\n\n{num_connections} connected\n\n{device_enumerate}", + "tooltip-format-enumerate-connected": "{device_alias}\t{device_address}", + "tooltip-format-enumerate-connected-battery": "{device_alias}\t{device_address}\t{device_battery_percentage}%" + }, Section.END) + + // module('upower', { + // "icon-size": 20, + // "hide-if-empty": true, + // "tooltip": true, + // "tooltip-spacing": 20, + // // 'show-icon': false, + // }, Section.END) + + + const clockCommon = { + tooltip: true, + "tooltip-format": "{:%Y-%m-%d}", + "max-length": 5, + "interval": 60, + } + module('clock#hour', { + "format": "{:%I}", + ...clockCommon + }, Section.END) + + module('clock#minutes', { + "format": "{:%M}", + ...clockCommon + }, Section.END) + + // module('power', {}) +} + +function module(name, config, position) { + component(name, config) + bar[position].push(name) +} + +function component(name, config) { + bar[name] = config + return name +} + +function group(name, options, components, position) { + let d = { + ...options, + modules: components + } + module(name, d, position) +} + +main() +await FS.writeFile( + Path.join(import.meta.dirname, 'config.jsonc'), + JSON.stringify(bar, null, 4) +) +// await FS.writeFile( +// Path.join(import.meta.dirname, 'style.css'), +// await SASS.compileAsync('style.scss').then(r => r.css) +// ) diff --git a/home/.basilisk/waybar/package-lock.json b/home/.basilisk/waybar/package-lock.json new file mode 100644 index 0000000..75e74bb --- /dev/null +++ b/home/.basilisk/waybar/package-lock.json @@ -0,0 +1,490 @@ +{ + "name": "waybar", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "dependencies": { + "sass": "^1.94.2" + } + }, + "node_modules/@parcel/watcher": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.5.1.tgz", + "integrity": "sha512-dfUnCxiN9H4ap84DvD2ubjw+3vUNpstxa0TneY/Paat8a3R4uQZDLSvWjmznAY/DoahqTHl9V46HF/Zs3F29pg==", + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "dependencies": { + "detect-libc": "^1.0.3", + "is-glob": "^4.0.3", + "micromatch": "^4.0.5", + "node-addon-api": "^7.0.0" + }, + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "@parcel/watcher-android-arm64": "2.5.1", + "@parcel/watcher-darwin-arm64": "2.5.1", + "@parcel/watcher-darwin-x64": "2.5.1", + "@parcel/watcher-freebsd-x64": "2.5.1", + "@parcel/watcher-linux-arm-glibc": "2.5.1", + "@parcel/watcher-linux-arm-musl": "2.5.1", + "@parcel/watcher-linux-arm64-glibc": "2.5.1", + "@parcel/watcher-linux-arm64-musl": "2.5.1", + "@parcel/watcher-linux-x64-glibc": "2.5.1", + "@parcel/watcher-linux-x64-musl": "2.5.1", + "@parcel/watcher-win32-arm64": "2.5.1", + "@parcel/watcher-win32-ia32": "2.5.1", + "@parcel/watcher-win32-x64": "2.5.1" + } + }, + "node_modules/@parcel/watcher-android-arm64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-android-arm64/-/watcher-android-arm64-2.5.1.tgz", + "integrity": "sha512-KF8+j9nNbUN8vzOFDpRMsaKBHZ/mcjEjMToVMJOhTozkDonQFFrRcfdLWn6yWKCmJKmdVxSgHiYvTCef4/qcBA==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-darwin-arm64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-arm64/-/watcher-darwin-arm64-2.5.1.tgz", + "integrity": "sha512-eAzPv5osDmZyBhou8PoF4i6RQXAfeKL9tjb3QzYuccXFMQU0ruIc/POh30ePnaOyD1UXdlKguHBmsTs53tVoPw==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-darwin-x64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-x64/-/watcher-darwin-x64-2.5.1.tgz", + "integrity": "sha512-1ZXDthrnNmwv10A0/3AJNZ9JGlzrF82i3gNQcWOzd7nJ8aj+ILyW1MTxVk35Db0u91oD5Nlk9MBiujMlwmeXZg==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-freebsd-x64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-freebsd-x64/-/watcher-freebsd-x64-2.5.1.tgz", + "integrity": "sha512-SI4eljM7Flp9yPuKi8W0ird8TI/JK6CSxju3NojVI6BjHsTyK7zxA9urjVjEKJ5MBYC+bLmMcbAWlZ+rFkLpJQ==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm-glibc": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-glibc/-/watcher-linux-arm-glibc-2.5.1.tgz", + "integrity": "sha512-RCdZlEyTs8geyBkkcnPWvtXLY44BCeZKmGYRtSgtwwnHR4dxfHRG3gR99XdMEdQ7KeiDdasJwwvNSF5jKtDwdA==", + "cpu": [ + "arm" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm-musl": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-musl/-/watcher-linux-arm-musl-2.5.1.tgz", + "integrity": "sha512-6E+m/Mm1t1yhB8X412stiKFG3XykmgdIOqhjWj+VL8oHkKABfu/gjFj8DvLrYVHSBNC+/u5PeNrujiSQ1zwd1Q==", + "cpu": [ + "arm" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm64-glibc": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-glibc/-/watcher-linux-arm64-glibc-2.5.1.tgz", + "integrity": "sha512-LrGp+f02yU3BN9A+DGuY3v3bmnFUggAITBGriZHUREfNEzZh/GO06FF5u2kx8x+GBEUYfyTGamol4j3m9ANe8w==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm64-musl": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-musl/-/watcher-linux-arm64-musl-2.5.1.tgz", + "integrity": "sha512-cFOjABi92pMYRXS7AcQv9/M1YuKRw8SZniCDw0ssQb/noPkRzA+HBDkwmyOJYp5wXcsTrhxO0zq1U11cK9jsFg==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-x64-glibc": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-glibc/-/watcher-linux-x64-glibc-2.5.1.tgz", + "integrity": "sha512-GcESn8NZySmfwlTsIur+49yDqSny2IhPeZfXunQi48DMugKeZ7uy1FX83pO0X22sHntJ4Ub+9k34XQCX+oHt2A==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-x64-musl": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-musl/-/watcher-linux-x64-musl-2.5.1.tgz", + "integrity": "sha512-n0E2EQbatQ3bXhcH2D1XIAANAcTZkQICBPVaxMeaCVBtOpBZpWJuf7LwyWPSBDITb7In8mqQgJ7gH8CILCURXg==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-win32-arm64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-arm64/-/watcher-win32-arm64-2.5.1.tgz", + "integrity": "sha512-RFzklRvmc3PkjKjry3hLF9wD7ppR4AKcWNzH7kXR7GUe0Igb3Nz8fyPwtZCSquGrhU5HhUNDr/mKBqj7tqA2Vw==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-win32-ia32": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-ia32/-/watcher-win32-ia32-2.5.1.tgz", + "integrity": "sha512-c2KkcVN+NJmuA7CGlaGD1qJh1cLfDnQsHjE89E60vUEMlqduHGCdCLJCID5geFVM0dOtA3ZiIO8BoEQmzQVfpQ==", + "cpu": [ + "ia32" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-win32-x64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-x64/-/watcher-win32-x64-2.5.1.tgz", + "integrity": "sha512-9lHBdJITeNR++EvSQVUcaZoWupyHfXe1jZvGZ06O/5MflPcuPLtEphScIBL+AiCWBO46tDSHzWyD0uDmmZqsgA==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "license": "MIT", + "optional": true, + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/chokidar": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "license": "MIT", + "dependencies": { + "readdirp": "^4.0.1" + }, + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/detect-libc": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", + "integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==", + "license": "Apache-2.0", + "optional": true, + "bin": { + "detect-libc": "bin/detect-libc.js" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "license": "MIT", + "optional": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/immutable": { + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-5.1.4.tgz", + "integrity": "sha512-p6u1bG3YSnINT5RQmx/yRZBpenIl30kVxkTLDyHLIMk0gict704Q9n+thfDI7lTRm9vXdDYutVzXhzcThxTnXA==", + "license": "MIT" + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "license": "MIT", + "optional": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "license": "MIT", + "optional": true, + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/node-addon-api": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.1.tgz", + "integrity": "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==", + "license": "MIT", + "optional": true + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/readdirp": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", + "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", + "license": "MIT", + "engines": { + "node": ">= 14.18.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/sass": { + "version": "1.94.2", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.94.2.tgz", + "integrity": "sha512-N+7WK20/wOr7CzA2snJcUSSNTCzeCGUTFY3OgeQP3mZ1aj9NMQ0mSTXwlrnd89j33zzQJGqIN52GIOmYrfq46A==", + "license": "MIT", + "dependencies": { + "chokidar": "^4.0.0", + "immutable": "^5.0.2", + "source-map-js": ">=0.6.2 <2.0.0" + }, + "bin": { + "sass": "sass.js" + }, + "engines": { + "node": ">=14.0.0" + }, + "optionalDependencies": { + "@parcel/watcher": "^2.4.1" + } + }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "license": "MIT", + "optional": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + } + } +} diff --git a/home/.basilisk/waybar/package.json b/home/.basilisk/waybar/package.json new file mode 100644 index 0000000..625639f --- /dev/null +++ b/home/.basilisk/waybar/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "sass": "^1.94.2" + } +} diff --git a/home/.basilisk/waybar/style.css b/home/.basilisk/waybar/style.css new file mode 100644 index 0000000..d51d93a --- /dev/null +++ b/home/.basilisk/waybar/style.css @@ -0,0 +1,200 @@ +/*START SHCHEMES BLOCK : shchemes create_theme gtk3*/ +@define-color a #ff5533; +@define-color iiv #000000; +@define-color iv #111111; +@define-color v #00bbbb; +@define-color vi #aaaaaa; +@define-color vii #ffffff; + +/*END SHCHEMES BLOCK*/ +@define-color border-sides alpha(#fff, 0.1); +@define-color border-highlight alpha(#fff, 0.2); +@define-color border-bottom alpha(#666, 0.1); + +* { + all: initial; + font-family: "Noto Sans Mono", "Material Symbols Outlined", sans-serif; + font-size: 12px; + border-radius: 0; +} + +window#waybar { + background: transparent; + color: #ffffff; +/* transition-property: background-color; + transition-duration: 0.5s;*/ + padding: 4px; + /* padding: 6px; */ +} + +/*window#waybar.hidden { + opacity: 0.2; +}*/ + +tooltip { + background-color: alpha(@iiv, 0.9); + border: 1px solid @border-sides; +} + +#waybar > box { + padding: 4px; + background-color: alpha(@iiv, 0.9); +} + +.modules-right .module, .modules-left .module { + margin: 3px 0; + padding: 3px; + border: 1px solid @border-sides; + border-top: 1px solid @border-highlight; + border-bottom: 1px solid @border-bottom; + background: @iv; + color: @vii; +} +.modules-right > :last-child .module, .modules-left > :last-child .module { + margin-bottom: 0; +} +.modules-right > :first-child .module, .modules-left > :first-child .module { + margin-top: 0; +} + +#pulseaudio.main, #bluetooth, #custom-power, #custom-rofication { + font-size: 20px; + font-weight: 300; + transition: 0.2s color; + padding-top: 4px; + padding-bottom: 2px; +} +#pulseaudio.main:hover, #bluetooth:hover, #custom-power:hover, #custom-rofication:hover { + color: @a; +} + +#bluetooth { + padding: 3px 0; +} + +#audio #pulseaudio.preview { + border: 0; + padding: 0; + margin: 0; + background: @iiv; + color: transparent; + transition: 0.2s color; + background: transparent; +} +#audio:hover #pulseaudio.main { + border-top: 0; + margin-top: 0; +} +#audio:hover #pulseaudio.preview { + color: @vi; +} + +#pulseaudio-slider { + padding: 0; + margin: 0; + border: 1px solid @border-sides; + border-top: 1px solid @border-highlight; + border-bottom: 0; +} + +#pulseaudio-slider slider { + min-height: 0px; + min-width: 0px; + opacity: 0; + background-image: none; + box-shadow: none; + min-width: 28px; +} + +#pulseaudio-slider slider { + border-top: 1px solid @border-highlight; +} + +#pulseaudio-slider trough { + min-height: 100px; + background: @iiv; +} + +#pulseaudio-slider highlight { + min-width: 10px; + background: @iv; +} + +.module button:hover { +/* background: #ffffff; */ + transition-property: background-color; + transition-duration: 0.5s; +} + +.module#workspaces { + padding: 0; + background: @iiv; + font-size: 4px; +} +.module#workspaces button { +/* transition: 0.15s padding; */ + border: 1px solid @iiv; + border-right: 0; + border-left: 0; + padding-bottom: 3px; +} +.module#workspaces button label { + color: @vii; +} +.module#workspaces button:first-child, +.module#workspaces button.focused ~ button, .module#workspaces button:hover ~ button:not(.focused) { + padding-top: 3px; +} +.module#workspaces button:hover, .module#workspaces button.focused ~ button:hover { + background: inherit; + border-color: @iv; + padding: 16px 0; +} +.module#workspaces button.empty label { + color: @vi; +} +.module#workspaces button.focused { + padding: 16px 0; + background: @iv; + border-top: 1px solid @border-sides; + border-bottom: 1px solid @border-bottom; +} +.module#workspaces button.focused label { + color: @v; +} +.module#workspaces button:first-child { + border-top: none; +} +.module#workspaces button:last-child { + border-bottom: none; +} + +#clock { + font-size: 18px; +} + +.module#clock.hour { + color: @v; + padding-bottom: 0; + margin-bottom: 0; + border-bottom: 0; + font-weight: 600; +} + +.module#clock.minutes { + background: @iiv; + padding-top: 0; + margin-top: 0; + border-top: 0; + font-weight: 300; +} +/*START SHCHEMES BLOCK : [ ! "$(xrescat basilisk.animations.panel)" == "0" ] && cat animations.css*/ +.module#workspaces button { + transition: 0.1s padding, 0.1s padding; +} + +#audio #pulseaudio.preview { + transition: 0.2s color; +} + +/*END SHCHEMES BLOCK*/ diff --git a/home/.basilisk/waybar/style.scss b/home/.basilisk/waybar/style.scss new file mode 100644 index 0000000..bc06fc3 --- /dev/null +++ b/home/.basilisk/waybar/style.scss @@ -0,0 +1,225 @@ +$iiv: #000; +$iv: #111; +$v: #0bb; +$vi: #aaa; +$vii: #fff; +$a: #f53; + +* { + font-family: 'Noto Sans Mono', 'Material Symbols Outlined', sans-serif; + font-size: 12px; + border-radius: 0; +} + +window#waybar { + // background: linear-gradient(to left, transparentize(#000, 0.6), transparentize(#000, 0)); + background: #0000; + color: #ffffff; + transition-property: background-color; + transition-duration: .5s; + + padding: 4px; + // padding-right: 0; + // padding: 2px; + +/* padding: 6px; */ +} + +window#waybar.hidden { + opacity: 0.2; +} + +// #waybar > * { +// } + +button { + padding: 0; +} + +.box { +} + +#waybar > box { + // margin: 4px; + // margin-right: 0; + + // background: linear-gradient(to right, transparentize(#000, 0), transparentize(#000, 1)); + + padding: 4px; + // border-right: 1px solid $iv; + background-color: transparentize($iiv, 0.1); +} + +.modules-right, .modules-left { + + + // background: linear-gradient(to bottom, lighten($iv, 10%), darken($iv, 10%)); + + // background: + + // border-top-color: transparentize(lighten($iiv, 15%), 0.6); + // border-bottom-color: transparentize(darken($iiv, 15%), 0.5); + + .module { + margin: 3px 0; + padding: 3px; + // padding: 0; + border: 1px solid transparentize(#fff, 0.9); + border-top: 1px solid transparentize(#fff, 0.8); + border-bottom: 1px solid transparentize(#666, 0.9); + // background-color: transparentize($iiv, 0.2); + background: $iv; + color: $vii; + } + + & > :last-child .module { + margin-bottom: 0; + // padding-bottom: 6px; + } + + & > :first-child .module { + margin-top: 0; + + // padding-top: 6px; + } +} + +#window { + // padding: 0; + +} + +#pulseaudio.main, #bluetooth, #custom-power, #custom-rofication { + font-size: 20px; + font-weight: 300; +} + +#custom-power, #custom-rofication { + padding-top: 4px; + padding-bottom: 2px; // Cheat squareness +} + +#audio { + #pulseaudio.preview { + border: 0; + padding: 0; + margin: 0; + background: $iiv; + color: #0000; + transition: .2s color; + } + + &:hover { + #pulseaudio.main { + border-top: 0; + margin-top: 0; + } + + #pulseaudio.preview { + background: transparent; + color: $vi; + } + } +} + +#pulseaudio-slider { + padding: 0; + margin: 0; + border: 0; +} +#pulseaudio-slider slider { +min-height: 0px; +min-width: 0px; +opacity: 0; +background-image: none; +border: none; +box-shadow: none; +} +#pulseaudio-slider trough { +min-height: 100px; +min-width: 28px; +background: $iiv; +border: 1px solid transparentize(#fff, 0.9); +border-top: 1px solid transparentize(#fff, 0.8); +border-bottom: 0; +} +#pulseaudio-slider highlight { +min-width: 10px; +background: $iv; +border: 1px solid transparentize(#fff, 0.9); +border-top: 1px solid transparentize(#fff, 0.8); +border-bottom: 0 +} + +.module button:hover { + background: #ffffff; + transition-property: background-color; + transition-duration: .5s; +} + +.module#workspaces { + + padding: 0; + // border: 0; + background: $iiv; + font-size: 4px; + + button { + // border-top: 2px solid transparentize(#fff, 0.9); + padding: 0; + margin: 0; + transition: .15s padding; + color: $vii; + + &:hover { + background: inherit; + border: 0; + padding: 18px 0; + } + } + + button.empty { + color: $vi; + } + + button.focused { + padding: 18px 0; + background: $iv; + color: $v; + + &:not(:first-child) { + border-top: 1px solid transparentize(#fff, 0.9); + } + + &:not(:last-child) { + border-bottom: 1px solid transparentize(#666, 0.9); + } + } +} + +// #tray { +// border-bottom: 0; +// margin-bottom: 0; +// } +// #bluetooth { +// margin-top: 0; +// border-top: 0; +// } + +#clock { + font-size: 18px; +} +.module#clock.hour { + color: $v; + padding-bottom: 0; + margin-bottom: 0; + border-bottom: 0; + font-weight: 600; +} +.module#clock.minutes { + background: $iiv; + padding-top: 0; + margin-top: 0; + border-top: 0; + font-weight: 300; +} diff --git a/home/.basilisk/waybar/watch-power-menu-state b/home/.basilisk/waybar/watch-power-menu-state new file mode 100755 index 0000000..2c1e300 --- /dev/null +++ b/home/.basilisk/waybar/watch-power-menu-state @@ -0,0 +1,4 @@ +#!/bin/sh + +touch /tmp/rofi-power-state +tail -f /tmp/rofi-power-state | awk '{ print "{\"text\":\"test\",\"class\":\"" $0 "\"}" }' diff --git a/lib/shchemes b/lib/shchemes index 909416b..e859424 160000 --- a/lib/shchemes +++ b/lib/shchemes @@ -1 +1 @@ -Subproject commit 909416b503d46051195915cdf2fc9a1e2a907f36 +Subproject commit e859424677b0e94fc2de081c24dc5c07c4532b6a diff --git a/paths b/paths index eea8949..20dea7a 100644 --- a/paths +++ b/paths @@ -1,6 +1,5 @@ /etc/keyd /home/olive/.config/xfce4 -/home/olive/.config/anyrun /home/olive/.config/cosmic /home/olive/.config/qutebrowser /home/olive/.local/share/qutebrowser/userscripts