diff options
| author | Fuwn <[email protected]> | 2024-06-25 23:09:23 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-06-25 23:09:23 -0700 |
| commit | 99bc7c2004e287ddb58ac2c9fbb058aed38b9fe8 (patch) | |
| tree | 56430be55298e1bbc7405457fa04fc133b74d080 | |
| parent | hi (diff) | |
| download | nixos-config-99bc7c2004e287ddb58ac2c9fbb058aed38b9fe8.tar.xz nixos-config-99bc7c2004e287ddb58ac2c9fbb058aed38b9fe8.zip | |
update
23 files changed, 430 insertions, 799 deletions
diff --git a/meta/audio/default.nix b/meta/audio/default.nix new file mode 100644 index 0000000..8768f34 --- /dev/null +++ b/meta/audio/default.nix @@ -0,0 +1,6 @@ +{ pkgs, ... }: { + home.packages = with pkgs; [ + blueberry + pavucontrol + ]; +} diff --git a/meta/default.nix b/meta/default.nix index 0086e7e..6d6bf65 100644 --- a/meta/default.nix +++ b/meta/default.nix @@ -1,5 +1,6 @@ _: { imports = [ + ./audio ./bitwarden ./calculator ./desktop diff --git a/meta/desktop/wayland/hyprland/default.nix b/meta/desktop/wayland/hyprland/default.nix index 46ba5c4..d371cb0 100644 --- a/meta/desktop/wayland/hyprland/default.nix +++ b/meta/desktop/wayland/hyprland/default.nix @@ -1,22 +1,20 @@ { pkgs, ... }: { - # Insipration - # https://github.com/codingjerk/dotfiles/blob/main/config/hypr/hyprland.conf - # https://github.com/JoshM-Yoru/dotfiles/blob/main/hypr/hyprland.conf - # https://github.com/end-4/dots-hyprland/blob/main/.config/hypr/hyprland.conf - # https://github.com/Andy3153/hyprland-rice imports = [ ./hypridle - # ./pyprland ./hyprland ]; + wayland.windowManager.hyprland = { enable = true; package = pkgs.hyprland; + xwayland = { enable = true; }; + systemd = { enable = true; + variables = [ "--all" ]; }; }; diff --git a/meta/desktop/wayland/hyprland/hypridle/default.nix b/meta/desktop/wayland/hyprland/hypridle/default.nix index 78e0153..03d670c 100644 --- a/meta/desktop/wayland/hyprland/hypridle/default.nix +++ b/meta/desktop/wayland/hyprland/hypridle/default.nix @@ -1,19 +1,19 @@ { pkgs, ... }: { - # exec-once = swayidle timeout 600 '[ $(pgrep -x hyprlock || pgrep -x swaylock) ] || (hyprctl dispatcher dpms off && hyprlock)' services.hypridle = { enable = true; + settings = { "$lock_command" = "pidof hyprlock || hyprlock"; - # $suspend_command = pidof steam || systemctl suspend || loginctl suspend # fuck nvidia + # $suspend_command = pidof steam || systemctl suspend || loginctl suspend + general = { lock_cmd = "$lock_command"; - # before_sleep_cmd = $suspend_command before_sleep_cmd = "playerctl pause"; - ignore_dbus_inhibit = false; ignore_systemd_inhibit = false; }; + listener = [ { timeout = 180; # 3 minutes diff --git a/meta/desktop/wayland/hyprland/hyprland/binds.nix b/meta/desktop/wayland/hyprland/hyprland/binds.nix index 30ac4e1..5312b93 100644 --- a/meta/desktop/wayland/hyprland/hyprland/binds.nix +++ b/meta/desktop/wayland/hyprland/hyprland/binds.nix @@ -133,7 +133,8 @@ _: { "$mod, Print, exec, screenshot --now" "$mod SHIFT, v, exec, screenshot --now --clipboard && pypr toggle spgpt && ydotool key 42:1 1:1 1:0 42:0 29:1 47:1 29:0 47:0" - # Skipping media keys for now + # Media keys + # ... ] ); diff --git a/meta/desktop/wayland/hyprland/hyprland/decoration.nix b/meta/desktop/wayland/hyprland/hyprland/decoration.nix index ffabda8..feb9145 100644 --- a/meta/desktop/wayland/hyprland/hyprland/decoration.nix +++ b/meta/desktop/wayland/hyprland/hyprland/decoration.nix @@ -1,7 +1,6 @@ _: { wayland.windowManager.hyprland.settings.decoration = { rounding = 10; - drop_shadow = true; shadow_ignore_window = true; shadow_range = 8; diff --git a/meta/desktop/wayland/hyprland/hyprland/default.nix b/meta/desktop/wayland/hyprland/hyprland/default.nix index 9d0af4c..e2538fd 100644 --- a/meta/desktop/wayland/hyprland/hyprland/default.nix +++ b/meta/desktop/wayland/hyprland/hyprland/default.nix @@ -32,6 +32,7 @@ _: { builtins.listToAttrs (map (script: { name = "hypr/hyprland/scripts/${script}"; + value = { source = ./scripts/${script}; }; diff --git a/meta/desktop/wayland/hyprland/hyprland/environment.nix b/meta/desktop/wayland/hyprland/hyprland/environment.nix index 00a7e66..81046ff 100644 --- a/meta/desktop/wayland/hyprland/hyprland/environment.nix +++ b/meta/desktop/wayland/hyprland/hyprland/environment.nix @@ -15,7 +15,7 @@ let cursorSize = "18"; in "GDK_BACKEND, wayland,x11,*" "SDL_VIDEODRIVER, wayland" "CLUTTER_BACKEND, wayland" - "XWAYLAND_NO_GLAMOR, 1" # With this, you'll need to use gamescope for gaming. + "XWAYLAND_NO_GLAMOR, 1" # Gamescope # Nvidia "LIBVA_DRIVER_NAME, nvidia" @@ -62,8 +62,8 @@ let cursorSize = "18"; in # https://fcitx-im.org/wiki/Using_Fcitx_5_on_Wayland "QT_IM_MODULE, fcitx" "XMODIFIERS, @im=fcitx" - # "GTK_IM_MODULE, wayland" # Crashes Electron apps in Xwayland - # "GTK_IM_MODULE, fcitx" # My Gtk apps no longer require this to work with fcitx5. Hmm. + # "GTK_IM_MODULE, wayland" + # "GTK_IM_MODULE, fcitx" "SDL_IM_MODULE, fcitx" "GLFW_IM_MODULE, ibus" "INPUT_METHOD, fcitx" diff --git a/meta/desktop/wayland/hyprland/hyprland/general.nix b/meta/desktop/wayland/hyprland/hyprland/general.nix index 270fa1c..e0821d5 100644 --- a/meta/desktop/wayland/hyprland/hyprland/general.nix +++ b/meta/desktop/wayland/hyprland/hyprland/general.nix @@ -13,13 +13,9 @@ _: { gaps_in = 5; gaps_out = 10; border_size = 0; - layout = "master"; - allow_tearing = true; - resize_on_border = true; - no_focus_fallback = true; }; @@ -29,14 +25,9 @@ _: { # kb_model = # kb_options = # kb_rules = - - # repeat_rate = 50; - # repeat_delay = 200; - repeat_rate = 35; - repeat_delay = 250; - + repeat_rate = 35; # 50 + repeat_delay = 250; # 200 follow_mouse = 1; - special_fallthrough = true; touchpad = { @@ -62,14 +53,11 @@ _: { dwindle = { pseudotile = true; - preserve_split = true; force_split = 2; smart_split = false; smart_resizing = false; - no_gaps_when_only = 0; - special_scale_factor = 0.98; }; @@ -96,25 +84,19 @@ _: { misc = { vrr = false; vfr = false; - enable_swallow = true; swallow_regex = "^(kitty|footclient|foot|Alacritty|wezterm)$"; - disable_hyprland_logo = true; disable_splash_rendering = true; force_default_wallpaper = 0; - mouse_move_enables_dpms = true; # key_press_enables_dpms = true; - # focus_on_activate = true; animate_manual_resizes = true; # animate_mouse_windowdragging = false; mouse_move_focuses_monitor = true; - # new_window_takes_over_fullscreen = 2; allow_session_lock_restore = true; - initial_workspace_tracking = false; }; diff --git a/meta/desktop/wayland/hyprland/hyprland/scripts/initialise_waybar b/meta/desktop/wayland/hyprland/hyprland/scripts/initialise_waybar index ff4a25f..09f7ff9 100755 --- a/meta/desktop/wayland/hyprland/hyprland/scripts/initialise_waybar +++ b/meta/desktop/wayland/hyprland/hyprland/scripts/initialise_waybar @@ -4,19 +4,16 @@ CONFIG_FILES="${HOME}/.config/waybar/config.json ${HOME}/.config/waybar/default- trap "pkill -x waybar" EXIT -# Initial copy of colors \cp -r ~/.cache/wal/colors-waybar.css ~/.config/waybar/ while true; do - # If Waybar is not running, start it if ! pgrep -x "waybar" >/dev/null; then waybar -c ~/.config/waybar/config.json -s ~/.config/waybar/style.css & fi - # Wait for changes in the configuration files inotifywait -e create,modify ${CONFIG_FILES} - # Kill Waybar gracefully and wait until it's completely terminated pkill -x waybar + while pgrep -x waybar >/dev/null; do sleep 0.5; done done diff --git a/meta/desktop/wayland/hyprland/hyprland/scripts/move_window_to_monitor b/meta/desktop/wayland/hyprland/hyprland/scripts/move_window_to_monitor index 76fd463..06e4f94 100755 --- a/meta/desktop/wayland/hyprland/hyprland/scripts/move_window_to_monitor +++ b/meta/desktop/wayland/hyprland/hyprland/scripts/move_window_to_monitor @@ -5,10 +5,8 @@ target_monitor=$(get_relative_target_monitor "$1") target_workspace=$(get_active_workspace "${target_monitor}") -# # Get the empty workspace on the target monitor, if available # target_workspace=$(get_empty_workspace $target_monitor) -# # If no empty workspace is found, fall back to the active workspace # if [[ -z "$target_workspace" ]]; then # target_workspace=$(get_active_workspaces $target_monitor | head -n 1) # fi diff --git a/meta/desktop/wayland/hyprland/hyprland/scripts/source/screenshot.ab b/meta/desktop/wayland/hyprland/hyprland/scripts/source/screenshot.ab deleted file mode 100644 index 6bc510d..0000000 --- a/meta/desktop/wayland/hyprland/hyprland/scripts/source/screenshot.ab +++ /dev/null @@ -1,158 +0,0 @@ -let current_date_time = unsafe $date +%Y-%m-%d-%H-%M-%S$ -let output_directory = "{unsafe $xdg-user-dir PICTURES$}/Screenshots" -let output_file = "Screenshot_{current_date_time}_{unsafe $echo \$RANDOM$}.png" - -fun notify_command(message: Text): Null { - unsafe $notify-send -h string:x-canonical-private-synchronous:shot-notify -u low "{message}"$ -} - -fun notify(clipboard: Bool, type: Text): Null { - notify_command("Screenshot copied to clipboard. ({type})") - - if not clipboard { - if unsafe $test -f "{output_directory}/{output_file}" && - echo 'true' || - echo 'false'$ == "true" - { - // unsafe $feh "{output_directory}/{output_file}"$ - - notify_command("Screenshot saved. ({type})") - } else { - notify_command("Screenshot deleted.") - } - } -} - -fun get_hyprctl_monitors(): Text { - return $hyprctl monitors -j || true$ failed { - notify_command("Failed to get monitors.") - - fail status - } -} - -fun get_focused_monitor(): Text { - let monitors = get_hyprctl_monitors() failed { - notify_command("Failed to get monitors.") - - fail status - } - - return $echo {monitors} | jq -r '.[] | select(.focused) | .name'$ failed { - notify_command("Failed to get focused monitor.") - - fail status - } -} - -fun screenshot_now(clipboard: Bool): Null { - if clipboard { - unsafe $(grim - || true) | wl-copy$ - } else { - unsafe $cd "{output_directory}" && - grim - | - tee "{output_file}" | - wl-copy$ - } - - notify(clipboard, "now") -} - -fun screenshot_window(clipboard: Bool): Null { - let width_position = unsafe $hyprctl activewindow | - grep 'at:' | - cut -d':' -f2 | - tr -d ' ' | - tail -n1$ - let width_size = unsafe $hyprctl activewindow | - grep 'size:' | - cut -d':' -f2 | - tr -d ' ' | - tail -n1 | - sed s/,/x/g$ - - if clipboard { - unsafe $grim -g "{width_position} {width_size}" - | wl-copy$ - } else { - unsafe $cd "{output_directory}" && - grim -g "{width_position} {width_size}" - | - tee "{output_file}" | - wl-copy$ - } - - notify(clipboard, "window") -} - -fun screenshot_monitor(clipboard: Bool): Null { - if clipboard { - unsafe $grim -o "{get_focused_monitor()}" - | wl-copy$ - } else { - unsafe $cd "{output_directory}" && - grim -o "{get_focused_monitor()}" - | - tee "{output_file}" | - wl-copy$ - } - - notify(clipboard, "monitor") -} - -fun screenshot_area(clipboard: Bool): Null { - // slurp -b 1B1F28CC -c E06B74ff -s C778DD0D -w 2 - - if clipboard { - unsafe $grim -g "{unsafe $slurp$}" - | wl-copy$ - } else { - unsafe $cd "{output_directory}" && - grim -g "{unsafe $slurp$}" - | - tee "{output_file}" | - wl-copy$ - } - - notify(clipboard, "area") -} - -fun screenshot(mode: Text, clipboard: Bool): Null { - if { - mode == "now" { - screenshot_now(clipboard) - } - mode == "window" { - screenshot_window(clipboard) - } - mode == "monitor" { - screenshot_monitor(clipboard) - } - mode == "area" { - screenshot_area(clipboard) - } - else { - echo "usage: {unsafe $echo "\${0}"$} [flags]\n" - echo "flags:" - echo " --now" - echo " --window" - echo " --area" - echo " --monitor" - echo " --clipboard" - echo " --help" - echo "" - } - } -} - -main { - if unsafe $test -d "{output_directory}" && - echo 'true' || - echo 'false'$ == "false" - { - $mkdir -p "{output_directory}"$ failed { - notify_command("Failed to create output directory.") - - fail status - } - } - - screenshot( - unsafe $echo "\${1}" | sed -E s/--//g$, - unsafe $echo "\${2}"$ == "--clipboard" - ) -} diff --git a/meta/desktop/wayland/hyprland/pyprland/default.nix b/meta/desktop/wayland/hyprland/pyprland/default.nix deleted file mode 100644 index 2dc04c7..0000000 --- a/meta/desktop/wayland/hyprland/pyprland/default.nix +++ /dev/null @@ -1,38 +0,0 @@ -{ pkgs, ... }: { - home.packages = with pkgs; [ pyprland ]; - xdg.configFile."hypr/pyprland.toml".text = '' - [pyprland] - plugins = ["scratchpads"] - - [scratchpads.spterm] - animation = "fromTop" - command = "kitty --class spterm" - class = "spterm" - size = "50% 65%" - margin = "17%" # (50 / 3) - - [scratchpads.spcalc] - animation = "fromTop" - command = "kitty --class spcalc -e bc -lq" - class = "spcalc" - size = "50% 50%" - margin = "25%" # (50 / 2) - - [scratchpads.spgpt] - animation = "fromTop" - command = "thorium-browser --user-data-dir=/home/fuwn/.local/share/spgpt --app='https://chatgpt.com/'" - class = "thorium-chatgpt.com__-Default" - size = "65% 75%" - # process_tracking = false - match_by = "class" - margin = "13%" # (50 / 4) - - [scratchpads.spspotify] - animation = "fromTop" - command = "LD_PRELOAD=/usr/lib/spotifywm.so /opt/spotify/spotify" - class = "Spotify" - size = "65% 90%" - unfocus = "hide" - lazy = true - ''; -} diff --git a/meta/desktop/wayland/waybar/default.nix b/meta/desktop/wayland/waybar/default.nix index e823913..a582651 100644 --- a/meta/desktop/wayland/waybar/default.nix +++ b/meta/desktop/wayland/waybar/default.nix @@ -7,7 +7,7 @@ defaultModules = (import ./waybar/default-modules.nix { inherit pkgs; - }).mainBar; + }); hyprland-workspaces-base = { disable-scroll = true; disable-markup = false; @@ -73,18 +73,14 @@ xdg.configFile = ( let scripts = [ - "brightness.sh" "mediaplayer.py" - "spotify.sh" - "theme.sh" - "volume.sh" - "wallpaper.sh" ]; in ( builtins.listToAttrs (map (script: { name = "waybar/scripts/${script}"; + value = { source = ./waybar/scripts/${script}; }; diff --git a/meta/desktop/wayland/waybar/waybar/default-modules.nix b/meta/desktop/wayland/waybar/waybar/default-modules.nix index 9e52674..e48000e 100644 --- a/meta/desktop/wayland/waybar/waybar/default-modules.nix +++ b/meta/desktop/wayland/waybar/waybar/default-modules.nix @@ -1,329 +1,214 @@ { pkgs, ... }: { - mainBar = { - "layer" = "top"; - "position" = "top"; - "margin-left" = 8; - "margin-right" = 8; - "height" = 40; - "idle_inhibitor" = { - "format" = "{icon}"; - "format-icons" = { - "activated" = ""; - "deactivated" = ""; - }; - }; - "bluetooth" = { - "format" = ""; - "on-click" = "blueberry"; - }; - "battery" = { - "states" = { - # "good" = 95; - "warning" = 30; - "critical" = 15; - }; - "format" = "{capacity}% {icon} "; - "format-charging" = "{capacity}% "; - "format-plugged" = "{capacity}% "; - # "format-good" = "", - # "format-full" = ""; - "format-icons" = [ "" "" "" "" "" ]; - }; - "custom/PBPbattery" = { - "exec" = "~/.config/waybar/scripts/PBPbattery.sh"; - "format" = "{}"; - }; - "clock" = { - "locale" = "ja_JP.utf8"; - "interval" = 5; + layer = "top"; + position = "top"; + margin-left = 8; + margin-right = 8; + height = 40; - # "format-alt" = " {:%e %b %Y}", # Icon: calendar-alt - # "format" = "{:%e %b %Y %H:%M}"; - # "tooltip-format" = "{:%e %B %Y}"; - "tooltip-format" = "<tt><small>{calendar}</small></tt>"; - # "format" = "{:%m月 %d日 %I時%M分%S秒}"; + bluetooth = { + format = ""; + on-click = "${pkgs.blueberry}/bin/blueberry"; + }; - # "format" = "{:%m月 %d日 %H:%M:%S}"; - "format" = "{:L%m月 %d日 %H:%M}"; - # "format-alt" = "{:L%G年%b %d日 %A}"; - "format-alt" = "{:L%G年%b %d日 %A}"; - }; - "custom/clock" = { - exec = "date '+%m月 %d日 %H:%M'"; - tooltip = false; - interval = 5; - }; - "cpu" = { - "interval" = 5; - "format" = " {usage}% ({load})"; - "states" = { - "warning" = 70; - "critical" = 90; - }; - "on-click" = "kitty -e '${pkgs.bottom}/bin/btm'"; - }; - "custom/keyboard-layout" = { - "exec" = "swaymsg -t get_inputs | grep -m1 'xkb_active_layout_name' | cut -d '\"' -f4"; - "interval" = 30; - "format" = " {}"; - "signal" = 1; # SIGHUP - "tooltip" = false; - "on-click" = "~/.config/waybar/scripts/keyhint.sh"; - }; - "memory" = { - "interval" = 5; - "format" = " {}%"; - "format-alt" = " {used:0.1f}/{total:0.1f}ギガ"; - "states" = { - "warning" = 70; - "critical" = 90; - }; - }; - "network" = { - "interval" = 1; - # "format-wifi" = " ", - # "format-ethernet" = " {bandwidthUpBytes} {bandwidthDownBytes}", - "format" = " {bandwidthUpBytes} {bandwidthDownBytes}"; - "format-disconnected" = "⚠ Disconnected"; - "tooltip-format" = "{ifname}: {ipaddr}"; - "on-click" = "kitty -e 'nmtui'"; - }; - "network#vpn" = { - "interface" = "tun0"; - "format" = " "; - "format-disconnected" = "⚠ Disconnected"; - "tooltip-format" = "{ifname}: {ipaddr}/{cidr}"; - }; - "hyprland/mode" = { - "format" = "{}"; - "tooltip" = false; - }; - "hyprland/window" = { - "format" = "{}"; - "max-length" = 120; - "separate-outputs" = true; - "icon" = false; - "rewrite" = { - "(.*) - Thorium" = " $1"; - "(.*) - NVIM" = " $1"; - "ChatGPT" = " ChatGPT"; - "~(.*)" = " ~$1"; - "…(.*)" = " …$1"; - "zsh" = " ~"; - "fish" = " ~"; - "kitty" = " ~"; - "Volume Control" = " Volume Control"; - "Bluetooth" = " Bluetooth"; - "JamesDSP for Linux" = " JamesDSP"; - }; - }; - "pulseaudio" = { - "scroll-step" = 1; - # "format" = "{icon} {volume}%"; - "format" = "{icon} {volume}%"; - # "format-bluetooth" = "{volume}% {icon} {format_source}"; - # "format-bluetooth-muted" = " {icon} {format_source}"; - "format-muted" = ""; - "format-icons" = { - "headphone" = ""; - "hands-free" = "וֹ"; - "headset" = ""; - "phone" = ""; - "portable" = ""; - "car" = ""; - "default" = [ "" ]; - }; - "on-click" = "pactl set-sink-mute @DEFAULT_SINK@ toggle"; - "on-click-right" = "pavucontrol"; - "on-scroll-up" = "pactl set-sink-volume @DEFAULT_SINK@ +2%"; - "on-scroll-down" = "pactl set-sink-volume @DEFAULT_SINK@ -2%"; - }; - "pulseaudio#microphone" = { - "format" = "{format_source}"; - "format-source" = " {volume}%"; - "format-source-muted" = " "; - "on-click" = "pamixer --default-source -t"; - "on-click-right" = "pavucontrol"; - "on-scroll-up" = "pamixer --default-source -i 5"; - "on-scroll-down" = "pamixer --default-source -d 5"; - "scroll-step" = 5; - }; - "custom/weather" = { - "exec" = "~/.config/waybar/scripts/weather.sh tampa"; - "return-type" = "json"; - "interval" = 600; - }; - "tray" = { - # "icon-size" = 18; - "spacing" = 10; - "show-passive-items" = true; - }; - "backlight#icon" = { - "format" = "{icon}"; - "format-icons" = [ "" ]; - "on-scroll-down" = "brightnessctl -c backlight set 1%-"; - "on-scroll-up" = "brightnessctl -c backlight set +1%"; - }; - "backlight#value" = { - "format" = "{percent}%"; - "on-scroll-down" = "brightnessctl -c backlight set 1%-"; - "on-scroll-up" = "brightnessctl -c backlight set +1%"; - }; - "custom/firefox" = { - "format" = " "; - "on-click" = "exec firefox"; - "tooltip" = false; - }; - "custom/terminal" = { - "format" = " "; - "on-click" = "exec kitty"; - "tooltip" = false; - }; - "custom/files" = { - "format" = " "; - "on-click" = "exec nautilus"; - "tooltip" = false; - }; - "custom/power" = { - "format" = "⏻"; - "on-click" = "exec ~/.config/waybar/scripts/power-menu.sh"; - "tooltip" = false; - }; - "image#album-art" = { - "path" = "/tmp/mediaplayer_art"; - "size" = 22.5; # (18 + (18 / 4)) - "interval" = 5; - "on-click" = "playerctl play-pause"; - }; - "custom/media" = { - "format" = "{icon} {}"; - "return-type" = "json"; - "max-length" = 40; - "format-icons" = { - "spotify" = " "; - "default" = " "; - }; - "escape" = true; - "exec" = "/usr/bin/python3 ~/.config/waybar/scripts/mediaplayer.py 2> /dev/null"; - "on-click" = "playerctl play-pause"; - "on-scroll-up" = "playerctl next"; - "on-scroll-down" = "playerctl previous"; + clock = { + locale = "ja_JP.utf8"; + interval = 5; + tooltip-format = "<tt><small>{calendar}</small></tt>"; + # format = "{:%m月 %d日 %H:%M:%S}"; + format = "{:L%m月 %d日 %H:%M}"; + format-alt = "{:L%G年%b %d日 %A}"; + }; + + # For when clock doesn't work + "custom/clock" = { + exec = "date '+%m月 %d日 %H:%M'"; + tooltip = false; + interval = 5; + }; + + cpu = { + interval = 5; + format = " {usage}% ({load})"; + + states = { + warning = 70; + critical = 90; }; - "cava#cava1" = { - "framerate" = 280; - "autosens" = 1; - "sensitivity" = 3; - "bars" = 26; - "lower_cutoff_freq" = 50; - "higher_cutoff_freq" = 10000; - "method" = "pipewire"; - "source" = "auto"; - "stereo" = true; - "reverse" = true; - "bar_delimiter" = 0; - "monstercat" = false; - "waves" = false; - "hide_on_silence" = true; - "noise_reduction" = 0.77; - "input_delay" = 0; - "on-click" = "playerctl play-pause"; - # "format-icons" = ["░", "▒", "▓", "█", "█", "█", "█", "█"] - # "format-icons" = ["⎺", "⎻", "⎼", "⎽", "⎼", "⎻", "⎺", "⎹"] - # "format-icons" = ["▏", "▎", "▍", "▌", "▋", "▊", "▉", "█"] - "format-icons" = [ "⠁" "⠃" "⠇" "⠋" "⠛" "⠟" "⠿" "⣿" ]; - # "format-icons" = ["◰", "◳", "◲", "◱", "▘", "▝", "▖", "▗"] - # "format-icons" = ["▖", "▗", "▘", "▝", "▚", "▞", "▛", "▟"] - # "format-icons" = ["▁", "▂", "▃", "▄", "▅", "▆", "▇", "█", "▉", "▊"] - # "format-icons" = ["⎯", "⎰", "⎱", "⎲", "⎳", "⎴", "⎵", "⎶"] - # "format-icons" = ["⎺", "⎻", "⎼", "⎽", "⎾", "⎿", "⏀", "⏁"] - # "format-icons" = ["♪", "♫", "♬", "♭", "♮", "♯", "♩", "♪"] - # "format-icons" = ["→", "⇉", "⇒", "⇉", "→", "⇉", "⇒", "⇉"] - # "format-icons" = ["·", ":", "⁙", "⁘", "⁙", ":", "·", "•"] - # "format-icons" = ["○", "◔", "◑", "◕", "●", "◍", "◎", "◉"] - # "format-icons" = ["△", "▲", "▴", "▸", "▶", "▹", "►", "▻"] - # "format-icons" = ["◇", "◈", "◉", "◍", "◎", "◯", "⦿", "◑"] - # "format-icons" = ["-", "–", "—", "––", "–––", "——", "———", "——––"] - # "format-icons" = ["-", "=", "≡", "≣", "≠", "≢", "≜", "≝"] - # "format-icons" = ["✓", "✔", "✕", "✖", "✗", "✘", "✙", "✚"] - # "format-icons" = ["✩", "✪", "✫", "✬", "✭", "✮", "✯", "✰"] - /* "actions" = { - "on-click-right" = "mode"; - } */ + + on-click = "kitty -e '${pkgs.bottom}/bin/btm'"; + }; + + memory = { + interval = 5; + format = " {}%"; + format-alt = " {used:0.1f}/{total:0.1f}ギガ"; + + # I might remove these. I have 64GB of RAM .... + states = { + warning = 70; + critical = 90; }; - "cava#cava2" = { - "framerate" = 280; - "autosens" = 1; - "sensitivity" = 4; - "bars" = 10; - "lower_cutoff_freq" = 50; - "higher_cutoff_freq" = 10000; - "method" = "pipewire"; - "source" = "auto"; - "stereo" = false; - "reverse" = true; - "bar_delimiter" = 0; - "monstercat" = false; - "waves" = false; - "hide_on_silence" = true; - "noise_reduction" = 0.77; - "input_delay" = 0; - # "format-icons" = ["░", "▒", "▓", "█", "█", "█", "█", "█"] - # "format-icons" = ["⎺", "⎻", "⎼", "⎽", "⎼", "⎻", "⎺", "⎹"] - # "format-icons" = ["▏", "▎", "▍", "▌", "▋", "▊", "▉", "█"] - "format-icons" = [ "⠁" "⠃" "⠇" "⠋" "⠛" "⠟" "⠿" "⣿" ]; - # "format-icons" = ["◰", "◳", "◲", "◱", "▘", "▝", "▖", "▗"] - # "format-icons" = ["▖", "▗", "▘", "▝", "▚", "▞", "▛", "▟"] - # "format-icons" = ["▁", "▂", "▃", "▄", "▅", "▆", "▇", "█", "▉", "▊"] - # "format-icons" = ["⎯", "⎰", "⎱", "⎲", "⎳", "⎴", "⎵", "⎶"] - # "format-icons" = ["⎺", "⎻", "⎼", "⎽", "⎾", "⎿", "⏀", "⏁"] - # "format-icons" = ["♪", "♫", "♬", "♭", "♮", "♯", "♩", "♪"] - # "format-icons" = ["→", "⇉", "⇒", "⇉", "→", "⇉", "⇒", "⇉"] - # "format-icons" = ["·", ":", "⁙", "⁘", "⁙", ":", "·", "•"] - # "format-icons" = ["○", "◔", "◑", "◕", "●", "◍", "◎", "◉"] - # "format-icons" = ["△", "▲", "▴", "▸", "▶", "▹", "►", "▻"] - # "format-icons" = ["◇", "◈", "◉", "◍", "◎", "◯", "⦿", "◑"] - # "format-icons" = ["-", "–", "—", "––", "–––", "——", "———", "——––"] - # "format-icons" = ["-", "=", "≡", "≣", "≠", "≢", "≜", "≝"] - # "format-icons" = ["✓", "✔", "✕", "✖", "✗", "✘", "✙", "✚"] - # "format-icons" = ["✩", "✪", "✫", "✬", "✭", "✮", "✯", "✰"] - /* "actions" = { "on-click-right" = "mode"; } */ + }; + + network = { + interval = 1; + # format-wifi = " {bandwidthUpBytes} {bandwidthDownBytes}", + # format-ethernet = " {bandwidthUpBytes} {bandwidthDownBytes}", + format = " {bandwidthUpBytes} {bandwidthDownBytes}"; + format-disconnected = "⚠ Disconnected"; + tooltip-format = "{ifname}: {ipaddr}"; + on-click = "kitty -e 'nmtui'"; + }; + + "hyprland/mode" = { + format = "{}"; + tooltip = false; + }; + + "hyprland/window" = { + format = "{}"; + max-length = 120; + separate-outputs = true; + icon = false; + + rewrite = { + "(.*) - Thorium" = " $1"; + "(.*) - NVIM" = " $1"; + "ChatGPT" = " ChatGPT"; + "~(.*)" = " ~$1"; + "…(.*)" = " …$1"; + "zsh" = " ~"; + "fish" = " ~"; + "kitty" = " ~"; + "Volume Control" = " Volume Control"; + "Bluetooth" = " Bluetooth"; + "JamesDSP for Linux" = " JamesDSP"; }; - "custom/know" = { - "exec" = "know"; - "interval" = 1; + }; + + pulseaudio = { + scroll-step = 1; + format = "{icon} {volume}%"; + # format-bluetooth = "{volume}% {icon} {format_source}"; + # format-bluetooth-muted = " {icon} {format_source}"; + format-muted = ""; + + format-icons = { + headphone = ""; + hands-free = "וֹ"; + headset = ""; + phone = ""; + portable = ""; + car = ""; + + default = [ "" ]; }; - "custom/gpu" = { - "exec" = "gpu-utilisation"; - "interval" = 5; - "format" = " {}"; - "on-click" = "kitty -e 'nvtop'"; + + on-click = "pactl set-sink-mute @DEFAULT_SINK@ toggle"; + on-click-right = "${pkgs.pavucontrol}/bin/pavucontrol"; + on-scroll-up = "pactl set-sink-volume @DEFAULT_SINK@ +2%"; + on-scroll-down = "pactl set-sink-volume @DEFAULT_SINK@ -2%"; + }; + + tray = { + spacing = 10; + show-passive-items = true; + }; + + "image#album-art" = { + path = "/tmp/mediaplayer_art"; + size = 22.5; # (18 + (18 / 4)) + interval = 5; + on-click = "${pkgs.playerctl}/bin/playerctl play-pause"; + }; + + "custom/media" = { + format = "{icon} {}"; + return-type = "json"; + max-length = 40; + + format-icons = { + spotify = " "; + default = " "; }; - "modules-left" = [ - "hyprland/workspaces" - "hyprland/window" - "custom/media" - "image#album-art" - ]; - "modules-center" = [ "custom/clock" ]; - "modules-right" = [ - # "custom/know" - # "cava#cava1" - # "network" - # "cava#cava2" - "tray" - # "idle_inhibitor" - "cpu" - "custom/gpu" - "memory" - # "custom/keyboard-layout" - #"custom/PBPbattery" - # "backlight#icon" - # "backlight#value" - "bluetooth" - "pulseaudio" - # "pulseaudio#microphone" - # "network" - # "battery" - ]; + + escape = true; + exec = "/usr/bin/python3 ~/.config/waybar/scripts/mediaplayer.py 2> /dev/null"; + on-click = "${pkgs.playerctl}/bin/playerctl play-pause"; + on-scroll-up = "${pkgs.playerctl}/bin/playerctl next"; + on-scroll-down = "${pkgs.playerctl}/bin/playerctl previous"; }; + + cava = { + framerate = 280; + autosens = 1; + sensitivity = 3; + bars = 26; + lower_cutoff_freq = 50; + higher_cutoff_freq = 10000; + method = "pipewire"; + source = "auto"; + stereo = true; + reverse = true; + bar_delimiter = 0; + monstercat = false; + waves = false; + hide_on_silence = true; + noise_reduction = 0.77; + input_delay = 0; + on-click = "${pkgs.playerctl}/bin/playerctl play-pause"; + + # actions = { + # on-click-right = "mode"; + # }; + + # format-icons = ["░", "▒", "▓", "█", "█", "█", "█", "█"] + # format-icons = ["⎺", "⎻", "⎼", "⎽", "⎼", "⎻", "⎺", "⎹"] + # format-icons = ["▏", "▎", "▍", "▌", "▋", "▊", "▉", "█"] + format-icons = [ "⠁" "⠃" "⠇" "⠋" "⠛" "⠟" "⠿" "⣿" ]; + # format-icons = ["◰", "◳", "◲", "◱", "▘", "▝", "▖", "▗"] + # format-icons = ["▖", "▗", "▘", "▝", "▚", "▞", "▛", "▟"] + # format-icons = ["▁", "▂", "▃", "▄", "▅", "▆", "▇", "█", "▉", "▊"] + # format-icons = ["⎯", "⎰", "⎱", "⎲", "⎳", "⎴", "⎵", "⎶"] + # format-icons = ["⎺", "⎻", "⎼", "⎽", "⎾", "⎿", "⏀", "⏁"] + # format-icons = ["♪", "♫", "♬", "♭", "♮", "♯", "♩", "♪"] + # format-icons = ["→", "⇉", "⇒", "⇉", "→", "⇉", "⇒", "⇉"] + # format-icons = ["·", ":", "⁙", "⁘", "⁙", ":", "·", "•"] + # format-icons = ["○", "◔", "◑", "◕", "●", "◍", "◎", "◉"] + # format-icons = ["△", "▲", "▴", "▸", "▶", "▹", "►", "▻"] + # format-icons = ["◇", "◈", "◉", "◍", "◎", "◯", "⦿", "◑"] + # format-icons = ["-", "–", "—", "––", "–––", "——", "———", "——––"] + # format-icons = ["-", "=", "≡", "≣", "≠", "≢", "≜", "≝"] + # format-icons = ["✓", "✔", "✕", "✖", "✗", "✘", "✙", "✚"] + # format-icons = ["✩", "✪", "✫", "✬", "✭", "✮", "✯", "✰"] + }; + + "custom/gpu" = { + exec = "nvidia-smi --query-gpu=utilization.gpu --format=csv,noheader | sed 's/ %/%/'"; + interval = 5; + format = " {}"; + on-click = "kitty -e 'nvtop'"; + }; + + modules-left = [ + "hyprland/workspaces" + "hyprland/window" + "custom/media" + "image#album-art" + ]; + + modules-center = [ + "clock" + ]; + + modules-right = [ + "cava" + # "network" + "tray" + "cpu" + "custom/gpu" + "memory" + "bluetooth" + "pulseaudio" + ]; } diff --git a/meta/desktop/wayland/waybar/waybar/scripts/brightness.sh b/meta/desktop/wayland/waybar/waybar/scripts/brightness.sh deleted file mode 100755 index 9830a3a..0000000 --- a/meta/desktop/wayland/waybar/waybar/scripts/brightness.sh +++ /dev/null @@ -1,54 +0,0 @@ -#!/usr/bin/env bash - -iDIR="$HOME/.config/dunst/imgs" - -# Get brightness -get_backlight() { - MAX=$(brightnessctl max) - LIGHT=$(printf "%.0f\n" $(brightnessctl get)) - PERCENTAGE=$(expr 100 \* $LIGHT / $MAX) - echo "${PERCENTAGE}%" -} - -# Get icons -get_icon() { - backlight="$(get_backlight)" - current="${backlight%%%}" - if [[ ("$current" -ge "0") && ("$current" -le "20") ]]; then - icon="$iDIR/brightness-20.png" - elif [[ ("$current" -ge "20") && ("$current" -le "40") ]]; then - icon="$iDIR/brightness-40.png" - elif [[ ("$current" -ge "40") && ("$current" -le "60") ]]; then - icon="$iDIR/brightness-60.png" - elif [[ ("$current" -ge "60") && ("$current" -le "80") ]]; then - icon="$iDIR/brightness-80.png" - elif [[ ("$current" -ge "80") && ("$current" -le "100") ]]; then - icon="$iDIR/brightness-100.png" - fi -} - -# Notify -notify_user() { - notify-send -h string:x-canonical-private-synchronous:sys-notify -u low -i "$icon" "Brightness : $(get_backlight)" -} - -# Increase brightness -inc_backlight() { - brightnessctl set 5%+ && get_icon && notify_user -} - -# Decrease brightness -dec_backlight() { - brightnessctl set 5%- && get_icon && notify_user -} - -# Execute accordingly -if [[ "$1" == "--get" ]]; then - get_backlight -elif [[ "$1" == "--inc" ]]; then - inc_backlight -elif [[ "$1" == "--dec" ]]; then - dec_backlight -else - get_backlight -fi
\ No newline at end of file diff --git a/meta/desktop/wayland/waybar/waybar/scripts/mediaplayer.py b/meta/desktop/wayland/waybar/waybar/scripts/mediaplayer.py index f83bcd7..c44ee0b 100755 --- a/meta/desktop/wayland/waybar/waybar/scripts/mediaplayer.py +++ b/meta/desktop/wayland/waybar/waybar/scripts/mediaplayer.py @@ -1,4 +1,5 @@ #!/usr/bin/env python3 + import argparse import logging import os @@ -8,6 +9,7 @@ import gi import json gi.require_version("Playerctl", "2.0") + from gi.repository import Playerctl, GLib logger = logging.getLogger(__name__) @@ -34,6 +36,7 @@ def on_play(player, status, manager): def on_metadata(player, metadata, manager): logger.info("Received new metadata") + track_info = "" if ( @@ -60,6 +63,7 @@ def on_metadata(player, metadata, manager): # if player.props.status != 'Playing' and track_info: # track_info = ' ' + track_info + write_output(track_info, player) @@ -81,7 +85,9 @@ def on_player_vanished(manager, player): def init_player(manager, name): logger.debug("Initialize player: {player}".format(player=name.name)) + player = Playerctl.Player.new_from_name(name) + player.connect("playback-status", on_play, manager) player.connect("metadata", on_metadata, manager) manager.manage_player(player) @@ -99,10 +105,7 @@ def signal_handler(sig, frame): def parse_arguments(): parser = argparse.ArgumentParser() - # Increase verbosity with every occurrence of -v parser.add_argument("-v", "--verbose", action="count", default=0) - - # Define for which player we're listening parser.add_argument("--player") return parser.parse_args() @@ -110,19 +113,13 @@ def parse_arguments(): def main(): arguments = parse_arguments() - - # Initialize logging logging.basicConfig( stream=sys.stderr, level=logging.DEBUG, format="%(name)s %(levelname)s %(message)s", ) - # Logging is set by default to WARN and higher. - # With every occurrence of -v it's lowered by one logger.setLevel(max((3 - arguments.verbose) * 10, 0)) - - # Log the sent command line arguments logger.debug("Arguments received {}".format(vars(arguments))) manager = Playerctl.PlayerManager() @@ -132,7 +129,6 @@ def main(): "name-appeared", lambda *args: on_player_appeared(*args, arguments.player) ) manager.connect("player-vanished", on_player_vanished) - signal.signal(signal.SIGINT, signal_handler) signal.signal(signal.SIGTERM, signal_handler) signal.signal(signal.SIGPIPE, signal.SIG_DFL) @@ -144,6 +140,7 @@ def main(): player=player.name ) ) + continue init_player(manager, player) diff --git a/meta/desktop/wayland/waybar/waybar/scripts/spotify.sh b/meta/desktop/wayland/waybar/waybar/scripts/spotify.sh deleted file mode 100755 index 8d25ebd..0000000 --- a/meta/desktop/wayland/waybar/waybar/scripts/spotify.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh - -while true; do - - player_status=$(playerctl status 2>/dev/null) - - if [ -z "$(playerctl metadata album)" ]; then - if [ "$player_status" = "Playing" ]; then - echo "$(playerctl metadata artist) - $(playerctl metadata title)" - elif [ "$player_status" = "Paused" ]; then - echo " $(playerctl metadata artist) - $(playerctl metadata title)" - else - echo "" - fi - else - if [ "$player_status" = "Playing" ]; then - echo "<span color='#1db954'></span> $(playerctl metadata artist) - $(playerctl metadata title)" - elif [ "$player_status" = "Paused" ]; then - echo "<span color='#1db954'></span> $(playerctl metadata artist) - $(playerctl metadata title)" - else - echo "" - fi - fi - - sleep 1 - -done diff --git a/meta/desktop/wayland/waybar/waybar/scripts/theme.sh b/meta/desktop/wayland/waybar/waybar/scripts/theme.sh deleted file mode 100755 index 97fdc66..0000000 --- a/meta/desktop/wayland/waybar/waybar/scripts/theme.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/bash - -export PATH="${PATH}:${HOME}/.local/bin/" - -CURRENTIMG="$(<~/.cache/wal/wal )" -MODE="" - -if [[ -e "${HOME}/.cache/wal/mode" ]]; then - MODE="$(<~/.cache/wal/mode )" -else - cd ${HOME}/.cache/wal && touch mode - - set -o noclobber - echo "dark" >| ${HOME}/.cache/wal/mode - - MODE="dark" -fi - -if [[ $MODE = "light" ]]; then - notify-send "Changing to dark theme..." - - MODE="dark" - - wal -i $CURRENTIMG --cols16 - - . $HOME/.config/mako/update-colors.sh - - set -o noclobber - echo "dark" >| ${HOME}/.cache/wal/mode - - notify-send "Changed to dark theme!" -else - notify-send "Changing to light theme..." - - MODE="light" - - wal -i $CURRENTIMG -l --cols16 - - . $HOME/.config/mako/update-colors.sh - - set -o noclobber - echo "light" >| ${HOME}/.cache/wal/mode - - notify-send "Changed to light theme!" -fi
\ No newline at end of file diff --git a/meta/desktop/wayland/waybar/waybar/scripts/volume.sh b/meta/desktop/wayland/waybar/waybar/scripts/volume.sh deleted file mode 100755 index e4a9183..0000000 --- a/meta/desktop/wayland/waybar/waybar/scripts/volume.sh +++ /dev/null @@ -1,73 +0,0 @@ -#!/bin/bash - -iDIR="$HOME/.config/dunst/imgs" - -# Get Volume -get_volume() { - volume=$(pamixer --get-volume) - echo "$volume" -} - -# Get icons -get_icon() { - current=$(get_volume) - if [[ "$current" -eq "0" ]]; then - echo "$iDIR/volume-mute.png" - elif [[ ("$current" -ge "0") && ("$current" -le "30") ]]; then - echo "$iDIR/volume-low.png" - elif [[ ("$current" -ge "30") && ("$current" -le "60") ]]; then - echo "$iDIR/volume-mid.png" - elif [[ ("$current" -ge "60") && ("$current" -le "100") ]]; then - echo "$iDIR/volume-high.png" - fi -} - -# Notify -notify_user() { - notify-send -h string:x-canonical-private-synchronous:sys-notify -u low -i "$(get_icon)" "Volume : $(get_volume)" -} - -# Increase Volume -inc_volume() { - pamixer -i 5 && notify_user -} - -# Decrease Volume -dec_volume() { - pamixer -d 5 && notify_user -} - -# Toggle Mute -toggle_mute() { - if [ "$(pamixer --get-mute)" == "false" ]; then - pamixer -m && notify-send -h string:x-canonical-private-synchronous:sys-notify -u low -i "$iDIR/volume-mute.png" "Volume Switched OFF" - elif [ "$(pamixer --get-mute)" == "true" ]; then - pamixer -u && notify-send -h string:x-canonical-private-synchronous:sys-notify -u low -i "$(get_icon)" "Volume Switched ON" - fi -} - -# Toggle Mic -toggle_mic() { - if [ "$(pamixer --source 66 --get-mute)" == "false" ]; then - pamixer -m --source 66 && notify-send -h string:x-canonical-private-synchronous:sys-notify -u low -i "$iDIR/microphone-mute.png" "Microphone Switched OFF" - elif [ "$(pamixer --source 66 --get-mute)" == "true" ]; then - pamixer -u --source 66 && notify-send -h string:x-canonical-private-synchronous:sys-notify -u low -i "$iDIR/microphone.png" "Microphone Switched ON" - fi -} - -# Execute accordingly -if [[ "$1" == "--get" ]]; then - get_volume -elif [[ "$1" == "--inc" ]]; then - inc_volume -elif [[ "$1" == "--dec" ]]; then - dec_volume -elif [[ "$1" == "--toggle" ]]; then - toggle_mute -elif [[ "$1" == "--toggle-mic" ]]; then - toggle_mic -elif [[ "$1" == "--get-icon" ]]; then - get_icon -else - get_volume -fi diff --git a/meta/desktop/wayland/waybar/waybar/scripts/wallpaper.sh b/meta/desktop/wayland/waybar/waybar/scripts/wallpaper.sh deleted file mode 100755 index 23935cc..0000000 --- a/meta/desktop/wayland/waybar/waybar/scripts/wallpaper.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash - -export PATH="${PATH}:${HOME}/.local/bin/" - -DIR=$HOME/Wallpapers -PICS=($(ls ${DIR})) - -RANDOMPICS=${PICS[ $RANDOM % ${#PICS[@]} ]} - -if [[ $(pidof swww) ]]; then - pkill swww -fi - -swww img ${DIR}/${RANDOMPICS} --transition-type grow --transition-fps 60 --transition-duration 0.5 --transition-bezier 0.65,0,0.35,1 --transition-pos 0.794,0.972 --transition-step 1 - -sleep 1.25 - -if [[ "$(<~/.cache/wal/mode )" = "dark" ]]; then - wal -i ${DIR}/${RANDOMPICS} --cols16 -elif [[ "$(<~/.cache/wal/mode )" = "light" ]]; then - wal -i ${DIR}/${RANDOMPICS} -l --cols16 -fi - -pywal-discord -t default -pywalfox update -wal-telegram --wal - -. $HOME/.config/mako/update-colors.sh
\ No newline at end of file diff --git a/meta/rice/bottom/default.nix b/meta/rice/bottom/default.nix index 9248e3d..4acf218 100644 --- a/meta/rice/bottom/default.nix +++ b/meta/rice/bottom/default.nix @@ -1,3 +1,195 @@ { pkgs, ... }: { programs.bottom.enable = true; + + xdg.configFile."bottom/bottom.toml".text = '' + # This is a default config file for bottom. All of the settings are commented + # out by default; if you wish to change them uncomment and modify as you see + # fit. + + # This group of options represents a command-line flag/option. Flags explicitly + # added when running (ie: btm -a) will override this config file if an option + # is also set here. + + [flags] + # Whether to hide the average cpu entry. + #hide_avg_cpu = false + # Whether to use dot markers rather than braille. + #dot_marker = false + # The update rate of the application. + rate = "250ms" + # Whether to put the CPU legend to the left. + #left_legend = false + # Whether to set CPU% on a process to be based on the total CPU or just current usage. + #current_usage = false + # Whether to set CPU% on a process to be based on the total CPU or per-core CPU% (not divided by the number of cpus). + #unnormalized_cpu = false + # Whether to group processes with the same name together by default. + #group_processes = false + # Whether to make process searching case sensitive by default. + #case_sensitive = false + # Whether to make process searching look for matching the entire word by default. + #whole_word = false + # Whether to make process searching use regex by default. + #regex = false + # Defaults to Celsius. Temperature is one of: + #temperature_type = "k" + #temperature_type = "f" + #temperature_type = "c" + #temperature_type = "kelvin" + #temperature_type = "fahrenheit" + #temperature_type = "celsius" + # The default time interval (in milliseconds). + #default_time_value = "60s" + # The time delta on each zoom in/out action (in milliseconds). + #time_delta = 15000 + # Hides the time scale. + #hide_time = false + # Override layout default widget + #default_widget_type = "proc" + #default_widget_count = 1 + # Expand selected widget upon starting the app + #expanded_on_startup = true + # Use basic mode + basic = false + # Use the old network legend style + #use_old_network_legend = false + # Remove space in tables + #hide_table_gap = false + # Show the battery widgets + battery = false + # Disable mouse clicks + #disable_click = false + # Built-in themes. Valid values are "default", "default-light", "gruvbox", "gruvbox-light", "nord", "nord-light" + #color = "default" + # Show memory values in the processes widget as values by default + #mem_as_value = false + # Show tree mode by default in the processes widget. + #tree = false + # Shows an indicator in table widgets tracking where in the list you are. + #show_table_scroll_position = false + # Show processes as their commands by default in the process widget. + #process_command = false + # Displays the network widget with binary prefixes. + #network_use_binary_prefix = false + # Displays the network widget using bytes. + #network_use_bytes = false + # Displays the network widget with a log scale. + #network_use_log = false + # Hides advanced options to stop a process on Unix-like systems. + #disable_advanced_kill = false + # Shows GPU(s) memory + enable_gpu_memory = true + # Shows cache and buffer memory + enable_cache_memory = true + # How much data is stored at once in terms of time. + #retention = "10m" + + # These are flags around the process widget. + + #[processes] + #columns = ["PID", "Name", "CPU%", "Mem%", "R/s", "W/s", "T.Read", "T.Write", "User", "State"] + + # These are all the components that support custom theming. Note that colour support + # will depend on terminal support. + + #[colors] # Uncomment if you want to use custom colors + # Represents the colour of table headers (processes, CPU, disks, temperature). + #table_header_color="LightBlue" + # Represents the colour of the label each widget has. + #widget_title_color="Gray" + # Represents the average CPU color. + #avg_cpu_color="Red" + # Represents the colour the core will use in the CPU legend and graph. + #cpu_core_colors=["LightMagenta", "LightYellow", "LightCyan", "LightGreen", "LightBlue", "LightRed", "Cyan", "Green", "Blue", "Red"] + # Represents the colour RAM will use in the memory legend and graph. + #ram_color="LightMagenta" + # Represents the colour SWAP will use in the memory legend and graph. + #swap_color="LightYellow" + # Represents the colour ARC will use in the memory legend and graph. + #arc_color="LightCyan" + # Represents the colour the GPU will use in the memory legend and graph. + #gpu_core_colors=["LightGreen", "LightBlue", "LightRed", "Cyan", "Green", "Blue", "Red"] + # Represents the colour rx will use in the network legend and graph. + #rx_color="LightCyan" + # Represents the colour tx will use in the network legend and graph. + #tx_color="LightGreen" + # Represents the colour of the border of unselected widgets. + #border_color="Gray" + # Represents the colour of the border of selected widgets. + #highlighted_border_color="LightBlue" + # Represents the colour of most text. + #text_color="Gray" + # Represents the colour of text that is selected. + #selected_text_color="Black" + # Represents the background colour of text that is selected. + #selected_bg_color="LightBlue" + # Represents the colour of the lines and text of the graph. + #graph_color="Gray" + # Represents the colours of the battery based on charge + #high_battery_color="green" + #medium_battery_color="yellow" + #low_battery_color="red" + + # Layout - layouts follow a pattern like this: + # [[row]] represents a row in the application. + # [[row.child]] represents either a widget or a column. + # [[row.child.child]] represents a widget. + # + # All widgets must have the type value set to one of ["cpu", "mem", "proc", "net", "temp", "disk", "empty"]. + # All layout components have a ratio value - if this is not set, then it defaults to 1. + # The default widget layout: + #[[row]] + # ratio=30 + # [[row.child]] + # type="cpu" + #[[row]] + # ratio=40 + # [[row.child]] + # ratio=4 + # type="mem" + # [[row.child]] + # ratio=3 + # [[row.child.child]] + # type="temp" + # [[row.child.child]] + # type="disk" + #[[row]] + # ratio=30 + # [[row.child]] + # type="net" + # [[row.child]] + # type="proc" + # default=true + + + # Filters - you can hide specific temperature sensors, network interfaces, and disks using filters. This is admittedly + # a bit hard to use as of now, and there is a planned in-app interface for managing this in the future: + #[disk_filter] + #is_list_ignored = true + #list = ["/dev/sda\\d+", "/dev/nvme0n1p2"] + #regex = true + #case_sensitive = false + #whole_word = false + + #[mount_filter] + #is_list_ignored = true + #list = ["/mnt/.*", "/boot"] + #regex = true + #case_sensitive = false + #whole_word = false + + #[temp_filter] + #is_list_ignored = true + #list = ["cpu", "wifi"] + #regex = false + #case_sensitive = false + #whole_word = false + + #[net_filter] + #is_list_ignored = true + #list = ["virbr0.*"] + #regex = true + #case_sensitive = false + #whole_word = false + ''; } diff --git a/meta/spotify/default.nix b/meta/spotify/default.nix index 237066e..034edb9 100644 --- a/meta/spotify/default.nix +++ b/meta/spotify/default.nix @@ -4,5 +4,6 @@ spotify-player ncspot psst + playerctl ]; } |