diff --git a/flake.nix b/flake.nix index ced1b43..3376e53 100644 --- a/flake.nix +++ b/flake.nix @@ -196,6 +196,7 @@ nix-prefetch-scripts nix-prefetch-github nix-prefetch-docker + nixos-install-tools ]; }; diff --git a/home-manager/modules/i3/default.nix b/home-manager/modules/i3/default.nix new file mode 100644 index 0000000..260712c --- /dev/null +++ b/home-manager/modules/i3/default.nix @@ -0,0 +1,309 @@ +{ lib +, pkgs +, config +, ... +}: +with lib; let + cfg = config.eboskma.programs.i3; + mod = "Mod4"; + i3lockcmd = "i3lock --image ${toString ./wallpapers/jwst-southern-ring-nircam-miri-side-by-side-3840.png} --color=333333ff --tiling --ignore-empty-password --show-failed-attempts --screen=0 --clock --pass-volume-keys"; + rofiPower = pkgs.writeShellScriptBin "rofi-power" (builtins.readFile ./powermenu.sh); + left = "n"; + down = "e"; + up = "i"; + right = "o"; + + workspacePartition = + builtins.partition (n: (trivial.mod n 2) != 0) (lists.range 1 10); + + installSessionScript = pkgs.writeShellScriptBin "install-session" '' + sudo ln -fs ${pkgs.i3-gaps}/share/xsessions/i3.desktop /usr/share/xsessions/i3.desktop + sudo ln -fs ${pkgs.i3-gaps}/share/xsessions/i3-with-shmlog.desktop /usr/share/xsessions/i3-with-shmlog.desktop + ''; + + remoteSessionScript = pkgs.writeShellScriptBin "remote-session" '' + ${pkgs.xorg.xrandr}/bin/xrandr --output DP-0 --mode 2560x1440 + ${pkgs.xorg.xrandr}/bin/xrandr --output DP-4 --mode 2560x1440 --right-of DP-0 + ${pkgs.nitrogen}/bin/nitrogen --head=0 --set-auto ${toString ./wallpapers/jwst-carina-cosmic-cliffs-nircam-2560.png} + ${pkgs.nitrogen}/bin/nitrogen --head=1 --set-auto ${toString ./wallpapers/jwst-southern-ring-nircam-miri-side-by-side-2560.png} + systemctl --user restart polybar + ''; + localSessionScript = pkgs.writeShellScriptBin "local-session" '' + ${pkgs.xorg.xrandr}/bin/xrandr --output DP-0 --mode 3840x2160 + ${pkgs.xorg.xrandr}/bin/xrandr --output DP-4 --mode 3840x2160 --right-of DP-0 + ${pkgs.nitrogen}/bin/nitrogen --head=0 --set-auto ${toString ./wallpapers/jwst-carina-cosmic-cliffs-nircam-3840.png} + ${pkgs.nitrogen}/bin/nitrogen --head=1 --set-auto ${toString ./wallpapers/jwst-southern-ring-nircam-miri-side-by-side-3840.png} + systemctl --user restart polybar + ''; + + menu = "${pkgs.rofi}/bin/rofi -show drun -no-lazy-grab"; +in +{ + options.eboskma.programs.i3.enable = mkEnableOption "Enable i3"; + + config = mkIf cfg.enable { + xsession = { + enable = true; + windowManager.i3 = { + enable = true; + package = pkgs.i3-gaps; + config = { + inherit menu; + modifier = mod; + + assigns = { + "1" = [{ class = "Firefox"; }]; + "2" = [{ class = "Alacritty"; } { class = "foot"; }]; + "3" = [{ class = "Code"; }]; + "4" = [{ class = "telegramdesktop"; } { class = "Signal"; }]; + }; + # Dracula theme + colors = { + background = "#f8f8f2"; + focused = { + border = "#6272a4"; + background = "#6272A4"; + text = "#f8f8f2"; + indicator = "#6272a4"; + childBorder = "#6272a4"; + }; + focusedInactive = { + border = "#44475a"; + background = "#44475a"; + text = "#f8f8f2"; + indicator = "#44475a"; + childBorder = "#44475a"; + }; + unfocused = { + border = "#282a36"; + background = "#282a36"; + text = "#bfbfbf"; + indicator = "#282a36"; + childBorder = "#282a36"; + }; + urgent = { + border = "#44475a"; + background = "#ff5555"; + text = "#f8f8f2"; + indicator = "#ff5555"; + childBorder = "#ff5555"; + }; + placeholder = { + border = "#282a36"; + background = "#282a36"; + text = "#f8f8f2"; + indicator = "#282a36"; + childBorder = "#282a36"; + }; + }; + + floating = { + criteria = [{ instance = "gnome-calculator"; } { class = "Pavucontrol"; }]; + modifier = mod; + }; + + fonts = { + names = [ "Iosevka Nerd Font" ]; + style = "Regular"; + size = 12.0; + }; + + gaps = { + inner = 10; + outer = 5; + smartBorders = "on"; + }; + + keybindings = { + "${mod}+Return" = "exec --no-startup-id ${config.xsession.windowManager.i3.config.terminal}"; + "${mod}+Shift+q" = "kill"; + "${mod}+s" = "exec --no-startup-id ${config.xsession.windowManager.i3.config.menu}"; + "${mod}+Shift+s" = "exec --no-startup-id ${pkgs.rofi}/bin/rofi -no-lazy-grab -show run"; + + "${mod}+${left}" = "focus left"; + "${mod}+${down}" = "focus down"; + "${mod}+${up}" = "focus up"; + "${mod}+${right}" = "focus right"; + + "${mod}+Left" = "focus left"; + "${mod}+Down" = "focus down"; + "${mod}+Up" = "focus up"; + "${mod}+Right" = "focus right"; + + "${mod}+Shift+${left}" = "move left"; + "${mod}+Shift+${down}" = "move down"; + "${mod}+Shift+${up}" = "move up"; + "${mod}+Shift+${right}" = "move right"; + + "${mod}+Shift+Left" = "move left"; + "${mod}+Shift+Down" = "move down"; + "${mod}+Shift+Up" = "move up"; + "${mod}+Shift+Right" = "move right"; + + "${mod}+h" = "split h"; + "${mod}+v" = "split v"; + "${mod}+t" = "fullscreen toggle"; + "${mod}+a" = "focus parent"; + + "${mod}+r" = "layout stacking"; + "${mod}+w" = "layout tabbed"; + "${mod}+f" = "layout toggle split"; + + "${mod}+Shift+space" = "floating toggle"; + "${mod}+space" = "focus mode_toggle"; + + "${mod}+1" = "workspace number 1"; + "${mod}+2" = "workspace number 2"; + "${mod}+3" = "workspace number 3"; + "${mod}+4" = "workspace number 4"; + "${mod}+5" = "workspace number 5"; + "${mod}+6" = "workspace number 6"; + "${mod}+7" = "workspace number 7"; + "${mod}+8" = "workspace number 8"; + "${mod}+9" = "workspace number 9"; + "${mod}+0" = "workspace number 10"; + + "${mod}+Shift+1" = "move container to workspace number 1"; + "${mod}+Shift+2" = "move container to workspace number 2"; + "${mod}+Shift+3" = "move container to workspace number 3"; + "${mod}+Shift+4" = "move container to workspace number 4"; + "${mod}+Shift+5" = "move container to workspace number 5"; + "${mod}+Shift+6" = "move container to workspace number 6"; + "${mod}+Shift+7" = "move container to workspace number 7"; + "${mod}+Shift+8" = "move container to workspace number 8"; + "${mod}+Shift+9" = "move container to workspace number 9"; + "${mod}+Shift+0" = "move container to workspace number 10"; + + "${mod}+Shift+minus" = "move scratchpad"; + "${mod}+minus" = "scratchpad show"; + + "${mod}+Shift+c" = "reload"; + "${mod}+Shift+p" = "restart"; + + "${mod}+Shift+f" = "exec --no-startup-id ${rofiPower}/bin/rofi-power"; + "${mod}+l" = "exec --no-startup-id ${i3lockcmd}"; + "${mod}+p" = "mode resize"; + + "${mod}+Pause" = "mode passthrough"; + + "${mod}+c" = "exec --no-startup-id emacsclient -c"; + + "${mod}+Print" = "exec --no-startup-id ${pkgs.maim}/bin/maim --window $(${pkgs.xdotool}/bin/xdotool getactivewindow) ~/$(${pkgs.coreutils}/bin/date '+%Y-%m-%d-%T)-screenshot.png"; + "${mod}+Shift+Print" = "exec --no-startup-id ${pkgs.maim}/bin/maim --window $(${pkgs.xdotool}/bin/xdotool getactivewindow) | ${pkgs.xclip}/bin/xclip -selection clipboard -t image/png"; + "${mod}+Shift+Ctrl+Print" = "exec --no-startup-id ${pkgs.maim}/bin/maim -s | ${pkgs.xclip}/bin/xclip -selection clipboard -t image/png"; + + "XF86AudioRaiseVolume" = "exec --no-startup-id ${pkgs.pamedia}/bin/pamedia up"; + "XF86AudioLowerVolume" = "exec --no-startup-id ${pkgs.pamedia}/bin/pamedia down"; + "XF86AudioMute" = "exec --no-startup-id ${pkgs.pamedia}/bin/pamedia mute"; + "XF86Calculator" = "exec ${pkgs.gnome.gnome-calculator}/bin/gnome-calculator"; + }; + + modes = { + passthrough = { + "${mod}+Pause" = "mode default"; + }; + }; + + # terminal = "${pkgs.alacritty}/bin/alacritty"; + terminal = "/usr/bin/alacritty"; + + window = { + border = 1; + titlebar = false; + }; + + bars = [ ]; + + workspaceAutoBackAndForth = true; + workspaceOutputAssign = builtins.concatLists (builtins.attrValues (builtins.mapAttrs + ( + name: workspaces: + let + output = + if name == "right" + then "DP-0" + else "DP-4"; + in + builtins.map + (ws: { + inherit output; + workspace = toString ws; + }) + workspaces + ) + workspacePartition)); + # [ + # { output = "DP-0"; workspace = "1"; } + # ]; + + startup = [ + { + command = "/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1"; + notification = false; + } + # { + # command = "/home/erwin/.config/polybar/launch.sh --shades"; + # notification = false; + # always = true; + # } + { + command = "${pkgs.networkmanagerapplet}/bin/nm-applet"; + notification = false; + } + { + command = ''${pkgs.xorg.xinput}/bin/xinput set-int-prop "Logitech USB Laser Mouse" "libinput Natural Scrolling Enabled" 8 1''; + notification = false; + always = true; + } + { + command = ''${pkgs.xorg.xinput}/bin/xinput set-float-prop "Logitech USB Laser Mouse" "libinput Accel Speed" 1''; + notification = false; + always = true; + } + { + command = "${pkgs.xorg.xrandr}/bin/xrandr --output DP-0 --primary --left-of DP-4"; + notification = false; + } + # { + # command = "${pkgs.nitrogen}/bin/nitrogen --restore"; + # notification = false; + # } + # { + # command = "${pkgs.tdesktop}/bin/telegram-desktop"; + # notification = false; + # } + { + command = "${pkgs.xorg.xset}/bin/xset +dpms dpms 900 1200 1500"; + notification = false; + } + { + command = "${pkgs.dropbox}/bin/dropbox start"; + notification = false; + } + ]; + }; + extraConfig = '' + ''; + }; + }; + + eboskma.wallpapers = { + enable = true; + images = [ + ./wallpapers/river-3840.png + ./wallpapers/jwst-pillars-of-creation-3840.jpg + ]; + }; + + home = { + file.".wallpapers".source = ./wallpapers; + + packages = with pkgs; [ + dunst + installSessionScript + localSessionScript + remoteSessionScript + ]; + }; + }; +} diff --git a/home-manager/modules/i3/powermenu.sh b/home-manager/modules/i3/powermenu.sh new file mode 100755 index 0000000..306a80e --- /dev/null +++ b/home-manager/modules/i3/powermenu.sh @@ -0,0 +1,54 @@ +#!/bin/bash + +confirm() { + rofi -dmenu \ + -i \ + -no-fixed-num-lines \ + -p "Are you sure? [y/n]: " \ + -theme power +} + +# Options +shutdown="" +reboot="" +lock="" +hibernate="" +exit_wm="" + +# Variable passed to rofi +options="${shutdown}\n${reboot}\n${lock}\n${hibernate}\n${exit_wm}" +uptime=$(uptime | awk '{print $1}' || true) +lockcmd="i3lock --ignore-empty-password --show-failed-attempts --clock --color=333333ff --screen=0 --pass-volume-keys --image /home/erwin/.wallpapers/river-3840.png --tiling" + +chosen="$(echo -e "${options}" | rofi -theme power -p "Uptime: ${uptime}" -dmenu -selected-row 2)" + +if [[ "${chosen}" == "" ]]; then + exit 0 +fi + +if [[ "${chosen}" == "${lock}" ]]; then + ${lockcmd} + exit 0 +fi + +answer=$(confirm) + +if [[ "${answer}" == "y" ]]; then + case "${chosen}" in + "${shutdown}") + systemctl poweroff + ;; + "${reboot}") + systemctl reboot + ;; + "${hibernate}") + ${lockcmd} + systemctl hibernate + ;; + "${exit_wm}") + i3-msg exit + ;; + *) ;; + + esac +fi diff --git a/home-manager/modules/i3/wallpapers/black-panther-2560.jpg b/home-manager/modules/i3/wallpapers/black-panther-2560.jpg new file mode 100644 index 0000000..2b3299d Binary files /dev/null and b/home-manager/modules/i3/wallpapers/black-panther-2560.jpg differ diff --git a/home-manager/modules/i3/wallpapers/black-panther-3840.jpg b/home-manager/modules/i3/wallpapers/black-panther-3840.jpg new file mode 100644 index 0000000..f154d6b Binary files /dev/null and b/home-manager/modules/i3/wallpapers/black-panther-3840.jpg differ diff --git a/home-manager/modules/i3/wallpapers/jwst-carina-cosmic-cliffs-nircam-2560.png b/home-manager/modules/i3/wallpapers/jwst-carina-cosmic-cliffs-nircam-2560.png new file mode 100644 index 0000000..391990d Binary files /dev/null and b/home-manager/modules/i3/wallpapers/jwst-carina-cosmic-cliffs-nircam-2560.png differ diff --git a/home-manager/modules/i3/wallpapers/jwst-carina-cosmic-cliffs-nircam-3840.png b/home-manager/modules/i3/wallpapers/jwst-carina-cosmic-cliffs-nircam-3840.png new file mode 100644 index 0000000..ae05dff Binary files /dev/null and b/home-manager/modules/i3/wallpapers/jwst-carina-cosmic-cliffs-nircam-3840.png differ diff --git a/home-manager/modules/i3/wallpapers/jwst-carina-cosmic-cliffs-nircam-miri-composite-2560.png b/home-manager/modules/i3/wallpapers/jwst-carina-cosmic-cliffs-nircam-miri-composite-2560.png new file mode 100644 index 0000000..bb09674 Binary files /dev/null and b/home-manager/modules/i3/wallpapers/jwst-carina-cosmic-cliffs-nircam-miri-composite-2560.png differ diff --git a/home-manager/modules/i3/wallpapers/jwst-carina-cosmic-cliffs-nircam-miri-composite-3840.png b/home-manager/modules/i3/wallpapers/jwst-carina-cosmic-cliffs-nircam-miri-composite-3840.png new file mode 100644 index 0000000..6d82274 Binary files /dev/null and b/home-manager/modules/i3/wallpapers/jwst-carina-cosmic-cliffs-nircam-miri-composite-3840.png differ diff --git a/home-manager/modules/i3/wallpapers/jwst-pillars-of-creation-1920.jpg b/home-manager/modules/i3/wallpapers/jwst-pillars-of-creation-1920.jpg new file mode 100644 index 0000000..f8974b9 Binary files /dev/null and b/home-manager/modules/i3/wallpapers/jwst-pillars-of-creation-1920.jpg differ diff --git a/home-manager/modules/i3/wallpapers/jwst-pillars-of-creation-2560.jpg b/home-manager/modules/i3/wallpapers/jwst-pillars-of-creation-2560.jpg new file mode 100644 index 0000000..31eccb8 Binary files /dev/null and b/home-manager/modules/i3/wallpapers/jwst-pillars-of-creation-2560.jpg differ diff --git a/home-manager/modules/i3/wallpapers/jwst-pillars-of-creation-3840.jpg b/home-manager/modules/i3/wallpapers/jwst-pillars-of-creation-3840.jpg new file mode 100644 index 0000000..72ee840 Binary files /dev/null and b/home-manager/modules/i3/wallpapers/jwst-pillars-of-creation-3840.jpg differ diff --git a/home-manager/modules/i3/wallpapers/jwst-southern-ring-nircam-miri-side-by-side-2560.png b/home-manager/modules/i3/wallpapers/jwst-southern-ring-nircam-miri-side-by-side-2560.png new file mode 100644 index 0000000..3744d70 Binary files /dev/null and b/home-manager/modules/i3/wallpapers/jwst-southern-ring-nircam-miri-side-by-side-2560.png differ diff --git a/home-manager/modules/i3/wallpapers/jwst-southern-ring-nircam-miri-side-by-side-3840.png b/home-manager/modules/i3/wallpapers/jwst-southern-ring-nircam-miri-side-by-side-3840.png new file mode 100644 index 0000000..62349f9 Binary files /dev/null and b/home-manager/modules/i3/wallpapers/jwst-southern-ring-nircam-miri-side-by-side-3840.png differ diff --git a/home-manager/modules/i3/wallpapers/river-1920.png b/home-manager/modules/i3/wallpapers/river-1920.png new file mode 100644 index 0000000..d63e8b2 Binary files /dev/null and b/home-manager/modules/i3/wallpapers/river-1920.png differ diff --git a/home-manager/modules/i3/wallpapers/river-2560.png b/home-manager/modules/i3/wallpapers/river-2560.png new file mode 100644 index 0000000..cf295cc Binary files /dev/null and b/home-manager/modules/i3/wallpapers/river-2560.png differ diff --git a/home-manager/modules/i3/wallpapers/river-3840.png b/home-manager/modules/i3/wallpapers/river-3840.png new file mode 100644 index 0000000..acf5af4 Binary files /dev/null and b/home-manager/modules/i3/wallpapers/river-3840.png differ diff --git a/home-manager/modules/mpd/default.nix b/home-manager/modules/mpd/default.nix new file mode 100644 index 0000000..e0fd392 --- /dev/null +++ b/home-manager/modules/mpd/default.nix @@ -0,0 +1,25 @@ +{ pkgs +, config +, lib +, ... +}: +with lib; let + cfg = config.eboskma.programs.mpd; +in +{ + options.eboskma.programs.mpd = { enable = mkEnableOption "mpd"; }; + + config = mkIf (cfg.enable) { + services.mpd = { + enable = true; + network = { + startWhenNeeded = true; + }; + }; + + services.mpdris2 = { + enable = true; + notifications = true; + }; + }; +} diff --git a/home-manager/modules/picom/default.nix b/home-manager/modules/picom/default.nix new file mode 100644 index 0000000..63d12ef --- /dev/null +++ b/home-manager/modules/picom/default.nix @@ -0,0 +1,72 @@ +{ pkgs +, config +, lib +, inputs +, ... +}: +with lib; let + cfg = config.eboskma.programs.picom; + picom = pkgs.writeShellScriptBin "picom" '' + ${pkgs.nixgl.auto.nixGLDefault}/bin/nixGL ${pkgs.picom}/bin/picom $@ + ''; +in +{ + options.eboskma.programs.picom = { enable = mkEnableOption "activate picom"; }; + + config = mkIf (cfg.enable) { + # home.packages = [pkgs.nixgl.auto.nixGLDefault]; + + services.picom = { + enable = true; + package = picom; + + backend = "glx"; + vSync = true; + experimentalBackends = true; + + fade = true; + fadeSteps = [ 0.08 0.08 ]; + + shadow = true; + + inactiveOpacity = 0.8; + + opacityRules = [ + "0:_NET_WM_STATE@[*]:32a = '_NET_WM_STATE_HIDDEN'" + "100:fullscreen" + "100:name = 'Zoom Meeting'" + "100:name = 'zoom_linux_float_video_window'" + "100:class_g = 'Rofi'" + "100:class_g = 'mpv'" + "100:window_type = 'combo'" + "100:window_type = 'dock'" + "100:window_type = 'dropdown_menu'" + "100:window_type = 'menu'" + "100:window_type = 'popup_menu'" + "100:window_type = 'splash'" + "100:window_type = 'tooltip'" + "100:window_type = 'utility'" + "90:!focused" + ]; + + settings = { + unredir-if-possible = false; + mark-ovredir-focused = true; + use-ewmh-active-win = true; + blur = { + method = "gaussian"; + size = 10; + deviation = 5.0; + }; + inactive-dim = 0.2; + + wintypes = { + dock = { shadow = false; }; + dnd = { shadow = false; }; + popup_menu = { shadow = false; opacity = 1.0; }; + dropdown_menu = { shadow = false; opacity = 1.0; }; + }; + }; + }; + }; +} diff --git a/home-manager/modules/polybar/default.nix b/home-manager/modules/polybar/default.nix new file mode 100644 index 0000000..1de2364 --- /dev/null +++ b/home-manager/modules/polybar/default.nix @@ -0,0 +1,345 @@ +{ pkgs +, config +, lib +, ... +}: +with lib; let + cfg = config.eboskma.programs.polybar; + + colors = { + background = "#cc000000"; + foreground = "#ffffffff"; + urgent = "#c9545d"; + }; + + polybar-playerctl = + let + pythonWithPackages = pkgs.python3.withPackages (pythonPackages: [ + pythonPackages.pygobject3 + ]); + in + pkgs.stdenv.mkDerivation { + name = "polybar-playerctl"; + buildInputs = [ + pythonWithPackages + pkgs.playerctl + ]; + propagatedBuildInputs = [ + pythonWithPackages + pkgs.python3Packages.pygobject3 + pkgs.playerctl + ]; + nativeBuildInputs = [ + pkgs.gobject-introspection + pkgs.wrapGAppsHook + ]; + + strictDeps = false; + dontUnpack = true; + installPhase = '' + mkdir -p $out/bin + cp ${./scripts/polybar-playerctl} $out/bin/polybar-playerctl + chmod +x $out/bin/polybar-playerctl + ''; + }; + + headset-battery = pkgs.writeShellScript "headset-battery" '' + battery_level=$(${pkgs.headsetcontrol}/bin/headsetcontrol -c -b) + + battery_icons=(         ) + battery_charging="" + + if [ "''${battery_level}" -eq -1 ]; then + printf "%s " "''${battery_charging}" + else + idx=$(((battery_level / 10))) + if [ "''${idx}" -eq 10 ]; then + idx=9 + fi + + battery_icon="''${battery_icons[''${idx}]}" + printf "%s %i%%" "''${battery_icon}" "''${battery_level}" + fi + ''; +in +{ + options.eboskma.programs.polybar = { enable = mkEnableOption "activate polybar"; }; + + config = mkIf (cfg.enable) { + # systemd.user.services.polybar = { + # Install = { WantedBy = [ "graphical-session.target" ]; }; + # }; + + services.polybar = { + enable = true; + package = pkgs.polybarFull.override { + i3GapsSupport = true; + }; + + script = '' + ${pkgs.polybar}/bin/polybar-msg cmd quit + while ${pkgs.procps}/bin/pgrep -u ''${UID} -x polybar > /dev/null; do sleep 0.1; done + + outputs=$(${pkgs.polybar}/bin/polybar -m | ${pkgs.coreutils}/bin/cut -d ':' -f 1) + primary=$(${pkgs.polybar}/bin/polybar -m | ${pkgs.gnugrep}/bin/grep primary | ${pkgs.coreutils}/bin/cut -d ':' -f 1) + + for m in ''${outputs}; do + MONITOR=''${m} polybar -q main & disown + done + ''; + + settings = { + "global/wm" = { + margin.bottom = 0; + margin.top = 0; + }; + + "bar/main" = { + monitor = ''''${env:MONITOR:DP-0}''; + fixed.center = true; + width = "100%"; + height = 48; + # offset.x = "1%"; + # offset.y = "2%"; + offset.x = 0; + offset.y = 0; + background = "${colors.background}"; + foreground = "${colors.foreground}"; + line.size = 2; + + font = [ + "Monofur Nerd Font:style=Bold:size=16;2" + "Monofur Nerd Font:size=18;3" + "Monofur Nerd Font:size=20;4" + ]; + + modules = { + left = "launcher workspaces playerctl"; + center = "date"; + right = "headset-battery memory cpu pulseaudio network"; + }; + + dim.value = 0.8; + + tray = { + position = "right"; + detached = false; + maxsize = 24; + background = "${colors.background}"; + offset.x = 0; + offset.y = 0; + padding = 0; + scale = 1.0; + }; + + enable.ipc = true; + + cursor = { + click = "pointer"; + }; + }; + + settings = { + screenchange.reload = false; + throttle.output.text = 5; + throttle.output.for = 10; + + compositing = { + background = "source"; + foreground = "over"; + overline = "over"; + underline = "over"; + border = "over"; + }; + + pseudo.transparency = false; + }; + + "module/launcher" = { + type = "custom/text"; + content.text = ""; + content.padding = 2; + + click.left = "${pkgs.rofi}/bin/rofi -show drun -no-lazy-grab"; + }; + + "module/workspaces" = { + # type = "internal/xworkspaces"; + # pin.workspaces = true; + # enable.click = true; + # enable.scroll = true; + + # icon.text = [ "1;" "2;" "3;" "4;" "5;" ]; + # icon.default = ""; + + # format.text = ""; + # format.padding = 1; + + # label.active.text = ""; + # label.occupied.text = ""; + # label.empty.text = ""; + + # label.urgent.text = ""; + # label.urgent.background = "${colors.urgent}"; + + # label.active.padding = 1; + # label.urgent.padding = 1; + # label.occupied.padding = 1; + # label.empty.padding = 1; + + type = "internal/i3"; + pin.workspaces = true; + strip.wsnumbers = true; + enable.click = true; + enable.scroll = true; + + # ws.icon.text = [ "1;" "2;" "3;" "4;" "5;" "6;" "7;" "8;" "9;" "10;" ]; + # ws.icon.text = [ "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" ]; + # ws.icon.default = ""; + + format = " "; + + label.mode.text = "%mode%"; + label.mode.padding = 1; + + # label.focused.text = ""; + label.focused.text = "%index%"; + label.focused.padding = 1; + label.focused.background = "#333333"; + label.focused.underline = "#ffffff"; + + # label.unfocused.text = ""; + label.unfocused.text = "%index%"; + label.unfocused.padding = 1; + + # label.visible.text = ""; + label.visible.text = "%index%"; + label.visible.padding = 1; + + # label.urgent.text = ""; + label.urgent.text = "%index%"; + label.urgent.background = "${colors.urgent}"; + label.urgent.padding = 1; + }; + + "module/playerctl" = { + type = "custom/script"; + exec = "${polybar-playerctl}/bin/polybar-playerctl"; + interval = 1; + click.left = "${polybar-playerctl}/bin/polybar-playerctl play-pause"; + click.middle = "${polybar-playerctl}/bin/polybar-playerctl next"; + click.right = "${polybar-playerctl}/bin/polybar-playerctl prevous"; + format.padding = 2; + + scroll.up = "${polybar-playerctl}/bin/polybar-playerctl next-player"; + }; + + "module/date" = { + type = "internal/date"; + interval = 1.0; + time.text = " %H:%M:%S"; + time.alt = " %a, %d %b %Y"; + + format.text = "