diff options
Diffstat (limited to 'files')
30 files changed, 2217 insertions, 0 deletions
diff --git a/files/convolver/Focal_Elegia_minimum_phase_44100Hz.wav b/files/convolver/Focal_Elegia_minimum_phase_44100Hz.wav Binary files differnew file mode 100644 index 0000000..6620260 --- /dev/null +++ b/files/convolver/Focal_Elegia_minimum_phase_44100Hz.wav diff --git a/files/convolver/Focal_Elegia_minimum_phase_48000Hz.wav b/files/convolver/Focal_Elegia_minimum_phase_48000Hz.wav Binary files differnew file mode 100644 index 0000000..ea009c2 --- /dev/null +++ b/files/convolver/Focal_Elegia_minimum_phase_48000Hz.wav diff --git a/files/dtb/bcm2710-rpi-3-b.dtb_latest b/files/dtb/bcm2710-rpi-3-b.dtb_latest Binary files differnew file mode 100644 index 0000000..5846b9f --- /dev/null +++ b/files/dtb/bcm2710-rpi-3-b.dtb_latest diff --git a/files/dtb/bcm2837-rpi-3-b.dtb b/files/dtb/bcm2837-rpi-3-b.dtb Binary files differnew file mode 100644 index 0000000..6240703 --- /dev/null +++ b/files/dtb/bcm2837-rpi-3-b.dtb diff --git a/files/dtb/bcm2837-rpi-3-b.dtb_merged b/files/dtb/bcm2837-rpi-3-b.dtb_merged Binary files differnew file mode 100644 index 0000000..d7c5385 --- /dev/null +++ b/files/dtb/bcm2837-rpi-3-b.dtb_merged diff --git a/files/dtb/justboom-digi-overlay.dts b/files/dtb/justboom-digi-overlay.dts new file mode 100644 index 0000000..c4c9682 --- /dev/null +++ b/files/dtb/justboom-digi-overlay.dts @@ -0,0 +1,41 @@ +// Definitions for JustBoom Digi +/dts-v1/; +/plugin/; + +/ { + compatible = "brcm,bcm2835"; + + fragment@0 { + target = <&i2s_clk_consumer>; + __overlay__ { + status = "okay"; + }; + }; + + fragment@1 { + target = <&i2c1>; + __overlay__ { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + wm8804@3b { + #sound-dai-cells = <0>; + compatible = "wlf,wm8804"; + reg = <0x3b>; + PVDD-supply = <&vdd_3v3_reg>; + DVDD-supply = <&vdd_3v3_reg>; + status = "okay"; + }; + }; + }; + + fragment@2 { + target = <&sound>; + __overlay__ { + compatible = "justboom,justboom-digi"; + i2s-controller = <&i2s_clk_consumer>; + status = "okay"; + }; + }; +}; diff --git a/files/firefox/user-overrides.js b/files/firefox/user-overrides.js new file mode 100644 index 0000000..f168fa7 --- /dev/null +++ b/files/firefox/user-overrides.js @@ -0,0 +1,108 @@ +// user.js overrides +user_pref("network.http.referer.XOriginTrimmingPolicy", 2); +user_pref("network.http.referer.XOriginPolicy", 0); +user_pref("privacy.resistFingerprinting", true); +user_pref("keyword.enabled", true); + +// Greatly increase memory-only cache size +user_pref("browser.cache.memory.capacity", 524288); + +// Disable unwanted urlbar suggestions +user_pref("browser.urlbar.suggest.topsites", false); +user_pref("browser.urlbar.suggest.searches", false); +user_pref("browser.urlbar.suggest.remotetab", false); +user_pref("browser.urlbar.suggest.engines", false); +user_pref("browser.urlbar.suggest.addons", false); +user_pref("browser.urlbar.suggest.bestmatch", false); +user_pref("browser.urlbar.suggest.calculator", false); +user_pref("browser.urlbar.suggest.mdn", false); +user_pref("browser.urlbar.suggest.openpage", false); +user_pref("browser.urlbar.suggest.pocket", false); +user_pref("browser.urlbar.suggest.trending", false); +user_pref("browser.urlbar.suggest.weather", false); +user_pref("browser.urlbar.merino.enabled", false); +user_pref("browser.urlbar.quicksuggest.enabled", false); + +// Disable pocket +user_pref("extensions.pocket.enabled", false); +user_pref("browser.urlbar.suggest.pocket", false); + +// Disable screenshot extension +user_pref("extensions.screenshots.disabled", true); + +// Disable picture-in-picture +user_pref("media.videocontrols.picture-in-picture.video-toggle.enabled", false); + +// Disable video autoplay by default +user_pref("media.autoplay.default", 5); + +// Enable WebGL +user_pref("webgl.disabled", false); + +// Enable DRM, Disable DRM UI +user_pref("media.eme.enabled", true); +user_pref("browser.eme.ui.enabled", false); + +// Change annoying keybinds +user_pref("ui.key.menuAccessKey", 17); +user_pref("ui.key.menuAccessKeyFocuses", false); +user_pref("mousebutton.4th.enabled", false); +user_pref("mousebutton.5th.enabled", false); + +// Good smooth-scrolling +user_pref("general.smoothScroll.mouseWheel.durationMaxMS", 250); +user_pref("general.smoothScroll.mouseWheel.durationMinMS", 250); +user_pref("general.smoothScroll.msdPhysics.enabled", true); +user_pref("general.smoothScroll.msdPhysics.motionBeginSpringConstant", 400); +user_pref("general.smoothScroll.msdPhysics.regularSpringConstant", 600); +user_pref("general.smoothScroll.msdPhysics.slowdownMinDeltaMS", 120); +user_pref("general.smoothScroll.other.durationMaxMS", 500); +user_pref("general.smoothScroll.pages.durationMaxMS", 500); +user_pref("general.smoothScroll.stopDecelerationWeighting", "0.8"); +user_pref("mousewheel.default.delta_multiplier_x", 200); +user_pref("mousewheel.default.delta_multiplier_y", 200); +user_pref("mousewheel.min_line_scroll_amount", 22); + +// Performance +user_pref("gfx.webrender.enabled", true); +user_pref("gfx.webrender.all", true); + +// Hardware accelerated video decoding +user_pref("media.ffmpeg.vaapi.enabled", true); + +// Disable pop-up when using mic +user_pref("privacy.webrtc.legacyGlobalIndicator", false); + +// PipeWire stuff +user_pref("reader.parse-on-load.enabled", false); +user_pref("media.webspeech.synth.enabled", false); + +// Disable "sign into sync" +user_pref("identity.fxaccounts.enabled", false); + +// userChrome.css +user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", true); +user_pref("browser.uidensity", 0); +user_pref("svg.context-properties.content.enabled", true); +user_pref("browser.theme.dark-private-windows", false); +user_pref("browser.tabs.drawInTitlebar", true); + +// Gnome theme +user_pref("gnomeTheme.normalWidthTabs", true); + +// Hide bookmarks +user_pref("browser.toolbars.bookmarks.visibility", "never"); + +// No titlebar +user_pref("browser.tabs.inTitlebar", 0); + +// Disable gestures +user_pref("apz.gtk.pangesture.enabled", false); + +// Disable firefox view +user_pref("browser.tabs.firefox-view", false); +user_pref("browser.tabs.firefox-view-next", false); + +// Disable tab preview +user_pref("browser.tabs.hoverPreview.enabled", false); +user_pref("browser.tabs.hoverPreview.showThumbnails", false); diff --git a/files/fonts/APL387.ttf b/files/fonts/APL387.ttf Binary files differnew file mode 100644 index 0000000..8775d06 --- /dev/null +++ b/files/fonts/APL387.ttf diff --git a/files/fonts/Lotion-BlackItalicWithoutLigatures.ttf b/files/fonts/Lotion-BlackItalicWithoutLigatures.ttf Binary files differnew file mode 100644 index 0000000..d82945c --- /dev/null +++ b/files/fonts/Lotion-BlackItalicWithoutLigatures.ttf diff --git a/files/fonts/Lotion-BlackWithoutLigatures.ttf b/files/fonts/Lotion-BlackWithoutLigatures.ttf Binary files differnew file mode 100644 index 0000000..4947057 --- /dev/null +++ b/files/fonts/Lotion-BlackWithoutLigatures.ttf diff --git a/files/fonts/Lotion-BoldItalicWithoutLigatures.ttf b/files/fonts/Lotion-BoldItalicWithoutLigatures.ttf Binary files differnew file mode 100644 index 0000000..34b4bbd --- /dev/null +++ b/files/fonts/Lotion-BoldItalicWithoutLigatures.ttf diff --git a/files/fonts/Lotion-BoldWithoutLigatures.ttf b/files/fonts/Lotion-BoldWithoutLigatures.ttf Binary files differnew file mode 100644 index 0000000..e96696a --- /dev/null +++ b/files/fonts/Lotion-BoldWithoutLigatures.ttf diff --git a/files/fonts/Lotion-ItalicWithoutLigatures.ttf b/files/fonts/Lotion-ItalicWithoutLigatures.ttf Binary files differnew file mode 100644 index 0000000..81663b9 --- /dev/null +++ b/files/fonts/Lotion-ItalicWithoutLigatures.ttf diff --git a/files/fonts/Lotion-RegularWithoutLigatures.ttf b/files/fonts/Lotion-RegularWithoutLigatures.ttf Binary files differnew file mode 100644 index 0000000..ece8742 --- /dev/null +++ b/files/fonts/Lotion-RegularWithoutLigatures.ttf diff --git a/files/fonts/Lotion-SemiBoldItalicWithoutLigatures.ttf b/files/fonts/Lotion-SemiBoldItalicWithoutLigatures.ttf Binary files differnew file mode 100644 index 0000000..93ad0c4 --- /dev/null +++ b/files/fonts/Lotion-SemiBoldItalicWithoutLigatures.ttf diff --git a/files/fonts/Lotion-SemiBoldWithoutLigatures.ttf b/files/fonts/Lotion-SemiBoldWithoutLigatures.ttf Binary files differnew file mode 100644 index 0000000..fdd04c8 --- /dev/null +++ b/files/fonts/Lotion-SemiBoldWithoutLigatures.ttf diff --git a/files/gdbinit b/files/gdbinit new file mode 100644 index 0000000..53c7be0 --- /dev/null +++ b/files/gdbinit @@ -0,0 +1,2 @@ +set auto-load safe-path / +set pagination off diff --git a/files/hollywood_uptodate.diff b/files/hollywood_uptodate.diff new file mode 100644 index 0000000..97b025d --- /dev/null +++ b/files/hollywood_uptodate.diff @@ -0,0 +1,487 @@ +diff --git a/bin/hollywood b/bin/hollywood +index 63471ee..917811c 100755 +--- a/bin/hollywood ++++ b/bin/hollywood +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#! /usr/bin/env bash + # N.B.: Use bash for $RANDOM + # + # hollywood: create a hollywood suitable consoles of tech geekery +@@ -74,7 +74,8 @@ if [ -z "$TMUX" ]; then + else + tmux_launcher=tmux + fi +- $tmux_launcher new-session -d -s $PKG "/bin/bash" ++ $tmux_launcher new-session -d -s $PKG "/usr/bin/env bash" ++ $tmux_launcher bind -n C-c kill-session + $tmux_launcher send-keys -t $PKG "$0 -s $SPLITS -d $DELAY" + $tmux_launcher send-keys -t $PKG Enter + exec $tmux_launcher attach-session -t $PKG +@@ -83,7 +84,9 @@ fi + + tmux new-window -n $PKG "$WIDGET_DIR/$widget1" \; \ + set-option -g pane-active-border-bg "default" \; \ +- set-option -g pane-active-border-fg "default" >/dev/null 2>&1 ++ set-option -g pane-active-border-fg "default" \; ++ set-option -g remain-on-exit "off" \; ++ >/dev/null 2>&1 + + spin_up + +diff --git a/bin/wallstreet b/bin/wallstreet +index 5463c89..fa14c5b 100755 +--- a/bin/wallstreet ++++ b/bin/wallstreet +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#! /usr/bin/env bash + # N.B.: Use bash for $RANDOM + # + # wallstreet: create wallstreet suitable consoles of news nerdery +@@ -42,7 +42,8 @@ if [ -z "$TMUX" ]; then + else + tmux_launcher=tmux + fi +- $tmux_launcher new-session -d -s $PKG "/bin/bash" ++ $tmux_launcher new-session -d -s $PKG "/usr/bin/env bash" ++ $tmux_launcher bind -n C-c kill-session + $tmux_launcher send-keys -t $PKG "$0 $1" + $tmux_launcher send-keys -t $PKG Enter + exec $tmux_launcher attach-session -t $PKG +diff --git a/lib/hollywood/apg b/lib/hollywood/apg +index 3dcea9f..15cc295 100755 +--- a/lib/hollywood/apg ++++ b/lib/hollywood/apg +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#! /usr/bin/env sh + # + # Copyright 2014 Dustin Kirkland <dustin.kirkland@gmail.com> + # +@@ -16,7 +16,9 @@ + + command -v apg >/dev/null 2>&1 || exit 1 + +-trap "pkill -f -9 lib/hollywood/ >/dev/null 2>&1; exit" INT ++set -e ++set -o pipefail ++#trap "pkill -f -9 lib/hollywood/ >/dev/null 2>&1; exit" INT + while true; do + apg -qlt -c /dev/urandom -n 1 -m 4 | ccze -A -c default=$(printf "red\ngreen\nyellow\nblue\nmagenta\ncyan" | sort -R | head -n1) + sleep 0.2 +diff --git a/lib/hollywood/atop b/lib/hollywood/atop +index 8822296..b175e1c 100755 +--- a/lib/hollywood/atop ++++ b/lib/hollywood/atop +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#! /usr/bin/env sh + # + # Copyright 2019 Dustin Kirkland <dustin.kirkland@gmail.com> + # +@@ -16,7 +16,9 @@ + + command -v atop >/dev/null 2>&1 || exit 1 + +-trap "pkill -f -9 lib/hollywood/ >/dev/null 2>&1; exit" INT ++set -e ++set -o pipefail ++#trap "pkill -f -9 lib/hollywood/ >/dev/null 2>&1; exit" INT + while true; do + atop + done +diff --git a/lib/hollywood/bmon b/lib/hollywood/bmon +index 1361709..ea71235 100755 +--- a/lib/hollywood/bmon ++++ b/lib/hollywood/bmon +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#! /usr/bin/env sh + # + # Copyright 2014 Dustin Kirkland <dustin.kirkland@gmail.com> + # +diff --git a/lib/hollywood/cmatrix b/lib/hollywood/cmatrix +index 1f6fc24..a3c7228 100755 +--- a/lib/hollywood/cmatrix ++++ b/lib/hollywood/cmatrix +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#! /usr/bin/env sh + # + # Copyright 2014 Dustin Kirkland <dustin.kirkland@gmail.com> + # +@@ -16,7 +16,9 @@ + + command -v cmatrix >/dev/null 2>&1 || exit 1 + +-trap "pkill -f -9 lib/hollywood/ >/dev/null 2>&1; exit" INT ++set -e ++set -o pipefail ++#trap "pkill -f -9 lib/hollywood/ >/dev/null 2>&1; exit" INT + while true; do + cmatrix -b + done +diff --git a/lib/hollywood/code b/lib/hollywood/code +index 8a40314..8a826b4 100755 +--- a/lib/hollywood/code ++++ b/lib/hollywood/code +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#! /usr/bin/env bash + # + # Copyright 2014-2023 Dustin Kirkland <dustin.kirkland@gmail.com> + # +@@ -19,9 +19,11 @@ command -v find >/dev/null 2>&1 || exit 1 + # try to colorize our code, but if not, just print it to screen + command -v pygmentize >/dev/null 2>&1 && viewer="pygmentize" || viewer="cat" + +-trap "pkill -f -9 lib/hollywood/ >/dev/null 2>&1; exit" INT ++set -e ++set -o pipefail ++#trap "pkill -f -9 lib/hollywood/ >/dev/null 2>&1; exit" INT + while true; do +- FILES=$(find /usr -readable -size +0 -type f -name \*.java -o -name \*.c -o -name \*.cpp -o -name \*.py 2>/dev/null | sort -R) ++ FILES=$(find /usr /run/current-system/sw/ -readable -size +0 -type f -name \*.java -o -name \*.c -o -name \*.cpp -o -name \*.py 2>/dev/null | sort -R) + for f in $FILES; do + $viewer "$f" 2>/dev/null || true + sleep 2 +diff --git a/lib/hollywood/errno b/lib/hollywood/errno +index 934d678..7b65de8 100755 +--- a/lib/hollywood/errno ++++ b/lib/hollywood/errno +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#! /usr/bin/env sh + # + # Copyright 2014 Dustin Kirkland <dustin.kirkland@gmail.com> + # +@@ -17,7 +17,9 @@ + command -v errno >/dev/null 2>&1 || exit 1 + command -v ccze >/dev/null 2>&1 || exit 1 + +-trap "pkill -f -9 lib/hollywood/ >/dev/null 2>&1; exit" INT ++set -e ++set -o pipefail ++#trap "pkill -f -9 lib/hollywood/ >/dev/null 2>&1; exit" INT + while true; do + errno --list | sort -R | ccze -A + sleep 0.6 +diff --git a/lib/hollywood/hexdump b/lib/hollywood/hexdump +index f2fb0bd..56ccfdb 100755 +--- a/lib/hollywood/hexdump ++++ b/lib/hollywood/hexdump +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#! /usr/bin/env sh + # + # Copyright 2014 Dustin Kirkland <dustin.kirkland@gmail.com> + # +@@ -17,10 +17,12 @@ + command -v hexdump >/dev/null 2>&1 || exit 1 + command -v ccze >/dev/null 2>&1 || exit 1 + +-trap "pkill -f -9 lib/hollywood/ >/dev/null 2>&1; exit" INT ++set -e ++set -o pipefail ++#trap "pkill -f -9 lib/hollywood/ >/dev/null 2>&1; exit" INT + while true; do +- for f in $(ls /usr/bin/ | sort -R); do +- head -c 4096 "/usr/bin/$f" | hexdump -C | ccze -A -c default=green -c dir="bold green" ++ for f in $(find /usr/bin/ /run/current-system/sw/bin/ | sort -R); do ++ head -c 4096 "$f" | hexdump -C | ccze -A -c default=green -c dir="bold green" + sleep 0.7 + done + done +diff --git a/lib/hollywood/htop b/lib/hollywood/htop +index d44f1e5..c1ab4b1 100755 +--- a/lib/hollywood/htop ++++ b/lib/hollywood/htop +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#! /usr/bin/env sh + # + # Copyright 2014 Dustin Kirkland <dustin.kirkland@gmail.com> + # +@@ -16,7 +16,9 @@ + + command -v htop >/dev/null 2>&1 || exit 1 + +-trap "pkill -f -9 lib/hollywood/ >/dev/null 2>&1; exit" INT ++set -e ++set -o pipefail ++#trap "pkill -f -9 lib/hollywood/ >/dev/null 2>&1; exit" INT + while true; do + htop + done +diff --git a/lib/hollywood/jp2a b/lib/hollywood/jp2a +index a4c0987..0434386 100755 +--- a/lib/hollywood/jp2a ++++ b/lib/hollywood/jp2a +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#! /usr/bin/env bash + # + # Copyright 2014-2023 Dustin Kirkland <dustin.kirkland@gmail.com> + # +@@ -20,9 +20,11 @@ command -v find >/dev/null 2>&1 || exit 1 + # try to render images to ascii art + command -v jp2a >/dev/null 2>&1 || exit 1 + +-trap "pkill -f -9 lib/hollywood/ >/dev/null 2>&1; exit" INT ++set -e ++set -o pipefail ++#trap "pkill -f -9 lib/hollywood/ >/dev/null 2>&1; exit" INT + while true; do +- FILES=$(find /usr -readable -size +0 -type f -name \*.jpg 2>/dev/null | sort -R) ++ FILES=$(find /usr /run/current-system/sw -readable -size +0 -type f -name \*.jpg 2>/dev/null | sort -R) + for f in $FILES; do + clear + jp2a --colors --term-fit "$f" +diff --git a/lib/hollywood/logs b/lib/hollywood/logs +index 566d825..8ce8087 100755 +--- a/lib/hollywood/logs ++++ b/lib/hollywood/logs +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#! /usr/bin/env sh + # + # Copyright 2014 Dustin Kirkland <dustin.kirkland@gmail.com> + # +@@ -16,7 +16,9 @@ + + command -v ccze >/dev/null 2>&1 || exit 1 + +-trap "pkill -f -9 lib/hollywood/ >/dev/null 2>&1; exit" INT ++set -e ++set -o pipefail ++#trap "pkill -f -9 lib/hollywood/ >/dev/null 2>&1; exit" INT + while true; do + LOGS=$(find /var/log -type f -name "*.log" 2>/dev/null | head -n 4096 | sort -R) + for log in $LOGS; do +diff --git a/lib/hollywood/man b/lib/hollywood/man +index 2d42513..046aa9a 100755 +--- a/lib/hollywood/man ++++ b/lib/hollywood/man +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#! /usr/bin/env sh + # + # Copyright 2014 Dustin Kirkland <dustin.kirkland@gmail.com> + # +@@ -17,9 +17,11 @@ + command -v man >/dev/null 2>&1 || exit 1 + command -v ccze >/dev/null 2>&1 || exit 1 + +-trap "pkill -f -9 lib/hollywood/ >/dev/null 2>&1; exit" INT ++set -e ++set -o pipefail ++#trap "pkill -f -9 lib/hollywood/ >/dev/null 2>&1; exit" INT + while true; do +- FILES=$(ls /usr/share/man/man1/ | sort -R | sed "s/\.1\.gz.*$//" | head -n 4096) ++ FILES=$(ls /usr/share/man/man1/ /run/current-system/sw/share/man/man1/ | sort -R | sed "s/\.1\.gz.*$//" | head -n 4096) + for f in $FILES; do + man "$f" | ccze -A + sleep 0.2 +diff --git a/lib/hollywood/map b/lib/hollywood/map +index 47beb7d..7a5d21e 100755 +--- a/lib/hollywood/map ++++ b/lib/hollywood/map +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#! /usr/bin/env sh + # + # Copyright 2019 Dustin Kirkland <dustin.kirkland@gmail.com> + # +@@ -16,7 +16,9 @@ + + command -v jp2a >/dev/null 2>&1 || exit 1 + +-trap "pkill -f -9 lib/hollywood/ >/dev/null 2>&1; exit" INT ++set -e ++set -o pipefail ++#trap "pkill -f -9 lib/hollywood/ >/dev/null 2>&1; exit" INT + + PKG=hollywood + dir="$(dirname $0)/../../share/$PKG" +diff --git a/lib/hollywood/mplayer b/lib/hollywood/mplayer +index b56f7f9..e0f61a7 100755 +--- a/lib/hollywood/mplayer ++++ b/lib/hollywood/mplayer +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#! /usr/bin/env bash + # + # Copyright 2014 Dustin Kirkland <dustin.kirkland@gmail.com> + # +@@ -14,8 +14,8 @@ + # See the License for the specific language governing permissions and + # limitations under the License. + +-command -v mplayer >/dev/null 2>&1 || exit 1 ++command -v mpv >/dev/null 2>&1 || exit 1 + trap "pkill -f -9 lib/hollywood/ >/dev/null 2>&1; exit" INT + PKG=hollywood + dir="$(dirname $0)/../../share/$PKG" +-DISPLAY= mplayer -vo caca -loop 0 -ss $((RANDOM % 100)) -speed 100 $MPLAYER_OPTS $dir/soundwave.mp4 ++DISPLAY= mpv -vo caca --loop --start=$((RANDOM % 100)) --speed=100 $MPLAYER_OPTS $dir/soundwave.mp4 +diff --git a/lib/hollywood/speedometer b/lib/hollywood/speedometer +index b0295f9..a00ea55 100755 +--- a/lib/hollywood/speedometer ++++ b/lib/hollywood/speedometer +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#! /usr/bin/env sh + # + # Copyright 2014 Dustin Kirkland <dustin.kirkland@gmail.com> + # +@@ -16,7 +16,9 @@ + + command -v speedometer >/dev/null 2>&1 || exit 1 + +-trap "pkill -f -9 lib/hollywood/ >/dev/null 2>&1; exit" INT ++set -e ++set -o pipefail ++#trap "pkill -f -9 lib/hollywood/ >/dev/null 2>&1; exit" INT + while true; do + while read Iface Destination Gateway Flags RefCnt Use Metric Mask MTU Window IRTT; do + [ "$Mask" = "00000000" ] && break +diff --git a/lib/hollywood/sshart b/lib/hollywood/sshart +index 1a053ba..46ebad1 100755 +--- a/lib/hollywood/sshart ++++ b/lib/hollywood/sshart +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#! /usr/bin/env sh + # + # Copyright 2014 Dustin Kirkland <dustin.kirkland@gmail.com> + # +@@ -19,12 +19,14 @@ command -v ccze >/dev/null 2>&1 || exit 1 + + PKG=hollywood + tmpdir="/tmp/$PKG" +-trap "rm -rf $tmpdir 2>/dev/null && pkill -f -9 lib/hollywood/ >/dev/null 2>&1; exit" INT ++set -e ++set -o pipefail ++#trap "rm -rf $tmpdir 2>/dev/null && pkill -f -9 lib/hollywood/ >/dev/null 2>&1; exit" INT + while true; do + mkdir -p "$tmpdir" + tmpfile=$(mktemp -p "$tmpdir" -t XXXXXX) + rm -f $tmpfile +- art=$(ssh-keygen -vvv -b 1024 -t dsa -N "" -f $tmpfile) ++ art=$(ssh-keygen -vvv -b 1024 -t rsa -N "" -f $tmpfile) + rm -f $tmpfile $tmpfile.pub + wait + clear +diff --git a/lib/hollywood/stat b/lib/hollywood/stat +index 7ecb715..6f8e19e 100755 +--- a/lib/hollywood/stat ++++ b/lib/hollywood/stat +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#! /usr/bin/env sh + # + # Copyright 2014 Dustin Kirkland <dustin.kirkland@gmail.com> + # +@@ -17,7 +17,9 @@ + command -v stat >/dev/null 2>&1 || exit 1 + command -v ccze >/dev/null 2>&1 || exit 1 + +-trap "pkill -f -9 lib/hollywood/ >/dev/null 2>&1; exit" INT ++set -e ++set -o pipefail ++#trap "pkill -f -9 lib/hollywood/ >/dev/null 2>&1; exit" INT + while true; do + for f in $(find /sys /dev 2>/dev/null | head -n 4096 | sort -R); do + stat "$f" | ccze -A -c default=yellow +diff --git a/lib/hollywood/tree b/lib/hollywood/tree +index 6a16197..8b816c0 100755 +--- a/lib/hollywood/tree ++++ b/lib/hollywood/tree +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#! /usr/bin/env sh + # + # Copyright 2014 Dustin Kirkland <dustin.kirkland@gmail.com> + # +@@ -16,7 +16,9 @@ + + command -v tree >/dev/null 2>&1 || exit 1 + +-trap "pkill -f -9 lib/hollywood/ >/dev/null 2>&1; exit" INT ++set -e ++set -o pipefail ++#trap "pkill -f -9 lib/hollywood/ >/dev/null 2>&1; exit" INT + DIRS="/sys /dev" + + while true; do +diff --git a/lib/wallstreet/breaks b/lib/wallstreet/breaks +index 6920a62..abdd6b7 100755 +--- a/lib/wallstreet/breaks ++++ b/lib/wallstreet/breaks +@@ -1,4 +1,4 @@ +-#!/usr/bin/python3 ++#! /usr/bin/env python3 + # + # Copyright 2016 Dustin Kirkland <dustin.kirkland@gmail.com> + # +diff --git a/lib/wallstreet/img2txt b/lib/wallstreet/img2txt +index 8fce26d..15e6059 100755 +--- a/lib/wallstreet/img2txt ++++ b/lib/wallstreet/img2txt +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#! /usr/bin/env bash + # + # Copyright 2016 Dustin Kirkland <dustin.kirkland@gmail.com> + # +diff --git a/lib/wallstreet/jp2a b/lib/wallstreet/jp2a +index 03dee2a..98db8e1 100755 +--- a/lib/wallstreet/jp2a ++++ b/lib/wallstreet/jp2a +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#! /usr/bin/env bash + # + # Copyright 2016 Dustin Kirkland <dustin.kirkland@gmail.com> + # +diff --git a/lib/wallstreet/newsboat b/lib/wallstreet/newsboat +index 6d89b1b..beffdba 100755 +--- a/lib/wallstreet/newsboat ++++ b/lib/wallstreet/newsboat +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#! /usr/bin/env sh + # + # Copyright 2016 Dustin Kirkland <dustin.kirkland@gmail.com> + # +diff --git a/lib/wallstreet/rsstail b/lib/wallstreet/rsstail +index bab8494..949a8db 100755 +--- a/lib/wallstreet/rsstail ++++ b/lib/wallstreet/rsstail +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#! /usr/bin/env bash + # + # Copyright 2016 Dustin Kirkland <dustin.kirkland@gmail.com> + # +diff --git a/lib/wallstreet/ticker b/lib/wallstreet/ticker +index 6cdc7ce..73ffb1f 100755 +--- a/lib/wallstreet/ticker ++++ b/lib/wallstreet/ticker +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#! /usr/bin/env sh + # + # Copyright 2016 Dustin Kirkland <dustin.kirkland@gmail.com> + # +diff --git a/lib/wallstreet/w3m b/lib/wallstreet/w3m +index a53bbff..b4f4926 100755 +--- a/lib/wallstreet/w3m ++++ b/lib/wallstreet/w3m +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#! /usr/bin/env sh + # + # Copyright 2016 Dustin Kirkland <dustin.kirkland@gmail.com> + # diff --git a/files/mailcap b/files/mailcap new file mode 100644 index 0000000..e4b2c55 --- /dev/null +++ b/files/mailcap @@ -0,0 +1,9 @@ +text/plain; $EDITOR %s; +text/html; lynx -assume_charset=%{charset} -display_charset=utf-8 -dump -width=1024 %s; nametemplate=%s.html; copiousoutput; +image/*; cmv %s; +video/*; cmv %s; +audio/*; cmv %s; +application/pdf; firefox %s; +application/pgp-encrypted; gpg -d '%s'; copiousoutput; +application/pgp-keys; gpg --import '%s'; copiousoutput; +application/x-subrip; $EDITOR %s; diff --git a/files/nixpkgs-patches/321026.diff b/files/nixpkgs-patches/321026.diff new file mode 100644 index 0000000..db9721a --- /dev/null +++ b/files/nixpkgs-patches/321026.diff @@ -0,0 +1,529 @@ +diff --git a/neo-tree filesystem [1] b/neo-tree filesystem [1] +new file mode 100644 +index 0000000000000..e69de29bb2d1d +diff --git a/pkgs/by-name/cq/cq/package.nix b/pkgs/by-name/cq/cq/package.nix +index 82fc31a7bbdd3..25c2b9c94656b 100644 +--- a/pkgs/by-name/cq/cq/package.nix ++++ b/pkgs/by-name/cq/cq/package.nix +@@ -2,7 +2,7 @@ + , fetchFromGitHub + , fetchurl + , buildGraalvmNativeImage +-, graalvmCEPackages ++, graalvmPackages + }: + + buildGraalvmNativeImage rec { +@@ -23,7 +23,7 @@ buildGraalvmNativeImage rec { + hash = "sha256-yjAC2obipdmh+JlHzVUTMtTXN2VKe4WKkyJyu2Q93c8="; + }; + +- graalvmDrv = graalvmCEPackages.graalvm-ce; ++ graalvmDrv = graalvmPackages.graalvm-ce; + + executable = "cq"; + +diff --git a/pkgs/development/compilers/graalvm/buildGraalvm.nix b/pkgs/development/compilers/graalvm/buildGraalvm.nix +new file mode 100644 +index 0000000000000..b465dda84113c +--- /dev/null ++++ b/pkgs/development/compilers/graalvm/buildGraalvm.nix +@@ -0,0 +1,241 @@ ++{ ++ lib, ++ stdenv, ++ alsa-lib, ++ autoPatchelfHook, ++ cairo, ++ cups, ++ darwin, ++ fontconfig, ++ glib, ++ glibc, ++ gtk3, ++ makeWrapper, ++ musl, ++ runCommandCC, ++ setJavaClassPath, ++ unzip, ++ xorg, ++ zlib, ++ # extra params ++ extraCLibs ? [ ], ++ gtkSupport ? stdenv.isLinux, ++ useMusl ? false, ++ ... ++}@args: ++ ++assert useMusl -> stdenv.isLinux; ++let ++ extraArgs = builtins.removeAttrs args [ ++ "lib" ++ "stdenv" ++ "alsa-lib" ++ "autoPatchelfHook" ++ "cairo" ++ "cups" ++ "darwin" ++ "fontconfig" ++ "glib" ++ "glibc" ++ "gtk3" ++ "makeWrapper" ++ "musl" ++ "runCommandCC" ++ "setJavaClassPath" ++ "unzip" ++ "xorg" ++ "zlib" ++ "extraCLibs" ++ "gtkSupport" ++ "useMusl" ++ "passthru" ++ "meta" ++ ]; ++ ++ cLibs = lib.optionals stdenv.isLinux ( ++ [ ++ glibc ++ zlib.static ++ ] ++ ++ lib.optionals (!useMusl) [ glibc.static ] ++ ++ lib.optionals useMusl [ musl ] ++ ++ extraCLibs ++ ); ++ ++ # GraalVM 21.3.0+ expects musl-gcc as <system>-musl-gcc ++ musl-gcc = ( ++ runCommandCC "musl-gcc" { } '' ++ mkdir -p $out/bin ++ ln -s ${lib.getDev musl}/bin/musl-gcc $out/bin/${stdenv.hostPlatform.system}-musl-gcc ++ '' ++ ); ++ binPath = lib.makeBinPath (lib.optionals useMusl [ musl-gcc ] ++ [ stdenv.cc ]); ++ ++ runtimeLibraryPath = lib.makeLibraryPath ( ++ [ cups ] ++ ++ lib.optionals gtkSupport [ ++ cairo ++ glib ++ gtk3 ++ ] ++ ); ++ ++ graalvm-ce = stdenv.mkDerivation ( ++ { ++ pname = "graalvm-ce"; ++ ++ unpackPhase = '' ++ runHook preUnpack ++ ++ mkdir -p "$out" ++ ++ # The tarball on Linux has the following directory structure: ++ # ++ # graalvm-ce-java11-20.3.0/* ++ # ++ # while on Darwin it looks like this: ++ # ++ # graalvm-ce-java11-20.3.0/Contents/Home/* ++ # ++ # We therefor use --strip-components=1 vs 3 depending on the platform. ++ tar xf "$src" -C "$out" --strip-components=${if stdenv.isLinux then "1" else "3"} ++ ++ # Sanity check ++ if [ ! -d "$out/bin" ]; then ++ echo "The `bin` is directory missing after extracting the graalvm" ++ echo "tarball, please compare the directory structure of the" ++ echo "tarball with what happens in the unpackPhase (in particular" ++ echo "with regards to the `--strip-components` flag)." ++ exit 1 ++ fi ++ ++ runHook postUnpack ++ ''; ++ ++ dontStrip = true; ++ ++ nativeBuildInputs = [ ++ unzip ++ makeWrapper ++ ] ++ lib.optional stdenv.isLinux autoPatchelfHook; ++ ++ propagatedBuildInputs = [ ++ setJavaClassPath ++ zlib ++ ] ++ lib.optional stdenv.isDarwin darwin.apple_sdk_11_0.frameworks.Foundation; ++ ++ buildInputs = lib.optionals stdenv.isLinux [ ++ alsa-lib # libasound.so wanted by lib/libjsound.so ++ fontconfig ++ stdenv.cc.cc.lib # libstdc++.so.6 ++ xorg.libX11 ++ xorg.libXext ++ xorg.libXi ++ xorg.libXrender ++ xorg.libXtst ++ ]; ++ ++ postInstall = '' ++ # jni.h expects jni_md.h to be in the header search path. ++ ln -sf $out/include/linux/*_md.h $out/include/ ++ ++ # copy-paste openjdk's preFixup ++ # Set JAVA_HOME automatically. ++ mkdir -p $out/nix-support ++ cat > $out/nix-support/setup-hook << EOF ++ if [ -z "\''${JAVA_HOME-}" ]; then export JAVA_HOME=$out; fi ++ EOF ++ ++ wrapProgram $out/bin/native-image \ ++ --prefix PATH : ${binPath} \ ++ ${toString (map (l: "--add-flags '-H:CLibraryPath=${l}/lib'") cLibs)} ++ ''; ++ ++ preFixup = lib.optionalString (stdenv.isLinux) '' ++ for bin in $(find "$out/bin" -executable -type f); do ++ wrapProgram "$bin" --prefix LD_LIBRARY_PATH : "${runtimeLibraryPath}" ++ done ++ ''; ++ ++ doInstallCheck = true; ++ installCheckPhase = '' ++ runHook preInstallCheck ++ ++ ${ ++ # broken in darwin ++ lib.optionalString stdenv.isLinux '' ++ echo "Testing Jshell" ++ echo '1 + 1' | $out/bin/jshell ++ '' ++ } ++ ++ echo ${lib.escapeShellArg '' ++ public class HelloWorld { ++ public static void main(String[] args) { ++ System.out.println("Hello World"); ++ } ++ } ++ ''} > HelloWorld.java ++ $out/bin/javac HelloWorld.java ++ ++ # run on JVM with Graal Compiler ++ echo "Testing GraalVM" ++ $out/bin/java -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:+UseJVMCICompiler HelloWorld | fgrep 'Hello World' ++ ++ extraNativeImageArgs="$(export -p | sed -n 's/^declare -x \([^=]\+\)=.*$/ -E\1/p' | tr -d \\n)" ++ ++ echo "Ahead-Of-Time compilation" ++ $out/bin/native-image -H:+UnlockExperimentalVMOptions -H:-CheckToolchain -H:+ReportExceptionStackTraces -march=compatibility $extraNativeImageArgs HelloWorld ++ ./helloworld | fgrep 'Hello World' ++ ++ ${ ++ # -H:+StaticExecutableWithDynamicLibC is only available in Linux ++ lib.optionalString (stdenv.isLinux && !useMusl) '' ++ echo "Ahead-Of-Time compilation with -H:+StaticExecutableWithDynamicLibC" ++ $out/bin/native-image -H:+UnlockExperimentalVMOptions -H:+StaticExecutableWithDynamicLibC -march=compatibility $extraNativeImageArgs HelloWorld ++ ./helloworld | fgrep 'Hello World' ++ '' ++ } ++ ++ ${ ++ # --static is only available in Linux ++ lib.optionalString (stdenv.isLinux && useMusl) '' ++ echo "Ahead-Of-Time compilation with --static and --libc=musl" ++ $out/bin/native-image $extraNativeImageArgs -march=compatibility --libc=musl --static HelloWorld ++ ./helloworld | fgrep 'Hello World' ++ '' ++ } ++ ++ runHook postInstallCheck ++ ''; ++ ++ passthru = { ++ home = graalvm-ce; ++ updateScript = [ ++ ./update.sh ++ "graalvm-ce" ++ ]; ++ } // (args.passhtru or { }); ++ ++ meta = ++ with lib; ++ ( ++ { ++ homepage = "https://www.graalvm.org/"; ++ description = "High-Performance Polyglot VM"; ++ license = with licenses; [ ++ upl ++ gpl2Classpath ++ bsd3 ++ ]; ++ sourceProvenance = with sourceTypes; [ binaryNativeCode ]; ++ mainProgram = "java"; ++ maintainers = with maintainers; teams.graalvm-ce.members ++ [ ]; ++ } ++ // (args.meta or { }) ++ ); ++ } ++ // extraArgs ++ ); ++in ++graalvm-ce +diff --git a/pkgs/development/compilers/graalvm/community-edition/graaljs/default.nix b/pkgs/development/compilers/graalvm/community-edition/graaljs/default.nix +index ec662e156721c..a3b47516b0df4 100644 +--- a/pkgs/development/compilers/graalvm/community-edition/graaljs/default.nix ++++ b/pkgs/development/compilers/graalvm/community-edition/graaljs/default.nix +@@ -1,9 +1,9 @@ + { stdenv + , fetchurl +-, graalvmCEPackages ++, graalvmPackages + }: + +-graalvmCEPackages.buildGraalvmProduct { ++graalvmPackages.buildGraalvmProduct { + src = fetchurl (import ./hashes.nix).hashes.${stdenv.system}; + version = (import ./hashes.nix).version; + +diff --git a/pkgs/development/compilers/graalvm/community-edition/graalnodejs/default.nix b/pkgs/development/compilers/graalvm/community-edition/graalnodejs/default.nix +index d98f4b0e380f4..8df0ab5a38e15 100644 +--- a/pkgs/development/compilers/graalvm/community-edition/graalnodejs/default.nix ++++ b/pkgs/development/compilers/graalvm/community-edition/graalnodejs/default.nix +@@ -1,9 +1,9 @@ + { stdenv + , fetchurl +-, graalvmCEPackages ++, graalvmPackages + }: + +-graalvmCEPackages.buildGraalvmProduct { ++graalvmPackages.buildGraalvmProduct { + src = fetchurl (import ./hashes.nix).hashes.${stdenv.system}; + version = (import ./hashes.nix).version; + +diff --git a/pkgs/development/compilers/graalvm/community-edition/graalpy/default.nix b/pkgs/development/compilers/graalvm/community-edition/graalpy/default.nix +index e2b28500f7fe4..ff73a7dde8c60 100644 +--- a/pkgs/development/compilers/graalvm/community-edition/graalpy/default.nix ++++ b/pkgs/development/compilers/graalvm/community-edition/graalpy/default.nix +@@ -1,9 +1,9 @@ + { stdenv + , fetchurl +-, graalvmCEPackages ++, graalvmPackages + }: + +-graalvmCEPackages.buildGraalvmProduct { ++graalvmPackages.buildGraalvmProduct { + src = fetchurl (import ./hashes.nix).hashes.${stdenv.system}; + version = (import ./hashes.nix).version; + +diff --git a/pkgs/development/compilers/graalvm/community-edition/graalvm-ce/default.nix b/pkgs/development/compilers/graalvm/community-edition/graalvm-ce/default.nix +index b7f7db61097f2..da5b59417e20b 100644 +--- a/pkgs/development/compilers/graalvm/community-edition/graalvm-ce/default.nix ++++ b/pkgs/development/compilers/graalvm/community-edition/graalvm-ce/default.nix +@@ -1,10 +1,10 @@ + { stdenv + , fetchurl +-, graalvmCEPackages ++, graalvmPackages + , useMusl ? false + }: + +-graalvmCEPackages.buildGraalvm { ++graalvmPackages.buildGraalvm { + inherit useMusl; + src = fetchurl (import ./hashes.nix).hashes.${stdenv.system}; + version = (import ./hashes.nix).version; +diff --git a/pkgs/development/compilers/graalvm/community-edition/truffleruby/default.nix b/pkgs/development/compilers/graalvm/community-edition/truffleruby/default.nix +index da971347652e1..de9e93c180fd6 100644 +--- a/pkgs/development/compilers/graalvm/community-edition/truffleruby/default.nix ++++ b/pkgs/development/compilers/graalvm/community-edition/truffleruby/default.nix +@@ -1,12 +1,12 @@ + { lib + , stdenv + , fetchurl +-, graalvmCEPackages ++, graalvmPackages + , libyaml + , openssl + }: + +-graalvmCEPackages.buildGraalvmProduct { ++graalvmPackages.buildGraalvmProduct { + src = fetchurl (import ./hashes.nix).hashes.${stdenv.system}; + version = (import ./hashes.nix).version; + +diff --git a/pkgs/development/compilers/graalvm/default.nix b/pkgs/development/compilers/graalvm/default.nix +new file mode 100644 +index 0000000000000..6dc0715a7bd8d +--- /dev/null ++++ b/pkgs/development/compilers/graalvm/default.nix +@@ -0,0 +1,13 @@ ++{ callPackage }: ++ ++let ++ cePackages = callPackage ./community-edition { }; ++in ++cePackages ++// rec { ++ buildGraalvm = callPackage ./buildGraalvm.nix; ++ ++ graalvm-oracle_22 = callPackage ./graalvm-oracle { version = "22"; }; ++ graalvm-oracle_17 = callPackage ./graalvm-oracle { version = "17"; }; ++ graalvm-oracle = graalvm-oracle_22; ++} +diff --git a/pkgs/development/compilers/graalvm/graalvm-oracle/default.nix b/pkgs/development/compilers/graalvm/graalvm-oracle/default.nix +new file mode 100644 +index 0000000000000..d8a9f14e70e3f +--- /dev/null ++++ b/pkgs/development/compilers/graalvm/graalvm-oracle/default.nix +@@ -0,0 +1,16 @@ ++{ ++ lib, ++ stdenv, ++ fetchurl, ++ graalvmPackages, ++ useMusl ? false, ++ version ? "22", ++}: ++ ++graalvmPackages.buildGraalvm { ++ inherit useMusl version; ++ src = fetchurl (import ./hashes.nix).${version}.${stdenv.system}; ++ meta.platforms = builtins.attrNames (import ./hashes.nix).${version}; ++ meta.license = lib.licenses.unfree; ++ pname = "graalvm-oracle"; ++} +diff --git a/pkgs/development/compilers/graalvm/graalvm-oracle/hashes.nix b/pkgs/development/compilers/graalvm/graalvm-oracle/hashes.nix +new file mode 100644 +index 0000000000000..1df3f67dc3e4f +--- /dev/null ++++ b/pkgs/development/compilers/graalvm/graalvm-oracle/hashes.nix +@@ -0,0 +1,38 @@ ++{ ++ "22" = { ++ "aarch64-linux" = { ++ hash = "sha256-E0Fm6mFB7o39pu7JVWOoXT9BdPWiSXBx2hPvlruD5ls="; ++ url = "https://download.oracle.com/graalvm/22/archive/graalvm-jdk-22.0.1_linux-aarch64_bin.tar.gz"; ++ }; ++ "x86_64-linux" = { ++ hash = "sha256-1YPNsBygI6N+7UXZ0YS2i3qNf1C1jd4TaQQfKUw09KM="; ++ url = "https://download.oracle.com/graalvm/22/archive/graalvm-jdk-22.0.1_linux-x64_bin.tar.gz"; ++ }; ++ "x86_64-darwin" = { ++ hash = "sha256-waR39L44Ew8wznRc67tYD3HGFZ2UUD4+ELerWnxNpms="; ++ url = "https://download.oracle.com/graalvm/22/archive/graalvm-jdk-22.0.1_macos-x64_bin.tar.gz"; ++ }; ++ "aarch64-darwin" = { ++ hash = "sha256-dzUVPih81jopuxAx8sAYdwonNOXHyyirUUOhvStK1F8="; ++ url = "https://download.oracle.com/graalvm/22/archive/graalvm-jdk-22.0.1_macos-aarch64_bin.tar.gz"; ++ }; ++ }; ++ "17" = { ++ "aarch64-linux" = { ++ hash = "sha256-0J/XaXGzNyBgxrW1HgUvtBCPPRfAvzwOx67p/QcY4u0="; ++ url = "https://download.oracle.com/graalvm/17/archive/graalvm-jdk-17.0.11_linux-aarch64_bin.tar.gz"; ++ }; ++ "x86_64-linux" = { ++ hash = "sha256-t0GHR7MGSZDSAGeX7bsI1ziugaP4euRcJq+covDBUYw="; ++ url = "https://download.oracle.com/graalvm/17/archive/graalvm-jdk-17.0.11_linux-x64_bin.tar.gz"; ++ }; ++ "x86_64-darwin" = { ++ hash = "sha256-q9b6I5hSVt67gkYzUtsJDSi4bPEkzpkoeC5ZyxfqJRc="; ++ url = "https://download.oracle.com/graalvm/17/archive/graalvm-jdk-17.0.11_macos-x64_bin.tar.gz"; ++ }; ++ "aarch64-darwin" = { ++ hash = "sha256-o4BGCfnD25AVYwG1Ol+2eDVCgiB+mk4I1JBIjyETK6s="; ++ url = "https://download.oracle.com/graalvm/17/archive/graalvm-jdk-17.0.11_macos-aarch64_bin.tar.gz"; ++ }; ++ }; ++} +diff --git a/pkgs/development/interpreters/babashka/default.nix b/pkgs/development/interpreters/babashka/default.nix +index f4b51b37c480f..7b82513a15c70 100644 +--- a/pkgs/development/interpreters/babashka/default.nix ++++ b/pkgs/development/interpreters/babashka/default.nix +@@ -1,6 +1,6 @@ + { lib + , buildGraalvmNativeImage +-, graalvmCEPackages ++, graalvmPackages + , fetchurl + , writeScript + , installShellFiles +@@ -16,7 +16,7 @@ let + sha256 = "sha256-uVRk1/lfOXMSp3qOdeMoAFpwJaEBxF1MYtFOv364H7Y="; + }; + +- graalvmDrv = graalvmCEPackages.graalvm-ce; ++ graalvmDrv = graalvmPackages.graalvm-ce; + + executable = "bb"; + +diff --git a/pkgs/development/tools/clj-kondo/default.nix b/pkgs/development/tools/clj-kondo/default.nix +index e764f34c91253..5a68182352e47 100644 +--- a/pkgs/development/tools/clj-kondo/default.nix ++++ b/pkgs/development/tools/clj-kondo/default.nix +@@ -1,4 +1,4 @@ +-{ lib, buildGraalvmNativeImage, graalvmCEPackages, fetchurl ++{ lib, buildGraalvmNativeImage, graalvmPackages, removeReferencesTo, fetchurl + }: + + buildGraalvmNativeImage rec { +@@ -11,7 +11,7 @@ buildGraalvmNativeImage rec { + sha256 = "sha256-DrSfL1WazlNd5H0jG6m0S5aED4BLVufr1rGIAyifn6E="; + }; + +- graalvmDrv = graalvmCEPackages.graalvm-ce; ++ graalvmDrv = graalvmPackages.graalvm-ce; + + extraNativeImageBuildArgs = + [ "-H:+ReportExceptionStackTraces" "--no-fallback" ]; +diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix +index 91596ddfd6ed5..7cb01b21b2349 100644 +--- a/pkgs/top-level/aliases.nix ++++ b/pkgs/top-level/aliases.nix +@@ -646,6 +646,8 @@ mapAliases { + graalvm11-ce = throw "graalvm11-ce has been removed because upstream dropped support to different JDK versions for each GraalVM release. Please use graalvm-ce instead"; # Added 2023-09-26 + graalvm17-ce = throw "graalvm17-ce has been removed because upstream dropped support to different JDK versions for each GraalVM release. Please use graalvm-ce instead"; # Added 2023-09-26 + graalvm19-ce = throw "graalvm19-ce has been removed because upstream dropped support to different JDK versions for each GraalVM release. Please use graalvm-ce instead"; # Added 2023-09-26 ++ graalvmCEPackages = graalvmPackages; # Added 2024-08-10 ++ graalvm-ce = graalvmPackages.graalvm-ce; # Added 2024-08-10 + grab-site = throw "grab-site has been removed because it's unmaintained and broken"; # Added 2023-11-12 + gradle_4 = throw "gradle_4 has been removed because it's no longer being updated"; # Added 2023-01-17 + gradle_5 = throw "gradle_5 has been removed because it's no longer being updated"; # Added 2023-01-17 +diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix +index 271c5ee0343db..1ab15851e8683 100644 +--- a/pkgs/top-level/all-packages.nix ++++ b/pkgs/top-level/all-packages.nix +@@ -8003,7 +8003,7 @@ with pkgs; + }; + dapl-native = callPackage ../development/interpreters/dzaima-apl { + buildNativeImage = true; +- jdk = graalvm-ce; ++ jdk = graalvmPackages.graalvm-ce; + }; + + gnucap-full = gnucap.withPlugins(p: [ p.verilog ]); +@@ -15217,10 +15217,9 @@ with pkgs; + openjdk = jdk; + openjdk_headless = jdk_headless; + +- graalvmCEPackages = callPackage ../development/compilers/graalvm/community-edition { }; +- graalvm-ce = graalvmCEPackages.graalvm-ce; ++ graalvmPackages = recurseIntoAttrs (callPackage ../development/compilers/graalvm { }); + buildGraalvmNativeImage = (callPackage ../build-support/build-graalvm-native-image { +- graalvmDrv = graalvm-ce; ++ graalvmDrv = graalvmPackages.graalvm-ce; + }).override; + + openshot-qt = libsForQt5.callPackage ../applications/video/openshot-qt { +@@ -16179,7 +16178,7 @@ with pkgs; + + dbqn-native = dbqn.override { + buildNativeImage = true; +- jdk = graalvm-ce; ++ jdk = graalvmPackages.graalvm-ce; + }; + + chibi = callPackage ../development/interpreters/chibi { }; diff --git a/files/nixpkgs-patches/amdvlk_new.diff b/files/nixpkgs-patches/amdvlk_new.diff new file mode 100644 index 0000000..1899443 --- /dev/null +++ b/files/nixpkgs-patches/amdvlk_new.diff @@ -0,0 +1,20 @@ +diff --git a/pkgs/by-name/am/amdvlk/package.nix b/pkgs/by-name/am/amdvlk/package.nix +index 2c7b0c918..6651de573 100644 +--- a/pkgs/by-name/am/amdvlk/package.nix ++++ b/pkgs/by-name/am/amdvlk/package.nix +@@ -29,13 +29,13 @@ let + in + stdenv.mkDerivation (finalAttrs: { + pname = "amdvlk"; +- version = "2024.Q3.3"; ++ version = "2024.Q4.1"; + + src = fetchRepoProject { + name = "amdvlk-src"; + manifest = "https://github.com/GPUOpen-Drivers/AMDVLK.git"; + rev = "refs/tags/v-${finalAttrs.version}"; +- hash = "sha256-wIPubMsSaNGTykD/K0gxdba128TqW5nu4CjXoLkprc0="; ++ hash = "sha256-x1g4VKXbkYM2S0tfXWFESyHwalNwH813mtwWjCQK2ew="; + }; + + buildInputs = diff --git a/files/nixpkgs-patches/hollywood_update_and_mpv.diff b/files/nixpkgs-patches/hollywood_update_and_mpv.diff new file mode 100644 index 0000000..98f2a91 --- /dev/null +++ b/files/nixpkgs-patches/hollywood_update_and_mpv.diff @@ -0,0 +1,39 @@ +diff --git a/pkgs/applications/misc/hollywood/default.nix b/pkgs/applications/misc/hollywood/default.nix +index 1b655e5af..46649a8b0 100644 +--- a/pkgs/applications/misc/hollywood/default.nix ++++ b/pkgs/applications/misc/hollywood/default.nix +@@ -12,7 +12,7 @@ + , util-linux + , jp2a + , man +-, mplayer ++, mpv + , openssh + , tree + , mlocate +@@ -36,13 +36,13 @@ stdenv.mkDerivation { + src = fetchFromGitHub { + owner = "dustinkirkland"; + repo = "hollywood"; +- rev = "35275a68c37bbc39d8b2b0e4664a0c2f5451e5f6"; +- sha256 = "sha256-faIm1uXERvIDZ6SK6uarVkWGNJskAroHgq5Cg7nUZc4="; ++ rev = "fa93536a7ce1f2697da2016ee09937d113e259b3"; ++ sha256 = "sha256-fSlkFSoaMzVAlIWx2uZsNHLNW5/2fA/YFPcTW2veP34="; + }; + + nativeBuildInputs = [ makeWrapper ]; + +- patches = [ ./nixos-paths.patch ]; ++ patches = [ ]; + postPatch = '' + rm lib/hollywood/speedometer + rm bin/wallstreet +@@ -67,7 +67,7 @@ stdenv.mkDerivation { + util-linux + jp2a + man +- mplayer ++ mpv + openssh + tree + findutils diff --git a/files/nixpkgs-patches/noto_cjk_no_variable.diff b/files/nixpkgs-patches/noto_cjk_no_variable.diff new file mode 100644 index 0000000..152c140 --- /dev/null +++ b/files/nixpkgs-patches/noto_cjk_no_variable.diff @@ -0,0 +1,40 @@ +diff --git a/pkgs/by-name/no/noto-fonts-cjk-sans/package.nix b/pkgs/by-name/no/noto-fonts-cjk-sans/package.nix +index 5c7ab768..79981e27 100644 +--- a/pkgs/by-name/no/noto-fonts-cjk-sans/package.nix ++++ b/pkgs/by-name/no/noto-fonts-cjk-sans/package.nix +@@ -13,12 +13,12 @@ stdenvNoCC.mkDerivation rec { + owner = "notofonts"; + repo = "noto-cjk"; + rev = "Sans${version}"; +- hash = "sha256-IgalJkiOAVjNxKaPAQWfb5hKeqclliR4qVXCq63FGWY="; +- sparseCheckout = [ "Sans/Variable/OTC" ]; ++ hash = "sha256-GXULnRPsIJRdiL3LdFtHbqTqSvegY2zodBxFm4P55to="; ++ sparseCheckout = [ "Sans/OTC" ]; + }; + + installPhase = '' +- install -m444 -Dt $out/share/fonts/opentype/noto-cjk Sans/Variable/OTC/*.otf.ttc ++ install -m444 -Dt $out/share/fonts/opentype/noto-cjk Sans/OTC/*.ttc + ''; + + passthru.tests.noto-fonts = nixosTests.noto-fonts; +diff --git a/pkgs/by-name/no/noto-fonts-cjk-serif/package.nix b/pkgs/by-name/no/noto-fonts-cjk-serif/package.nix +index d9fddcc6..55cde591 100644 +--- a/pkgs/by-name/no/noto-fonts-cjk-serif/package.nix ++++ b/pkgs/by-name/no/noto-fonts-cjk-serif/package.nix +@@ -13,12 +13,12 @@ stdenvNoCC.mkDerivation rec { + owner = "notofonts"; + repo = "noto-cjk"; + rev = "Serif${version}"; +- hash = "sha256-GLjpTAiHfygj1J4AdUVDJh8kykkFOglq+h4kyat5W9s="; +- sparseCheckout = [ "Serif/Variable/OTC" ]; ++ hash = "sha256-ihbhbv875XEHupFUzIdEweukqEmwQXCXCiTG7qisE64="; ++ sparseCheckout = [ "Serif/OTC" ]; + }; + + installPhase = '' +- install -m444 -Dt $out/share/fonts/opentype/noto-cjk Serif/Variable/OTC/*.otf.ttc ++ install -m444 -Dt $out/share/fonts/opentype/noto-cjk Serif/OTC/*.ttc + ''; + + passthru.tests.noto-fonts = nixosTests.noto-fonts; diff --git a/files/nvim/fzf_no_linenum.diff b/files/nvim/fzf_no_linenum.diff new file mode 100644 index 0000000..bed26be --- /dev/null +++ b/files/nvim/fzf_no_linenum.diff @@ -0,0 +1,24 @@ +diff --git a/autoload/fzf/vim.vim b/autoload/fzf/vim.vim +index 67945c3..ccfe729 100755 +--- a/autoload/fzf/vim.vim ++++ b/autoload/fzf/vim.vim +@@ -789,7 +789,7 @@ endfunction + + function! fzf#vim#_format_buffer(b) + let name = bufname(a:b) +- let line = exists('*getbufinfo') ? getbufinfo(a:b)[0]['lnum'] : 0 ++ "let line = exists('*getbufinfo') ? getbufinfo(a:b)[0]['lnum'] : 0 + let fullname = empty(name) ? '' : fnamemodify(name, ":p:~:.") + let dispname = empty(name) ? '[No Name]' : name + let flag = a:b == bufnr('') ? s:blue('%', 'Conditional') : +@@ -797,8 +797,8 @@ function! fzf#vim#_format_buffer(b) + let modified = getbufvar(a:b, '&modified') ? s:red(' [+]', 'Exception') : '' + let readonly = getbufvar(a:b, '&modifiable') ? '' : s:green(' [RO]', 'Constant') + let extra = join(filter([modified, readonly], '!empty(v:val)'), '') +- let target = empty(name) ? '' : (line == 0 ? fullname : fullname.':'.line) +- return s:rstrip(printf("%s\t%d\t[%s] %s\t%s\t%s", target, line, s:yellow(a:b, 'Number'), flag, dispname, extra)) ++ let target = empty(name) ? '' : (fullname) ++ return s:rstrip(printf("%s\t[%s] %s\t%s\t%s", target, s:yellow(a:b, 'Number'), flag, dispname, extra)) + endfunction + + function! s:sort_buffers(...) diff --git a/files/nvim/init.vim b/files/nvim/init.vim new file mode 100644 index 0000000..fe40153 --- /dev/null +++ b/files/nvim/init.vim @@ -0,0 +1,284 @@ +" Basic settings. +set number +set noshowmode +set signcolumn=yes +set updatetime=250 +set scrolloff=5 + +" Change directory based on current file. +set autochdir + +" inotify compat? +set backupcopy=yes + +" Old defaults (I think). +set splitright +set splitbelow + +" Syntax and indent from filetype. +set nocompatible +filetype plugin indent on +syntax on + +" 4 spaces autoindent. +set tabstop=4 +set shiftwidth=4 +set expandtab +set autoindent + +" C syntax preference. +let g:c_syntax_for_h=1 +set cinoptions=l1,:0,g2,h2,(4,u0 +set cindent + +" Set different format for mail and text files. +set nowrap nolinebreak nolist formatoptions=l textwidth=0 +autocmd FileType mail,text setlocal wrap formatoptions=l textwidth=0 + +" Ex tab complete that makes sense to me. +set wildmode=longest,list,full +set wildmenu + +" Allow distinguishing <C-i> from <Tab> in bindings. +let &t_TI = '\<Esc>[>4;2m' +let &t_TE = '\<Esc>[>4;m' +" Treat shift + backspace as normal backspace. +tnoremap <S-BS> <BS> + +" System clipboard on linux. +set clipboard+=unnamedplus + +" Session options. +set ssop=skiprtp,blank,buffers,folds,winsize,terminal +set vop-=curdir +let view_dir = expand('~/c/sessions/views') +if !isdirectory(view_dir) + call mkdir(view_dir, "p", 0700) +endif +let &viewdir=view_dir +" https://github.com/zhimsel/vim-stay/issues/10#issuecomment-336637546 +augroup stay_no_lcd + autocmd! + if exists(':tcd') == 2 + autocmd User BufStaySavePre if haslocaldir() | let w:lcd = getcwd() | exe 'cd '.fnameescape(getcwd(-1, -1)) | endif + else + autocmd User BufStaySavePre if haslocaldir() | let w:lcd = getcwd() | cd - | cd - | endif + endif + autocmd User BufStaySavePost if exists('w:lcd') | execute 'lcd' fnameescape(w:lcd) | unlet w:lcd | endif +augroup END + +" Staggered backups. +if isdirectory(expand('/mnt/store/backup/vim')) + set backupdir=/mnt/store/backup/vim// +else + set backupdir=~/c/sessions/backup// +endif +set backup + +" Swap file directory. +set directory=~/c/sessions/swaps// + +if has("persistent_undo") + let undo_dir = expand('~/c/sessions/undo') + if !isdirectory(undo_dir) + call mkdir(undo_dir, "p", 0700) + endif + let &undodir=undo_dir + set undofile +endif + +" Colorscheme. +set background=dark +set termguicolors +colo wal-gui + +" Cursor blink. +set guicursor=a:blinkon1 + +" Highlight whitespace. +au BufEnter * match ExtraWhitespace /\s\+$/ +au InsertEnter * match ExtraWhitespace /\s\+\%#\@<!$/ +au InsertLeave * match ExtraWhitespace /\s\+$/ + +" Fzf format. +let g:fzf_colors = { + \'fg': ['fg', 'Normal'], + \'bg': ['bg', 'Normal'], + \'hl': ['fg', 'Type'], + \'fg+': ['fg', 'CursorLine', 'CursorColumn', 'Normal'], + \'bg+': ['bg', 'CursorLine', 'CursorColumn'], + \'hl+': ['fg', 'Type'], + \'info': ['fg', 'PreProc'], + \'border': ['fg', 'Operator'], + \'prompt': ['fg', 'Identifier'], + \'pointer': ['fg', 'String'], + \'marker': ['fg', 'Keyword'], + \'spinner': ['fg', 'String'], + \'header': ['fg', 'Type'] +\} +let g:fzf_preview_window = ['right,47%'] +let g:fzf_layout = { 'window': { 'width': 0.65, 'height': 0.50 } } + +function! StatuslineGit() + let l:branchname = gitbranch#name() + return strlen(l:branchname) > 0?' '.l:branchname.' ':'' +endfunction + +lua << EOF +function get_lsp_name() + local active_clients = vim.lsp.get_active_clients({bufnr = vim.api.nvim_get_current_buf()}) + if next(active_clients) == nil then + return '' + else + return '+'..active_clients[1].name + end +end +EOF + +function! StatuslineLsp() abort + return luaeval('get_lsp_name()') +endfunction + +" Custom statusline. +function! Statusline() abort + let focused = g:statusline_winid == win_getid(winnr()) + let status = (focused ? '%#StatusLine#' : '%#StatusLineNC#') + let status .= '%{StatuslineGit()}' + let status .= ' %f' + let status .= ' %m' + let status .= ' vim@%{hostname()}' + let status .= '%=' + let status .= ' %y' + let status .= '%{StatuslineLsp()}' + let status .= ' %{&fileencoding?&fileencoding:&encoding}' + let status .= '[%{&fileformat}]' + let status .= '%3p%%' + let status .= ' %3l:%-3c' + return status +endfunction +set statusline=%!Statusline() + +lua << EOF +-- LSP configs. +if os.getenv('NIX_SHELL') ~= nil then + local lsp = require('lspconfig') + lsp.clangd.setup({ + cmd = { + 'clangd', + '-j=4', + '--log=error', + '--malloc-trim', + '--background-index', + '--clang-tidy', + '--completion-style=bundled', + '--pch-storage=memory', + '--header-insertion=never', + '--header-insertion-decorators=0' + } + }) + lsp.ruff.setup({}) + require("inc_rename").setup({}) +end + +-- Try to make treesitter suck less. +require('nvim-treesitter.configs').setup({ + highlight = { + enable = true, + additional_vim_regex_highlighting = false + }, + indent = { + enable = true, + disable = { 'c', 'cpp' } + } +}) + +-- Set sessions folder and autowrite. +require('mini.sessions').setup({ + autoread = false, + autowrite = true, + directory = '~/c/sessions' +}) + +-- Completion. +require('mini.completion').setup({}) + +-- Disable icons in diffview. +require("diffview").setup({ + diff_binaries = false, + use_icons = false +}) + +-- Don't use tabs in Neogit. +require('neogit').setup({ + kind = 'vsplit', + commit_editor = { kind = 'split' }, + commit_select_view = { kind = 'vsplit' }, + commit_view = { kind = 'vsplit' }, + log_view = { kind = 'split' }, + reflog_view = { kind = 'split' }, + preview_buffer = { kind = 'split' }, + popup = { kind = 'split' }, + refs_view = { kind = 'split' }, + -- Allow basic movement in Neogit without mapping conflicts. + mappings = { + popup = { ["l"] = false, ["L"] = "LogPopup" }, + status = { ["$"] = false, ["#"] = "CommandHistory" } + } +}) + +-- Preview colors in #<hex> format. +require('ccc').setup({ highlighter = { auto_enable = true, lsp = true } }) + +-- Make shift + nav keys no-ops. +vim.keymap.set('n', 'H', '<nop>', { silent = true }) +vim.keymap.set('n', 'J', '<nop>', { silent = true }) +vim.keymap.set('n', 'K', '<nop>', { silent = true }) +vim.keymap.set('n', 'L', '<nop>', { silent = true }) +-- Normal mode tab no-op. +vim.keymap.set('n', '<Tab>', [[]], { silent = true }) +-- Disable q: for histroy. +vim.keymap.set('n', 'q:', [[]], { silent = true }) +-- Simplify split movement. +vim.keymap.set('n', '<C-h>', [[:wincmd h<CR>]], { silent = true }) +vim.keymap.set('n', '<C-j>', [[:wincmd j<CR>]], { silent = true }) +vim.keymap.set('n', '<C-k>', [[:wincmd k<CR>]], { silent = true }) +vim.keymap.set('n', '<C-l>', [[:wincmd l<CR>]], { silent = true }) +vim.keymap.set('n', '<C-o>', [[:vsplit<CR>]], { silent = true }) +-- Make ctrl + '.' and ',' map to previous buffer. +vim.keymap.set('n', '<C-,>', '<c-^>', {}) +vim.keymap.set('n', '<C-.>', '<c-^>', {}) +-- Undotree +vim.keymap.set('n', 'U', vim.cmd.UndotreeToggle) +-- Toggle colorcolumn. +vim.keymap.set('n', 'C', [[:execute 'set colorcolumn=' . (&colorcolumn == '' ? '101' : '')<CR>]], { silent = true }) +-- Lsp Binds. +vim.keymap.set('n', '<C-d>', '<C-]>', {}) +vim.keymap.set('n', '<C-n>', function() + return ":IncRename " .. vim.fn.expand("<cword>") +end, { expr = true }) +-- Fzf binds. +vim.keymap.set('n', '<C-i>', [[:GGrep<CR>]], { silent = true }) +vim.keymap.set('n', '\\', [[:Buffers<CR>]], { silent = true }) +-- Personally intuitive pop-up menu binds. +vim.keymap.set('i', '<CR>', [[pumvisible() ? '<C-y><CR>' : '<CR>']], { expr = true }) +vim.keymap.set('i', '<Up>', [[pumvisible() ? '<C-p>' : '<Up>']], { expr = true }) +vim.keymap.set('i', '<Down>', [[pumvisible() ? '<C-n>' : '<Down>']], { expr = true }) +-- Only Neogit bind, handle all further operations from this menu. +vim.keymap.set('n', 'Y', [[:Neogit<CR>]], { silent = true }) +EOF + +command Tabify set noexpandtab | %retab! | set expandtab +command Untabify set expandtab | %retab! + +" https://github.com/junegunn/fzf.vim?tab=readme-ov-file#example-git-grep-wrapper +command! -bang -nargs=* GGrep + \ call fzf#vim#grep( + \ 'git grep --line-number -- '.fzf#shellescape(<q-args>), + \ fzf#vim#with_preview({'dir': systemlist('git rev-parse --show-toplevel')[0]}), <bang>0) + +call Juliana#Init() " Custom insert mode tab behavior inherited from Emacs. +inoremap <silent><Tab> <C-R>=Juliana#CompleteTab('START')<CR> + \<C-R>=Juliana#CompleteTab('TAB')<CR> + \<C-R>=Juliana#CompleteTab('ALIGN')<CR> + \<C-R>=Juliana#CompleteTab('NEXT')<CR> +inoremap <silent><S-Tab> <C-R>=Juliana#CompleteSTab('PREV')<CR> diff --git a/files/nvim/local/autoload/Juliana.vim b/files/nvim/local/autoload/Juliana.vim new file mode 100644 index 0000000..1b684b9 --- /dev/null +++ b/files/nvim/local/autoload/Juliana.vim @@ -0,0 +1,46 @@ +" https://github.com/neitanod/vim-clevertab + +function! Juliana#Init() + let g:Juliana#has_selection = 0 + augroup JulianaPersistAu + autocmd ModeChanged [V\x16]*:i let g:Juliana#has_selection = 1 + autocmd InsertLeave * let g:Juliana#has_selection = 0 + augroup END +endfunction + +function! Juliana#CompleteTab(type) + if a:type == "START" + let g:Juliana#stop=0 + return "" + endif + + if !g:Juliana#stop + " Vanilla <Tab> if we are at the front of a line. + if a:type == "TAB" && col(".") >= col("$") && !pumvisible() + let g:Juliana#stop=1 + return "\<Tab>" + elseif a:type == "ALIGN" && !pumvisible() " Align if !pumvisible(). + let g:Juliana#stop=1 + if g:Juliana#has_selection + return "\<ESC>gv=i" + else + return "\<ESC>\<C-v>=i" + endif + elseif a:type == "NEXT" " If pumvisible(), goto the next result. + let g:Juliana#stop=1 + return "\<C-n>" + endif + endif + + return "" +endfunction + +function! Juliana#CompleteSTab(type) + if a:type == "PREV" + if pumvisible() " If pumvisible(), goto the previous result. + return "\<C-p>" + else + return "\<Tab>" " <S-Tab> = <Tab> + endif + endif +endfunction diff --git a/files/nvim/mini_sessions_view.diff b/files/nvim/mini_sessions_view.diff new file mode 100644 index 0000000..7fa8500 --- /dev/null +++ b/files/nvim/mini_sessions_view.diff @@ -0,0 +1,13 @@ +diff --git a/lua/mini/sessions.lua b/lua/mini/sessions.lua +index 67d0239..bb20292 100644 +--- a/lua/mini/sessions.lua ++++ b/lua/mini/sessions.lua +@@ -248,7 +248,7 @@ MiniSessions.write = function(session_name, opts) + H.possibly_execute(opts.hooks.pre, data) + + -- Make session file +- local command = string.format('mksession%s %s', opts.force and '!' or '', vim.fn.fnameescape(session_path)) ++ local command = string.format('mkview%s %s', opts.force and '!' or '', vim.fn.fnameescape(session_path)) + vim.cmd(command) + data.modify_time = vim.fn.getftime(session_path) + diff --git a/files/nvim/mini_starter_picture.diff b/files/nvim/mini_starter_picture.diff new file mode 100644 index 0000000..555009a --- /dev/null +++ b/files/nvim/mini_starter_picture.diff @@ -0,0 +1,264 @@ +diff --git a/lua/mini/starter.lua b/lua/mini/starter.lua +index 64939dc..493486b 100644 +--- a/lua/mini/starter.lua ++++ b/lua/mini/starter.lua +@@ -138,7 +138,7 @@ + --- local timer = vim.loop.new_timer() + --- local n_seconds = 0 + --- timer:start(0, 1000, vim.schedule_wrap(function() +---- if vim.bo.filetype ~= 'ministarter' then ++--- if vim.bo.filetype ~= 'dashboard' then + --- timer:stop() + --- return + --- end +@@ -249,6 +249,12 @@ MiniStarter.config = { + -- evaluated first. If `nil` (default), default usage help will be shown. + footer = nil, + ++ -- Amount of empty lines between items and the footer. ++ footer_offset = 1, ++ ++ -- Picture to show to the side of the content. ++ picture = nil, ++ + -- Array of functions to be applied consecutively to initial content. + -- Each function should take and return content for Starter buffer (see + -- |mini.starter| and |MiniStarter.get_content()| for more details). +@@ -372,7 +378,7 @@ MiniStarter.refresh = function(buf_id) + data.footer = H.normalize_header_footer(config.footer or H.default_footer) + + -- Evaluate content +- local content = H.make_initial_content(data.header, items, data.footer) ++ local content = H.make_initial_content(data.header, items, data.footer, config) + local hooks = config.content_hooks or H.default_content_hooks + for _, f in ipairs(hooks) do + content = f(content, buf_id) +@@ -399,6 +405,12 @@ MiniStarter.refresh = function(buf_id) + + -- Apply current query (clear command line afterwards) + H.make_query(buf_id) ++ ++ local timer = vim.loop.new_timer() ++ timer:start(0, 0, vim.schedule_wrap(function() ++ timer:stop() ++ H.draw_picture(config, false) ++ end)) + end + + --- Close Starter buffer +@@ -730,18 +742,45 @@ MiniStarter.gen_hook.aligning = function(horizontal, vertical) + local win_id = vim.fn.bufwinid(buf_id) + if win_id < 0 then return end + ++ local config = H.get_config() ++ + local line_strings = MiniStarter.content_to_lines(content) + ++ H.win_width = vim.api.nvim_win_get_width(win_id) ++ H.win_height = vim.api.nvim_win_get_height(win_id) ++ + -- Align horizontally + -- Don't use `string.len()` to account for multibyte characters + local lines_width = vim.tbl_map(function(l) return vim.fn.strdisplaywidth(l) end, line_strings) +- local min_right_space = vim.api.nvim_win_get_width(win_id) - math.max(unpack(lines_width)) ++ -- Ignore the max line width ++ local min_right_space = H.win_width -- - math.max(unpack(lines_width)) + local left_pad = math.max(math.floor(horiz_coef * min_right_space), 0) + + -- Align vertically +- local bottom_space = vim.api.nvim_win_get_height(win_id) - #line_strings ++ local bottom_space = H.win_height - #line_strings + local top_pad = math.max(math.floor(vert_coef * bottom_space), 0) + ++ -- Position picture ++ if config.picture ~= nil then ++ if config.picture.width == nil then config.picture.width = 25 end ++ if config.picture.position ~= 'right' then config.picture.position = 'left' end ++ if config.picture.padding == nil then config.picture.padding = {} end ++ if config.picture.padding.left == nil then config.picture.padding.left = 0 end ++ if config.picture.padding.top == nil then config.picture.padding.top = 0 end ++ if config.picture.padding.text == nil then config.picture.padding.text = 0 end ++ ++ local picture_left_pad = (config.picture.width / 2.0) - config.picture.padding.left ++ ++ left_pad = left_pad + config.picture.padding.text ++ if config.picture.position == 'left' then ++ H.picture_x = left_pad - picture_left_pad ++ else ++ H.picture_x = left_pad + picture_left_pad ++ end ++ if H.picture_x < 0.0 then H.picture_x = 0.0 end ++ H.picture_y = top_pad + config.picture.padding.top ++ end ++ + return MiniStarter.gen_hook.padding(left_pad, top_pad)(content) + end + end +@@ -1004,7 +1043,7 @@ H.default_footer = [[ + Type query to filter items + <BS> deletes latest character from query + <Esc> resets current query +-<Down/Up>, <C-n/p>, <M-j/k> move current item ++<C-j/k> move current item + <CR> executes action of current item + <C-c> closes this buffer]] + +@@ -1052,8 +1091,54 @@ end + + H.apply_config = function(config) MiniStarter.config = config end + ++H.is_file_readable = function(path) ++ return vim.fn.filereadable(vim.fn.expand(path)) ~= 0 ++end ++ ++H.draw_picture = function(config, clear) ++ if config ~= nil then ++ if config.picture == nil or config.picture.path == nil or not H.is_file_readable(config.picture.path) then return end ++ else ++ -- No picture, so nothing to clear ++ if H.picture_x == nil or H.picture_y == nil then return end ++ end ++ local cmd = '' ++ if clear and not config.picture.kitty then ++ cmd = ('for i in $(seq %d %d); do tput cup $i 0 && tput el; done'):format(0, H.win_height - 1) ++ else ++ cmd = ('chafa %s --align left,top -s %dx%d 2>&1'):format(config.picture.path, config.picture.width, (H.win_height - 2) - H.picture_y) ++ end ++ -- Resizing will not clear on non-kitty mode ++ local output = '' ++ if config.picture.kitty then ++ output = output .. '\027_Ga=d\027\\' ++ end ++ if not clear or not config.picture.kitty then ++ local handle = io.popen(cmd) ++ output = output .. handle:read('*a') ++ -- `rc` doesn't work when run from inside vim (last tested in neovim-0.9) ++ local rc = {handle:close()} ++ end ++ local tty, err = io.open('/proc/self/fd/0', 'wb') ++ if tty then ++ tty:write('\x1b[s') ++ if not clear then ++ tty:write(('\x1b[%d;%dH'):format(H.picture_y, H.picture_x)) ++ elseif not config.picture.kitty then ++ tty:write('\x1b[48;5;0m') ++ end ++ tty:write(output) ++ if not clear then ++ tty:write('\x1b[u') ++ end ++ tty:close() ++ else ++ H.echo('Error opening tty: ' .. err) ++ end ++end ++ + H.create_autocommands = function(config) +- local gr = vim.api.nvim_create_augroup('MiniStarter', {}) ++ H.augroup = vim.api.nvim_create_augroup('MiniStarter', {}) + + if config.autoopen then + local on_vimenter = function() +@@ -1065,7 +1150,7 @@ H.create_autocommands = function(config) + vim.cmd('noautocmd lua MiniStarter.open()') + end + +- local au_opts = { group = gr, nested = true, once = true, callback = on_vimenter, desc = 'Open on VimEnter' } ++ local au_opts = { group = H.augroup, nested = true, once = true, callback = on_vimenter, desc = 'Open on VimEnter' } + vim.api.nvim_create_autocmd('VimEnter', au_opts) + end + +@@ -1111,7 +1196,7 @@ H.normalize_header_footer = function(x) + end + + -- Work with buffer content --------------------------------------------------- +-H.make_initial_content = function(header, items, footer) ++H.make_initial_content = function(header, items, footer, config) + local content = {} + + -- Add header lines +@@ -1124,7 +1209,7 @@ H.make_initial_content = function(header, items, footer) + H.content_add_items(content, items) + + -- Add footer lines +- H.content_add_empty_lines(content, #footer > 0 and 1 or 0) ++ H.content_add_empty_lines(content, #footer > 0 and config.footer_offset or 0) + for _, l in ipairs(footer) do + H.content_add_line(content, { H.content_unit(l, 'footer', 'MiniStarterFooter') }) + end +@@ -1327,11 +1412,22 @@ H.make_buffer_autocmd = function(buf_id) + au('VimResized', function() MiniStarter.refresh(buf_id) end, 'Refresh') + au('CursorMoved', function() H.position_cursor_on_current_item(buf_id) end, 'Position cursor') + ++ local config = H.get_config() ++ + local cache_showtabline = vim.o.showtabline + au('BufLeave', function() + if vim.o.cmdheight > 0 then vim.cmd("echo ''") end + if vim.o.showtabline == 1 then vim.o.showtabline = cache_showtabline end ++ H.draw_picture(config, true) + end, 'On BufLeave') ++ ++ au('BufEnter', function() ++ local timer = vim.loop.new_timer() ++ timer:start(0, 0, vim.schedule_wrap(function() ++ timer:stop() ++ H.draw_picture(config, false) ++ end)) ++ end, 'On BufEnter') + end + + H.apply_buffer_options = function(buf_id) +@@ -1345,17 +1441,11 @@ H.apply_buffer_options = function(buf_id) + + -- Set unique buffer name. Prefer "Starter" prefix as more user friendly. + H.buffer_number = H.buffer_number + 1 +- local name = H.buffer_number <= 1 and 'Starter' or ('Starter_' .. H.buffer_number) +- for _, buf in ipairs(vim.api.nvim_list_bufs()) do +- if vim.fn.fnamemodify(vim.api.nvim_buf_get_name(buf), ':t') == name then +- name = 'ministarter://' .. H.buffer_number +- break +- end +- end ++ local name = H.buffer_number <= 1 and '*dashboard*' or ('dashboard://' .. H.buffer_number) + vim.api.nvim_buf_set_name(buf_id, name) + + -- Having `noautocmd` is crucial for performance: ~9ms without it, ~1.6ms with it +- vim.cmd('noautocmd silent! set filetype=ministarter') ++ vim.cmd('noautocmd silent! set filetype=dashboard') + + local options = { + -- Taken from 'vim-startify' +@@ -1401,12 +1491,8 @@ H.apply_buffer_mappings = function(buf_id) + + buf_keymap('<CR>', 'MiniStarter.eval_current_item()') + +- buf_keymap('<Up>', [[MiniStarter.update_current_item('prev')]]) +- buf_keymap('<C-p>', [[MiniStarter.update_current_item('prev')]]) +- buf_keymap('<M-k>', [[MiniStarter.update_current_item('prev')]]) +- buf_keymap('<Down>', [[MiniStarter.update_current_item('next')]]) +- buf_keymap('<C-n>', [[MiniStarter.update_current_item('next')]]) +- buf_keymap('<M-j>', [[MiniStarter.update_current_item('next')]]) ++ buf_keymap('<C-k>', [[MiniStarter.update_current_item('prev')]]) ++ buf_keymap('<C-j>', [[MiniStarter.update_current_item('next')]]) + + -- Make all special symbols to update query + for _, key in ipairs(vim.split(H.get_config().query_updaters, '')) do +@@ -1487,7 +1573,7 @@ H.echo = function(msg, is_important) + + -- Construct message chunks + msg = type(msg) == 'string' and { { msg } } or msg +- table.insert(msg, 1, { '(mini.starter) ', 'WarningMsg' }) ++ table.insert(msg, 1, { '', 'Warning' }) + + -- Avoid hit-enter-prompt + local max_width = vim.o.columns * math.max(vim.o.cmdheight - 1, 0) + vim.v.echospace +@@ -1525,7 +1611,7 @@ H.eval_fun_or_string = function(x, string_as_cmd) + if type(x) == 'function' then return x() end + if type(x) == 'string' then + if string_as_cmd then +- vim.cmd(x) ++ pcall(function() vim.cmd(x) end) + else + return x + end diff --git a/files/sway_background_covered.diff b/files/sway_background_covered.diff new file mode 100644 index 0000000..3ba8ef4 --- /dev/null +++ b/files/sway_background_covered.diff @@ -0,0 +1,311 @@ +diff --git a/include/ipc.h b/include/ipc.h +index ff011750..e417b421 100644 +--- a/include/ipc.h ++++ b/include/ipc.h +@@ -29,9 +29,10 @@ enum ipc_command_type { + IPC_EVENT_MODE = ((1<<31) | 2), + IPC_EVENT_WINDOW = ((1<<31) | 3), + IPC_EVENT_BARCONFIG_UPDATE = ((1<<31) | 4), +- IPC_EVENT_BINDING = ((1<<31) | 5), +- IPC_EVENT_SHUTDOWN = ((1<<31) | 6), +- IPC_EVENT_TICK = ((1<<31) | 7), ++ IPC_EVENT_BACKGROUND_COVERED = ((1<<31) | 5), ++ IPC_EVENT_BINDING = ((1<<31) | 6), ++ IPC_EVENT_SHUTDOWN = ((1<<31) | 7), ++ IPC_EVENT_TICK = ((1<<31) | 8), + + // sway-specific event types + IPC_EVENT_BAR_STATE_UPDATE = ((1<<31) | 20), +diff --git a/include/sway/ipc-server.h b/include/sway/ipc-server.h +index d4c00942..41e00679 100644 +--- a/include/sway/ipc-server.h ++++ b/include/sway/ipc-server.h +@@ -17,6 +17,7 @@ void ipc_event_workspace(struct sway_workspace *old, + void ipc_event_window(struct sway_container *window, const char *change); + void ipc_event_barconfig_update(struct bar_config *bar); + void ipc_event_bar_state_update(struct bar_config *bar); ++void ipc_event_background_covered(struct sway_output *output, bool covered); + void ipc_event_mode(const char *mode, bool pango); + void ipc_event_shutdown(const char *reason); + void ipc_event_binding(struct sway_binding *binding); +diff --git a/include/sway/output.h b/include/sway/output.h +index 4584ea45..83e3cd7f 100644 +--- a/include/sway/output.h ++++ b/include/sway/output.h +@@ -53,6 +53,8 @@ struct sway_output { + bool enabled; + list_t *workspaces; + ++ bool background_covered; ++ + struct sway_output_state current; + + struct wl_listener layout_destroy; +diff --git a/include/sway/tree/workspace.h b/include/sway/tree/workspace.h +index 58bde20c..1fcd5017 100644 +--- a/include/sway/tree/workspace.h ++++ b/include/sway/tree/workspace.h +@@ -40,6 +40,9 @@ struct sway_workspace { + enum sway_container_layout layout; + enum sway_container_layout prev_split_layout; + ++ bool background_covered; ++ bool pending_background_check; ++ + struct side_gaps current_gaps; + int gaps_inner; + struct side_gaps gaps_outer; +@@ -47,6 +50,7 @@ struct sway_workspace { + struct sway_output *output; // NULL if no outputs are connected + list_t *floating; // struct sway_container + list_t *tiling; // struct sway_container ++ list_t *sorted; // struct sway_container + list_t *output_priority; + bool urgent; + +@@ -89,6 +93,8 @@ bool workspace_is_visible(struct sway_workspace *ws); + + bool workspace_is_empty(struct sway_workspace *ws); + ++void workspace_check_background_covered(struct sway_workspace *ws); ++ + void workspace_output_raise_priority(struct sway_workspace *workspace, + struct sway_output *old_output, struct sway_output *new_output); + +diff --git a/sway/desktop/transaction.c b/sway/desktop/transaction.c +index 8f12832a..9869c934 100644 +--- a/sway/desktop/transaction.c ++++ b/sway/desktop/transaction.c +@@ -702,30 +702,60 @@ static void transaction_apply(struct sway_transaction *transaction) { + "(%.1f frames if 60Hz)", transaction, ms, ms / (1000.0f / 60)); + } + ++ struct sway_transaction_instruction *instruction; ++ struct sway_node *node; ++ struct sway_workspace *ws = NULL; ++ + // Apply the instruction state to the node's current state + for (int i = 0; i < transaction->instructions->length; ++i) { +- struct sway_transaction_instruction *instruction = +- transaction->instructions->items[i]; +- struct sway_node *node = instruction->node; ++ instruction = transaction->instructions->items[i]; ++ node = instruction->node; + + switch (node->type) { + case N_ROOT: ++ ws = NULL; + break; + case N_OUTPUT: + apply_output_state(node->sway_output, &instruction->output_state); ++ ws = node->sway_output->current.active_workspace; + break; + case N_WORKSPACE: + apply_workspace_state(node->sway_workspace, + &instruction->workspace_state); ++ ws = node->sway_workspace; + break; + case N_CONTAINER: + apply_container_state(node->sway_container, + &instruction->container_state); ++ ws = node->sway_container->current.workspace; + break; + } + ++ if (ws) ws->pending_background_check = true; ++ + node->instruction = NULL; + } ++ ++ for (int i = 0; i < transaction->instructions->length; ++i) { ++ instruction = transaction->instructions->items[i]; ++ node = instruction->node; ++ ++ switch (node->type) { ++ case N_ROOT: ++ continue; ++ case N_OUTPUT: ++ ws = node->sway_output->current.active_workspace; ++ break; ++ case N_WORKSPACE: ++ ws = node->sway_workspace; ++ break; ++ case N_CONTAINER: ++ ws = node->sway_container->current.workspace; ++ break; ++ } ++ ++ if (ws) workspace_check_background_covered(ws); ++ } + } + + static void transaction_commit_pending(void); +diff --git a/sway/ipc-json.c b/sway/ipc-json.c +index 571338a4..f9bdcfae 100644 +--- a/sway/ipc-json.c ++++ b/sway/ipc-json.c +@@ -16,6 +16,7 @@ + #include "sway/tree/view.h" + #include "sway/tree/workspace.h" + #include "sway/output.h" ++#include "sway/layers.h" + #include "sway/input/input-manager.h" + #include "sway/input/cursor.h" + #include "sway/input/seat.h" +@@ -360,6 +361,9 @@ static void ipc_json_describe_enabled_output(struct sway_output *output, + json_object_object_add(object, "current_workspace", + json_object_new_string(ws->name)); + ++ json_object_object_add(object, "covered", ++ json_object_new_boolean(ws->background_covered)); ++ + json_object *modes_array = json_object_new_array(); + struct wlr_output_mode *mode; + wl_list_for_each(mode, &wlr_output->modes, link) { +diff --git a/sway/ipc-server.c b/sway/ipc-server.c +index 7f353c0e..f3093505 100644 +--- a/sway/ipc-server.c ++++ b/sway/ipc-server.c +@@ -362,6 +362,20 @@ void ipc_event_bar_state_update(struct bar_config *bar) { + json_object_put(json); + } + ++void ipc_event_background_covered(struct sway_output *output, bool covered) { ++ if (!ipc_has_event_listeners(IPC_EVENT_BACKGROUND_COVERED)) { ++ return; ++ } ++ sway_log(SWAY_DEBUG, "Sending background_covered event"); ++ ++ json_object *json = json_object_new_object(); ++ json_object_object_add(json, "output", json_object_new_string(output->wlr_output->name)); ++ json_object_object_add(json, "covered", json_object_new_boolean(covered)); ++ const char *json_string = json_object_to_json_string(json); ++ ipc_send_event(json_string, IPC_EVENT_BACKGROUND_COVERED); ++ json_object_put(json); ++} ++ + void ipc_event_mode(const char *mode, bool pango) { + if (!ipc_has_event_listeners(IPC_EVENT_MODE)) { + return; +@@ -744,6 +758,8 @@ void ipc_client_handle_command(struct ipc_client *client, uint32_t payload_lengt + client->subscribed_events |= event_mask(IPC_EVENT_BARCONFIG_UPDATE); + } else if (strcmp(event_type, "bar_state_update") == 0) { + client->subscribed_events |= event_mask(IPC_EVENT_BAR_STATE_UPDATE); ++ } else if (strcmp(event_type, "background_covered") == 0) { ++ client->subscribed_events |= event_mask(IPC_EVENT_BACKGROUND_COVERED); + } else if (strcmp(event_type, "mode") == 0) { + client->subscribed_events |= event_mask(IPC_EVENT_MODE); + } else if (strcmp(event_type, "shutdown") == 0) { +diff --git a/sway/tree/output.c b/sway/tree/output.c +index 44b941ca..9004c3cb 100644 +--- a/sway/tree/output.c ++++ b/sway/tree/output.c +@@ -142,6 +142,7 @@ struct sway_output *output_create(struct wlr_output *wlr_output) { + + output->workspaces = create_list(); + output->current.workspaces = create_list(); ++ output->background_covered = false; + + return output; + } +diff --git a/sway/tree/workspace.c b/sway/tree/workspace.c +index f8709a4c..1234c1cd 100644 +--- a/sway/tree/workspace.c ++++ b/sway/tree/workspace.c +@@ -88,8 +88,12 @@ struct sway_workspace *workspace_create(struct sway_output *output, + ws->layout = output_get_default_layout(output); + ws->floating = create_list(); + ws->tiling = create_list(); ++ ws->sorted = create_list(); + ws->output_priority = create_list(); + ++ ws->background_covered = false; ++ ws->pending_background_check = true; ++ + ws->gaps_outer = config->gaps_outer; + ws->gaps_inner = config->gaps_inner; + if (name) { +@@ -153,6 +157,7 @@ void workspace_destroy(struct sway_workspace *workspace) { + list_free_items_and_destroy(workspace->output_priority); + list_free(workspace->floating); + list_free(workspace->tiling); ++ list_free(workspace->sorted); + list_free(workspace->current.floating); + list_free(workspace->current.tiling); + free(workspace); +@@ -616,6 +621,75 @@ bool workspace_is_empty(struct sway_workspace *ws) { + return true; + } + ++static bool x_covered_at_y(list_t *containers, double y, double x, double width) ++{ ++ double end = x + width; ++ double extent = x; ++ for (int i = 0; i < containers->length; ++i) { ++ struct sway_container *n = containers->items[i]; ++ if (!(n->current.y <= y && n->current.y + n->current.height >= y)) { ++ continue; ++ } ++ if (n->current.x > extent) return false; ++ x = n->current.x + n->current.width; ++ if (x >= end) return true; ++ if (x > extent) extent = x; ++ } ++ return false; ++} ++ ++static int containers_x_compare(const void *a, const void *b) { ++ return (*(struct sway_container **)a)->current.x - (*(struct sway_container **)b)->current.x; ++} ++ ++#define TERMINAL_APP_ID "kitty" ++ ++static void add_con_and_or_children_to_list(list_t *result, list_t *list) ++{ ++ struct sway_container *con; ++ for (int i = 0; i < list->length; ++i) { ++ con = list->items[i]; ++ if (con->current.children) { ++ add_con_and_or_children_to_list(result, con->current.children); ++ if (con->current.layout != L_NONE) return; ++ } ++ if (!con->view || !con->view->wlr_xdg_toplevel) continue; // Hack. ++ const char *app_id = view_get_app_id(con->view); ++ if (app_id == NULL || strcmp(app_id, TERMINAL_APP_ID) != 0) { ++ list_add(result, con); ++ } ++ } ++} ++ ++void workspace_check_background_covered(struct sway_workspace *ws) { ++ if (!ws->output || !ws->pending_background_check) return; ++ ws->sorted->length = 0; ++ add_con_and_or_children_to_list(ws->sorted, ws->tiling); ++ add_con_and_or_children_to_list(ws->sorted, ws->floating); ++ list_stable_sort(ws->sorted, containers_x_compare); ++ ws->background_covered = ws->sorted->length > 0; ++ struct sway_container *con; ++ for (int i = 0; i < ws->sorted->length; ++i) { ++ con = ws->sorted->items[i]; ++ double y = con->current.y - 1.0; ++ if (y < ws->y) y = ws->y; ++ double span = con->current.y + con->current.height + 1.0; ++ if (span > ws->y + ws->height) span = ws->y + ws->height; ++ bool top = x_covered_at_y(ws->sorted, y, ws->x, ws->width); ++ if (!top || !x_covered_at_y(ws->sorted, span, ws->x, ws->width)) { ++ ws->background_covered = false; ++ break; ++ } ++ } ++ if (ws == ws->output->current.active_workspace) { ++ if (ws->background_covered != ws->output->background_covered) { ++ ws->output->background_covered = ws->background_covered; ++ ipc_event_background_covered(ws->output, ws->output->background_covered); ++ } ++ ws->pending_background_check = false; ++ } ++} ++ + static int find_output(const void *id1, const void *id2) { + return strcmp(id1, id2); + } diff --git a/files/winxp/xp_activate32.exe b/files/winxp/xp_activate32.exe Binary files differnew file mode 100644 index 0000000..1b0018a --- /dev/null +++ b/files/winxp/xp_activate32.exe |