diff options
Diffstat (limited to '.config')
131 files changed, 5384 insertions, 1639 deletions
diff --git a/.config/.guile b/.config/.guile new file mode 100644 index 0000000..9a74b00 --- /dev/null +++ b/.config/.guile @@ -0,0 +1,4 @@ +(use-modules + (ice-9 readline) + (oop goops)) +(activate-readline) diff --git a/.config/.mozilla/firefox/installs.ini b/.config/.mozilla/firefox/installs.ini new file mode 100644 index 0000000..6a29302 --- /dev/null +++ b/.config/.mozilla/firefox/installs.ini @@ -0,0 +1,3 @@ +[4F96D1932A9F858E] +Default=profile.default +Locked=1 diff --git a/.config/.mozilla/firefox/profile.default/chrome/userChrome.css b/.config/.mozilla/firefox/profile.default/chrome/userChrome.css new file mode 100644 index 0000000..020512e --- /dev/null +++ b/.config/.mozilla/firefox/profile.default/chrome/userChrome.css @@ -0,0 +1,54 @@ +/* Hide top tab bar in Firefox Quantum. */ +@-moz-document url("chrome://browser/content/browser.xhtml") { + #TabsToolbar { + visibility: collapse !important; + margin-bottom: 21px !important; + } +} + +/* Hide autocomplete results dropdown. */ +.urlbarView { + display: none !important; +} + +/* Hide sidebar header. */ +#sidebar-header { + display: none !important; +} + +/* Hide sidebar splitter. */ +#sidebar-splitter { + display: none !important; +} + +/* + * Reduce expanding urlbar. + * Source: https://github.com/WesleyBranton/Remove-Firefox-Megabar#readme + */ + +/* Disable expanding urlbar (compact). */ +@-moz-document url(chrome://browser/content/browser.xhtml) { + #urlbar[breakout][breakout-extend] > #urlbar-input-container, + #urlbar-input-container { + height: 26px !important; + padding-block: 0px !important; + padding-inline: 0px !important; + transition: none !important; + border-radius: var(--toolbarbutton-border-radius) !important; + } + + #urlbar[breakout][breakout-extend] { + top: calc((var(--urlbar-toolbar-height) - var(--urlbar-height)) / 2) !important; + left: 0 !important; + width: 100% !important; + } + + #urlbar[breakout][breakout-extend] > #urlbar-input-container { + border: 1px solid var(--toolbar-field-focus-border-color) !important; + } + + #urlbar[breakout][breakout-extend][open] > #urlbar-input-container { + border-bottom: 1px solid transparent !important; + border-radius: var(--toolbarbutton-border-radius) var(--toolbarbutton-border-radius) 0 0 !important; + } +} diff --git a/.config/.mozilla/firefox/profile.default/user.js b/.config/.mozilla/firefox/profile.default/user.js new file mode 100644 index 0000000..704cf17 --- /dev/null +++ b/.config/.mozilla/firefox/profile.default/user.js @@ -0,0 +1,208 @@ +// + +user_pref("accessibility.typeaheadfind.flashBar", 0); + +user_pref("app.normandy.api_url", ""); +user_pref("app.normandy.enabled", false); +user_pref("app.shield.optoutstudies.enabled", false); +user_pref("app.update.auto", false); + +user_pref("beacon.enabled", false); +user_pref("breakpad.reportURL", ""); + +user_pref("browser.aboutConfig.showWarning", false); // Disable about:config warning +user_pref("browser.discovery.enabled", false); // Disable extension recommendations +user_pref("browser.fixup.alternate.enabled", false); // Disable URL fixing +user_pref("browser.formfill.enable", false); // Disable form history +user_pref("browser.pocket.enabled", false); // Disable pocket +user_pref("browser.privatebrowsing.forceMediaMemoryCache", true); // Memory only private browsing media cache +user_pref("browser.startup.homepage", "about:blank"); // Set home page to about:blank + +user_pref("browser.cache.disk.enable", false); // Disable disk cache +user_pref("browser.cache.disk_cache_ssl", false); +user_pref("browser.cache.memory.capacity", 25600); +user_pref("browser.cache.offline.enable", false); + +user_pref("browser.download.alwaysOpenPanel", false); // Disable opening panel on download +user_pref("browser.download.always_ask_before_handling_new_types", true); // Always ask for new mime types +user_pref("browser.download.animateNotifications", false); // Disable download animations +user_pref("browser.download.manager.addToRecentDocs", false); // Disable adding download to recent list +user_pref("browser.download.useDownloadDir", false); // Always ask where to save download + +user_pref("browser.crashReports.unsubmittedCheck.autoSubmit", false); +user_pref("browser.crashReports.unsubmittedCheck.autoSubmit2", false); +user_pref("browser.crashReports.unsubmittedCheck.enabled", false); + +user_pref("browser.newtab.preload", false); +user_pref("browser.newtabpage.enabled", false); +user_pref("browser.newtabpage.enhanced", false); +user_pref("browser.newtabpage.introShown", true); +user_pref("browser.newtabpage.activity-stream.enabled", false); +user_pref("browser.newtabpage.activity-stream.prerender", false); +user_pref("browser.newtabpage.activity-stream.showSearch", false); +user_pref("browser.newtabpage.activity-stream.feeds.snippets", false); +user_pref("browser.newtabpage.activity-stream.feeds.topsites", false); +user_pref("browser.newtabpage.activity-stream.feeds.section.highlights", false); +user_pref("browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons", false); +user_pref("browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features", false); +user_pref("browser.newtabpage.activity-stream.section.highlights.includePocket", false); +user_pref("browser.newtabpage.activity-stream.section.highlights.includeVisited", false); +user_pref("browser.newtabpage.activity-stream.section.highlights.includeBookmarks", false); +user_pref("browser.newtabpage.activity-stream.section.highlights.includeDownloads", false); + +user_pref("browser.safebrowsing.appRepURL", ""); +user_pref("browser.safebrowsing.blockedURIs.enabled", false); +user_pref("browser.safebrowsing.downloads.enabled", false); +user_pref("browser.safebrowsing.downloads.remote.enabled", false); +user_pref("browser.safebrowsing.downloads.remote.url", ""); +user_pref("browser.safebrowsing.enabled", false); +user_pref("browser.safebrowsing.malware.enabled", false); +user_pref("browser.safebrowsing.phishing.enabled", false); +user_pref("browser.safebrowsing.downloads.remote.block_potentially_unwanted", false); +user_pref("browser.safebrowsing.downloads.remote.block_uncommon", false); + +user_pref("browser.search.geoip.url", ""); +user_pref("browser.search.region", "US"); +user_pref("browser.search.suggest.enabled", false); +user_pref("browser.search.update", false); + +user_pref("browser.send_pings", false); +user_pref("browser.selfsupport.url", ""); +user_pref("browser.disableResetPrompt", true); +user_pref("browser.shell.checkDefaultBrowser", false); +user_pref("browser.send_pings.require_same_host", true); +user_pref("browser.startup.homepage_override.mstone", "ignore"); // Disable welcome screen +user_pref("browser.messaging-system.whatsNewPanel.enabled", false); // Disable what's new panel +user_pref("browser.sessionstore.privacy_level", 2); +user_pref("browser.sessionhistory.max_entries", 20); +user_pref("browser.tabs.crashReporting.sendReport", false); + +user_pref("browser.urlbar.maxRichResults", 0); +user_pref("browser.urlbar.searchSuggestionsChoice", false); +user_pref("browser.urlbar.showSearchTerms.enabled", false); // Always show URL +user_pref("browser.urlbar.speculativeConnect.enabled", false); +user_pref("browser.urlbar.suggest.bookmark", false); +user_pref("browser.urlbar.suggest.engines", false); +user_pref("browser.urlbar.suggest.history", false); +user_pref("browser.urlbar.suggest.openpage", false); +user_pref("browser.urlbar.suggest.searches", false); +user_pref("browser.urlbar.suggest.topsites", false); +user_pref("browser.urlbar.showSearchSuggestionsFirst", false); +user_pref("browser.urlbar.timesBeforeHidingSuggestionsHint", 0); +user_pref("browser.urlbar.trimURLs", false); + +user_pref("datareporting.healthreport.service.enabled", false); +user_pref("datareporting.healthreport.uploadEnabled", false); +user_pref("datareporting.policy.dataSubmissionEnabled", false); + +user_pref("device.sensors.ambientLight.enabled", false); +user_pref("device.sensors.enabled", false); +user_pref("device.sensors.motion.enabled", false); +user_pref("device.sensors.orientation.enabled", false); +user_pref("device.sensors.proximity.enabled", false); + +user_pref("devtools.cache.disabled", true); +user_pref("devtools.chrome.enabled", true); +user_pref("devtools.command-button-measure.enabled", true); +user_pref("devtools.command-button-paintflashing.enabled", true); +user_pref("devtools.command-button-rulers.enabled", true); +user_pref("devtools.command-button-screenshot.enabled", true); +user_pref("devtools.dom.enabled", true); + +user_pref("dom.allow_cut_copy", false); +user_pref("dom.battery.enabled", false); +user_pref("dom.event.clipboardevents.enabled", false); +user_pref("dom.event.contextmenu.enabled", false); +user_pref("dom.maxHardwareConcurrency", 2); +user_pref("dom.popup_allowed_events", ""); +user_pref("dom.webnotifications.enabled", false); + +user_pref("extensions.getAddons.cache.enabled", false); +user_pref("extensions.getAddons.showPane", false); // Disable recommendations pane +user_pref("extensions.htmlaboutaddons.recommendations.enabled", false); // Disable addons recommendations +user_pref("extensions.pocket.enabled", false); +user_pref("extensions.screenshots.upload-disabled", true); +user_pref("extensions.shield-recipe-client.api_url", ""); +user_pref("extensions.shield-recipe-client.enabled", false); +user_pref("extensions.webservice.discoverURL", ""); + +user_pref("experiments.enabled", false); +user_pref("experiments.manifest.uri", ""); +user_pref("experiments.supported", false); +user_pref("experiments.activeExperiment", false); + +user_pref("geo.enabled", false); +user_pref("gfx.webrender.all", true); +user_pref("javascript.options.mem.max", 51200); +user_pref("layout.css.visited_links_enabled", false); // Disable visited links + +user_pref("media.autoplay.default", 1); +user_pref("media.ffvpx.enabled", false); +user_pref("media.autoplay.enabled", false); +user_pref("media.ffmpeg.vaapi.enabled", true); +user_pref("media.ffmpeg.dmabuf-textures.enabled", true); + +user_pref("network.IDN_show_punycode", true); +user_pref("network.allow-experiments", false); +user_pref("network.captive-portal-service.enabled", false); +user_pref("network.connectivity-service.enabled", false); // Disable network connectivity check +user_pref("network.cookie.cookieBehavior", 1); +user_pref("network.cookie.lifetimePolicy", 2); +user_pref("network.cookie.thirdparty.sessionOnly", true); +user_pref("network.dns.disableIPv6", true); +user_pref("network.dns.disablePrefetch", true); +user_pref("network.dns.disablePrefetchFromHTTPS", true); +user_pref("network.dnsCacheEntries", 0); +user_pref("network.http.referer.spoofSource", true); +user_pref("network.http.speculative-parallel-limit", 0); +user_pref("network.predictor.cleaned-up", true); +user_pref("network.predictor.enable-prefetch", false); +user_pref("network.predictor.enabled", false); +user_pref("network.prefetch-next", false); +user_pref("network.proxy.socks_remote_dns", true); // Use proxy for DNS +user_pref("network.trr.mode", 5); + +user_pref("security.OCSP.enabled", 0); +user_pref("security.ssl.disable_session_identifiers", true); + +user_pref("toolkit.telemetry.archive.enabled", false); +user_pref("toolkit.telemetry.bhrPing.enabled", false); +user_pref("toolkit.telemetry.cachedClientID", ""); +user_pref("toolkit.telemetry.enabled", false); +user_pref("toolkit.telemetry.firstShutdownPing.enabled", false); +user_pref("toolkit.telemetry.hybridContent.enabled", false); +user_pref("toolkit.telemetry.newProfilePing.enabled", false); +user_pref("toolkit.telemetry.prompted", 2); +user_pref("toolkit.telemetry.rejected", true); +user_pref("toolkit.telemetry.reportingpolicy.firstRun", false); +user_pref("toolkit.telemetry.server", ""); +user_pref("toolkit.telemetry.shutdownPingSender.enabled", false); +user_pref("toolkit.telemetry.unified", false); +user_pref("toolkit.telemetry.unifiedIsOptIn", false); +user_pref("toolkit.telemetry.updatePing.enabled", false); + +user_pref("signon.autofillForms", false); +user_pref("signon.generation.enabled", false); +user_pref("signon.firefoxRelay.feature", "disabled"); // Disable relay email masks + +user_pref("extensions.formautofill.addresses.enabled", false); +user_pref("extensions.formautofill.creditCards.enabled", false); + +user_pref("privacy.donottrackheader.enabled", true); +user_pref("privacy.donottrackheader.value", 1); +user_pref("privacy.trackingprotection.cryptomining.enabled", true); +user_pref("privacy.trackingprotection.enabled", true); +user_pref("privacy.trackingprotection.fingerprinting.enabled", true); +user_pref("privacy.trackingprotection.pbmode.enabled", true); +user_pref("privacy.usercontext.about_newtab_segregation.enabled", true); + +user_pref("privacy.clearOnShutdown.cache", true); // Clear cache on shutdown +user_pref("privacy.clearOnShutdown.cookies", true); // Clear cookies on shutdown +user_pref("privacy.clearOnShutdown.formdata", true); // Clear form data on shutdown +user_pref("privacy.clearOnShutdown.offlineApps", true); // Clear offline website data on shutdown +user_pref("privacy.clearOnShutdown.sessions", true); // Clear active logins on shutdown + +user_pref("webgl.disable-extensions", true); +user_pref("webgl.disabled", true); +user_pref("webgl.renderer-string-override", " "); +user_pref("webgl.vendor-string-override", " "); diff --git a/.config/.mozilla/firefox/profiles.ini b/.config/.mozilla/firefox/profiles.ini new file mode 100644 index 0000000..6d12032 --- /dev/null +++ b/.config/.mozilla/firefox/profiles.ini @@ -0,0 +1,12 @@ +[Install4F96D1932A9F858E] +Default=profile.default +Locked=1 + +[Profile0] +Name=default +IsRelative=1 +Path=profile.default +Default=1 + +[General] +Version=2 diff --git a/.config/.themes b/.config/.themes new file mode 120000 index 0000000..62fc878 --- /dev/null +++ b/.config/.themes @@ -0,0 +1 @@ +../.local/share/themes
\ No newline at end of file diff --git a/.config/VSCodium/User/settings.json b/.config/VSCodium/User/settings.json new file mode 100644 index 0000000..7040482 --- /dev/null +++ b/.config/VSCodium/User/settings.json @@ -0,0 +1,8 @@ +{ + "workbench.startupEditor": "none", + "update.mode": "none", + "window.menuBarVisibility": "toggle", + "update.showReleaseNotes": false, + "extensions.autoCheckUpdates": false, + "extensions.autoUpdate": false +}
\ No newline at end of file diff --git a/.config/X11/Xresources b/.config/X11/Xresources index 9558b4a..d551748 100644 --- a/.config/X11/Xresources +++ b/.config/X11/Xresources @@ -2,55 +2,77 @@ ! URxvt Settings ! ----------------- -URxvt.perl-ext-common: default,matcher,font-size,vtwheel,url-select,keyboard-select -URxvt.url-launcher: /usr/bin/env browser -URxvt.url-select.launcher: /usr/bin/env browser -URxvt.keysym.M-Escape: perl:keyboard-select:activate -URxvt.matcher.button: 1 -URxvt.internalBorder: 10 -URxvt.geometry: 74x18 -URxvt.cursorUnderline: 0 URxvt.cursorBlink: 1 -URxvt.cursorColor: #69AEFF -URxvt*font: xft:monospace:size=10,xft:DejaVuSansMono Nerd Font Mono:size=10 -URxvt.boldFont: xft:monospace:size=10,xft:DejaVuSansMono Nerd Font Mono:size=10 -URxvt.italicFont: xft:monospace:size=10,xft:DejaVuSansMono Nerd Font Mono:size=10 -URxvt.boldItalicFont: xft:monospace:size=10,xft:DejaVuSansMono Nerd Font Mono:size=10 +URxvt.cursorUnderline: 0 +URxvt.geometry: 80x18 +URxvt.internalBorder: 10 URxvt.keysym.C-0: perl:font-size:reset -URxvt.keysym.C-Up: perl:font-size:increase URxvt.keysym.C-Down: perl:font-size:decrease +URxvt.keysym.C-Up: perl:font-size:increase +URxvt.keysym.M-Escape: perl:keyboard-select:activate +URxvt.matcher.button: 1 +URxvt.perl-ext-common: default,matcher,font-size,vtwheel,url-select,keyboard-select,-confirm-paste URxvt.scrollBar: false +URxvt.scrollTtyKeypress: true URxvt.scrollTtyOutput: false URxvt.scrollWithBuffer: true -URxvt.scrollTtyKeypress: true -URxvt.transparent: false URxvt.shading: 20 -URxvt.foreground: #ffffff -URxvt.background: #2c303c -URxvt.colorUL: #8fc1ff +URxvt.transparent: false +URxvt.url-launcher: /usr/bin/env xdg-open +URxvt.url-select.launcher: /usr/bin/env xdg-open + +URxvt.boldFont: xft:monospace:size=10,xft:DejaVuSansMono Nerd Font Mono:size=10 +URxvt.boldItalicFont: xft:monospace:size=10,xft:DejaVuSansMono Nerd Font Mono:size=10 +URxvt.font: xft:monospace:size=10,xft:DejaVuSansMono Nerd Font Mono:size=10 +URxvt.italicFont: xft:monospace:size=10,xft:DejaVuSansMono Nerd Font Mono:size=10 + +! ----------------- +! UXTerm Settings +! ----------------- + +UXTerm.termName: xterm-256color +UXTerm.ttyModes: erase ^? +UXTerm.vt100.backarrowKey: false +UXTerm.vt100.cursorBlink: true +UXTerm.vt100.faceName: xft:monospace:size=10,xft:DejaVuSansMono Nerd Font Mono:size=10 +UXTerm.vt100.fastScroll: true +UXTerm.vt100.geometry: 80x18 +UXTerm.vt100.internalBorder: 10 +UXTerm.vt100.jumpScroll: true +UXTerm.vt100.locale: false +UXTerm.vt100.metaSendsEscape: true +UXTerm.vt100.multiScroll: true +UXTerm.vt100.saveLines: 4096 +UXTerm.vt100.utf8: true ! ----------------- ! Terminal Colors ! ----------------- +*colorUL: #8fc1ff +*cursorColor: #69aeff + +*foreground: #ffffff +*background: #2c303c + !black *color0: #2c303c -*color8: #666666 +*color8: #999999 !red -*color1: #e84f4f -*color9: #ff3838 +*color1: #ed7373 +*color9: #ff6666 !green *color2: #beff3e *color10: #cfff72 !yellow -*color3: #fea63c +*color3: #feac48 *color11: #ffdf23 !blue -*color4: #69aeff +*color4: #80c6ff *color12: #5aa5ff !magenta @@ -59,10 +81,10 @@ URxvt.colorUL: #8fc1ff !cyan *color6: #69aeff -*color14: #8b8b8b +*color14: #9fc1dd !white -*color7: #ffffff +*color7: #eeeeee *color15: #ffffff ! ----------------- @@ -72,36 +94,24 @@ URxvt.colorUL: #8fc1ff Xft.autohint: 0 Xft.antialias: 1 Xft.hinting: 1 -Xft.hintstyle: hintslight Xft.dpi: 96 Xft.rgba: rgb +Xft.hintstyle: hintslight Xft.lcdfilter: lcddefault ! ----------------- -! ROFI Settings -! ----------------- - -rofi.bw: 0 -rofi.color-enabled: true -rofi.hide-scrollbar: true -rofi.separator-style: none -rofi.disable-history: false -rofi.fake-transparency: false - -rofi.color-window: argb:cc222222, #FAC863, #FAC863 -rofi.color-normal: argb:00000000, #FFFFFF, argb:00000000, #FAC863, #1B2B34 -rofi.color-active: argb:00000000, #FFFFFF, argb:00000000, #6699CC, #1B2B34 -rofi.color-urgent: argb:00000000, #F99157, argb:00000000, #F99157, #1B2B34 - -! ----------------- ! DMENU Settings ! ----------------- -dmenu.font: xft:Sans:size=9:style=bold -dmenu.background: #000000 -dmenu.foreground: #ffffff -dmenu.selforeground: #000000 -dmenu.selbackground: #1b99ec +dmenu.font: xft:Sans:size=10:style=bold +dmenu.foreground: #80c6ff +dmenu.selforeground: #75c277 +dmenu.selhiforeground: #ffffff +dmenu.normhiforeground: #75c277 +dmenu.background: #111111 +dmenu.selbackground: #111111 +dmenu.selhibackground: #111111 +dmenu.normhibackground: #111111 ! ----------------- ! X Settings diff --git a/.config/X11/xbindkeysrc b/.config/X11/xbindkeysrc index ecafb94..a8605fe 100644 --- a/.config/X11/xbindkeysrc +++ b/.config/X11/xbindkeysrc @@ -1,107 +1,107 @@ -########################### -# xbindkeys configuration # -########################### - -# Quake Terminal -"tdrop -tam -y 65% -x 15% -w 70% -h 35% urxvt -pe tabbed" +# quake terminal +"dropdown-terminal" Mod4 + q -# App Launcher -"$HOME/.local/bin/scripts/app-launcher" +# program launcher +"dmenu_run_history" Mod4 + r -# Priv App Launcher -"$HOME/.local/bin/scripts/app-launcher-priv" +# privilege launcher +"dmenu_run_history privilege" Mod4 + e -# Terminal App Launcher -"$HOME/.local/bin/scripts/app-launcher-terminal" +# terminal launcher +"dmenu_run_history terminal" Mod4 + w -# Zoom Application +# zoom application "sh -c 'notify-send Zoom && boomer'" Mod4 + x -# Close active window +# close active window "wmctrl -c :ACTIVE:" Mod4 + Shift + c -# Toggle fullscreen active window -"wmctrl -r :ACTIVE: -b toggle,fullscreen" - Mod4 + f - -# Toggle ontop active window +# toggle ontop active window "wmctrl -r :ACTIVE: -b toggle,above" Mod4 + t -# Copyq Toggle -"$HOME/.local/bin/scripts/clipboard" +# show bookmarks +"bookmarks show $HOME/Shares/Projects/bookmarks/archives/bookmarks-old.html" + Mod4 + g + +# clipboard toggle +"clipboard" Mod4 + z -# Text plumber -"$HOME/.local/bin/plumber-dmenu" +# text plumber +"plumber-dmenu" Mod4 + i -# File Search -"$HOME/.local/bin/scripts/file-search" +# pass menu +"pass-menu" + Mod4 + d + +# file search +"file-search" Mod4 + p -# Window Switcher -"$HOME/.local/bin/scripts/window-switcher" +# window switcher +"window-switcher" Alt + Tab -# Window Overview -"$HOME/.local/bin/scripts/window-overview" +# window overview +"window-overview" Mod4 + Tab -# File Search -"$HOME/.local/bin/scripts/internet-search" +# file search +"internet-search" Mod4 + a -# Volume Up -"$HOME/.local/bin/scripts/volume-up" +# volume up +"volume-control up" XF86AudioRaiseVolume -# Volume Down -"$HOME/.local/bin/scripts/volume-down" +# volume down +"volume-control down" XF86AudioLowerVolume -# Volume Mute -"$HOME/.local/bin/scripts/volume-mute" +# volume mute +"volume-control mute" XF86AudioMute -# Lock Screen -"$HOME/.local/bin/scripts/lockscreen" +# lock screen +"lockscreen" XF86ScreenSaver -# Snipping Tool -"$HOME/.local/bin/scripts/snipping-tool" +# snipping tool +"snipping-tool" Print -# Switch Monitor -"$HOME/.local/bin/scripts/switch-monitor" +# switch monitor +"switch-monitor" XF86Display -# Screen Record +# screen record "peek" Alt + Print -# Flameshot Screenshots +# flameshot screenshots "flameshot gui" Control + Print -# Shortcut Key Check +# shortcut key check "urxvt -hold -e xbindkeys --multikey -f $HOME/.config/xbindkeysrc" Shift + Mod4 + b -# Terminal +# terminal "urxvt" Mod4 + Return -# Terminal Tabbed +# terminal tabbed "urxvt -pe tabbed" - Alt + Mod4 + Return + Control + Mod4 + Return -# Terminal Multiplexer +# terminal multiplexer "urxvt -e tmux attach" - Control + Mod4 + Return + Alt + Mod4 + Return diff --git a/.config/X11/xinitrc b/.config/X11/xinitrc index 875e361..116c9da 100644..100755 --- a/.config/X11/xinitrc +++ b/.config/X11/xinitrc @@ -5,25 +5,23 @@ Xresources=$HOME/.config/X11/Xresources Xauthority=$HOME/.config/X11/Xauthority # merge in defaults and keymaps -[ -f "$Xresources" ] && xrdb -merge "$Xresources"; -[ -f "$Xmodmap" ] && xmodmap "$Xmodmap"; +[ -f "$Xmodmap" ] && xmodmap "$Xmodmap" +[ -f "$Xresources" ] && xrdb -merge "$Xresources" # screen timeouts xset s 0 0 & xset dpms 3600 3600 3600 & # set cursor -xsetroot -cursor_name left_ptr; +xsetroot -cursor_name left_ptr # set keypress repeat -xset r rate 200 60; - -# generate xauth -grep "$(hostname)" "$Xauthority" || rm -f "$Xauthority"; -xauth generate :0 . trusted; +xset r rate 200 60 # import systemctl environment -systemctl --user import-environment; +systemctl --user import-environment -# Run awesome -exec awesome --no-argb; +# launch environment +dbus-launch xfce4-session \ + || dbus-broker-launch xfce4-session \ + || exec awesome --no-argb diff --git a/.config/alacritty/alacritty.yml b/.config/alacritty/alacritty.yml new file mode 100644 index 0000000..3f7e7c6 --- /dev/null +++ b/.config/alacritty/alacritty.yml @@ -0,0 +1,10 @@ +--- +window: + padding: + x: 15 + y: 15 + dimensions: + columns: 79 + lines: 18 +font: + size: 10 diff --git a/.config/aspell/aspell.conf b/.config/aspell/aspell.conf new file mode 100644 index 0000000..47eb382 --- /dev/null +++ b/.config/aspell/aspell.conf @@ -0,0 +1 @@ +data-dir /home/thedro/.nix-profile/lib/aspell diff --git a/.config/awesome/rc.lua b/.config/awesome/rc.lua index 1980ec6..85221b5 100644 --- a/.config/awesome/rc.lua +++ b/.config/awesome/rc.lua @@ -50,7 +50,7 @@ end -- Variable definitions modkey = "Mod4" terminal = os.getenv("TERMINAL") or "urxvt" -editor = os.getenv("EDITOR") or "nano" +editor = os.getenv("EDITOR") or "vim" editor_cmd = terminal .. " -e " .. editor beautiful.init(awful.util.getdir("config") .. "/themes/default/theme.lua") @@ -91,10 +91,10 @@ menubar.utils.terminal = terminal widget_memory = awful.widget.watch('sh -c "printf \' \' && free --giga -h | awk \'FNR == 2 { print $7 }\'"', 3) -- Create memory widget. widget_swap = awful.widget.watch('sh -c "printf \' \' && free --giga -h | awk \'FNR == 3 { print $4 }\'"', 4) -- Create swap widget. -widget_battery = awful.widget.watch('sh -c "printf \' \' && acpi -b 2>&1 | awk \'{ print $4 }\'"', 5) -- Create battery widget. -widget_date = awful.widget.watch('sh -c "printf \' \' && date \'+%-l:%M %p %A %B %-d\'"', 1) -- Create date widget. +widget_battery = awful.widget.watch('sh -c "printf \' \' && acpi --battery 2>&1 | awk -F, \'{ print $2 }\'"', 5) -- Create battery widget. +widget_date = awful.widget.watch('sh -c "printf \' \' && date \'+%H:%M %a %b %d\'"', 1) -- Create date widget. widget_loadaverage = awful.widget.watch('sh -c "printf \' \' && cat /proc/loadavg | awk -v OFS=\' \' \'{ print $1, $2, $3 }\'"', 5) -- Create load average widget. -widget_temperature = awful.widget.watch('sh -c "printf \' \' && sensors | awk \'/temp1:/ { print $2 }\' | head -n1"', 5) -- Create temperature widget. +widget_temperature = awful.widget.watch('sh -c "printf \' \' && sensors | awk \'/Core 0:/ { print $3 }\' | head -n1"', 5) -- Create temperature widget. widget_traffic_down = awful.widget.watch( 'sh -c "printf \' \'' .. ' && vnstat -tr 2 -i $(ip addr | awk \'/state UP/ { print $2; exit }\' | sed \'s/.$//\') | awk \'/rx/ { print $2, $3 }\'"', 5) -- Create download traffic widget. @@ -111,11 +111,11 @@ local function tooltip(widget, execute) end) end -tooltip(widget_loadaverage, 'uptime') -tooltip(widget_temperature, 'sensors | grep -v \'+0.0°C\'') -tooltip(widget_battery, 'acpi -abi 2>&1') -tooltip(widget_date, 'cal --color=never') -tooltip(widget_memory, 'free --giga -h -t') +-- tooltip(widget_loadaverage, 'uptime') +-- tooltip(widget_temperature, 'sensors | grep -v \'+0.0°C\'') +-- tooltip(widget_battery, 'acpi -abi 2>&1') +-- tooltip(widget_date, 'cal --color=never') +-- tooltip(widget_memory, 'free --giga -h -t') -- Create wibox mywibox = {} @@ -123,12 +123,7 @@ mypromptbox = {} mylayoutbox = {} mytaglist = {} -mytaglist.buttons = awful.util.table.join( - awful.button({ }, 3, awful.tag.viewtoggle), - awful.button({ }, 1, function(t) t:view_only() end), - awful.button({ modkey }, 3, function(t) if client.focus then client.focus:toggle_tag(t) end end), - awful.button({ modkey }, 1, function(t) if client.focus then client.focus:move_to_tag(t) end end) -) +mytaglist.buttons = awful.util.table.join(awful.button({}, 1, function(t) t:view_only() end)) -- Set wallpaper function. local function set_wallpaper(s) @@ -262,7 +257,7 @@ awful.rules.rules = { { rule_any = { - instance = { "copyq", }, + name = { "dropdown-terminal", }, }, properties = { floating = true } -- Floating clients. } diff --git a/.config/brittany/config.yaml b/.config/brittany/config.yaml new file mode 100644 index 0000000..b59e86a --- /dev/null +++ b/.config/brittany/config.yaml @@ -0,0 +1,49 @@ +--- +conf_disable_formatting: false +conf_debug: + dconf_roundtrip_exactprint_only: false + dconf_dump_bridoc_simpl_par: false + dconf_dump_ast_unknown: false + dconf_dump_bridoc_simpl_floating: false + dconf_dump_config: false + dconf_dump_bridoc_raw: false + dconf_dump_bridoc_final: false + dconf_dump_bridoc_simpl_alt: false + dconf_dump_bridoc_simpl_indent: false + dconf_dump_annotations: false + dconf_dump_bridoc_simpl_columns: false + dconf_dump_ast_full: false +conf_forward: + options_ghc: [] +conf_errorHandling: + econf_ExactPrintFallback: ExactPrintFallbackModeInline + econf_Werror: false + econf_omit_output_valid_check: false + econf_produceOutputOnErrors: false +conf_preprocessor: + ppconf_CPPMode: CPPModeAbort + ppconf_hackAroundIncludes: false +conf_obfuscate: false +conf_roundtrip_exactprint_only: false +conf_version: 1 +conf_layout: + lconfig_reformatModulePreamble: true + lconfig_altChooser: + tag: AltChooserBoundedSearch + contents: 3 + lconfig_allowSingleLineExportList: false + lconfig_importColumn: 50 + lconfig_hangingTypeSignature: false + lconfig_importAsColumn: 50 + lconfig_alignmentLimit: 30 + lconfig_allowHangingQuasiQuotes: true + lconfig_indentListSpecial: true + lconfig_indentAmount: 2 + lconfig_alignmentBreakOnMultiline: true + lconfig_experimentalSemicolonNewlines: false + lconfig_cols: 80 + lconfig_indentPolicy: IndentPolicyFree + lconfig_indentWhereSpecial: true + lconfig_columnAlignMode: + tag: ColumnAlignModeMajority + contents: 0.7 diff --git a/.config/chromexup/config.ini b/.config/chromexup/config.ini index bcab72b..16032cb 100644 --- a/.config/chromexup/config.ini +++ b/.config/chromexup/config.ini @@ -1,13 +1,10 @@ [main] -branding = chromium -remove_orphans = True +branding = chromium +remove_orphans = True parallel_downloads = 4 [extensions] -BlankNewTabPage = jaadjnlkjnhohljficgoddcjmndjfdmi -CSSFeatureToggles = aeinmfddnniiloadoappmdnffcbffnjg -JSONFormatter = bcjindcccaagfpapjjmafapmmgkkhgoa -JavaScriptToggle = cdcgbgnfhhdmdkallfmlachogpghifgf -KeepassBrowser = oboonakemofpalcgghocfoadofidjkkk -OldReddit = dneaehbmnbhcippjikoajpoabadpodje -uBlockOrigin = cjpalhdlnbpafiamejdnhcphjbkeiagm +BlankNewTabPage = jaadjnlkjnhohljficgoddcjmndjfdmi +JavaScriptToggle = cdcgbgnfhhdmdkallfmlachogpghifgf +NoHistory = ljamgkbcojbnmcaonjokopmcblmmpfch +uBlockOrigin = cjpalhdlnbpafiamejdnhcphjbkeiagm diff --git a/.config/chromium-flags.conf b/.config/chromium-flags.conf deleted file mode 100644 index a452c52..0000000 --- a/.config/chromium-flags.conf +++ /dev/null @@ -1,9 +0,0 @@ -# Chromium Flags ---disk-cache-dir=/dev/null ---disable-smooth-scrolling ---disable-sync-preferences ---disable-gpu-compositing ---enable-native-gpu-memory-buffers ---process-per-site -#--incognito -#--proxy-server="socks5://localhost:2871" diff --git a/.config/copyq/copyq-dark.conf b/.config/copyq/copyq-dark.conf deleted file mode 100644 index 36380e1..0000000 --- a/.config/copyq/copyq-dark.conf +++ /dev/null @@ -1,201 +0,0 @@ -[General] -plugin_priority=itemimage, itemencrypted, itemfakevim, itemnotes, itemsync, itemtext, itemtags, itempinned, itemweb - -[Options] -action_has_input=false -action_has_output=false -action_output_tab= -action_separator=\\n -activate_closes=true -activate_focuses=true -activate_pastes=false -always_on_top=false -autocompletion=true -autostart=false -check_clipboard=true -check_selection=true -clipboard_notification_lines=0 -clipboard_tab=&clipboard -close_on_unfocus=false -command_history_size=100 -confirm_exit=true -copy_clipboard=false -copy_selection=false -disable_tray=true -edit_ctrl_return=true -editor=geany %1 -expire_tab=0 -filter_history= -hide_main_window=true -hide_main_window_in_task_bar=false -hide_tabs=false -hide_toolbar=true -hide_toolbar_labels=true -item_popup_interval=0 -language=en -max_process_manager_rows=1000 -maxitems=10000 -move=true -notification_horizontal_offset=10 -notification_maximum_height=100 -notification_maximum_width=300 -notification_position=3 -notification_vertical_offset=10 -number_search=false -open_windows_on_current_screen=false -run_selection=false -save_filter_history=false -show_advanced_command_settings=false -show_simple_items=false -show_tab_item_count=true -tab_tree=true -tabs=&clipboard, &saved, imported -text_wrap=true -transparency=0 -transparency_focused=0 -tray_commands=false -tray_images=false -tray_item_paste=false -tray_items=0 -tray_tab= -tray_tab_is_current=false -vi=true - -[Plugins] -itemdata\enabled=true -itemencrypted\enabled=true -itemencrypted\encrypt_tabs= -itemfakevim\enabled=true -itemfakevim\really_enable=false -itemfakevim\source_file= -itemimage\enabled=true -itemimage\image_editor= -itemimage\max_image_height=240 -itemimage\max_image_width=320 -itemimage\svg_editor= -itemnotes\enabled=true -itempinned\enabled=true -itemsync\enabled=true -itemtags\enabled=true -itemtags\tags=@Invalid() -itemtext\enabled=true -itemtext\max_height=0 -itemtext\max_lines=0 -itemtext\use_rich_text=false -itemweb\enabled=true -itemweb\max_height=0 - -[Shortcuts] -about=shift+f1 -action=F5 -change_tab_icon=ctrl+shift+t -commands=f6 -copy_selected_items=ctrl+c -delete_item=del -edit=f2 -edit_notes=shift+f2 -editor=ctrl+e -exit=ctrl+q -export=ctrl+s -export_tab=Ctrl+S -find_items=ctrl+g -format-next=ctrl+right -format-previous=ctrl+left -help=f1 -import=ctrl+i -import_tab=Ctrl+I -item-menu=shift+f10 -move_down=ctrl+down -move_to_bottom=ctrl+end -move_to_clipboard= -move_to_top=ctrl+home -move_up=ctrl+up -new=ctrl+n -new_tab=ctrl+t -next_tab=right -next_to_clipboard=Ctrl+Shift+N -paste_selected_items=ctrl+v -preferences=ctrl+p -previous_tab=left -previous_to_clipboard=Ctrl+Shift+P -process_manager=ctrl+shift+z -remove_tab=ctrl+w -rename_tab=ctrl+f2 -reverse_selected_items=ctrl+shift+r -show-log=f12 -show_clipboard_content=ctrl+shift+c -show_item_content=f4 -show_item_preview=f7 -sort_selected_items=ctrl+shift+s -system-run=f5 -toggle_clipboard_storing=ctrl+shift+x - -[Tabs] -1\icon= -1\max_item_count=0 -1\name=&clipboard -1\store_items=true -2\icon= -2\max_item_count=0 -2\name=&saved -2\store_items=true -3\icon= -3\max_item_count=0 -3\name=imported -3\store_items=true -size=3 - -[Theme] -alt_bg=#2e3436 -alt_item_css= -bg=#242424 -css= -cur_item_css="\n ;border: 0.1em solid ${sel_bg}" -edit_bg=#2e3436 -edit_fg=#fdfdfd -edit_font= -fg=#fdfdfd -find_bg=#ff0 -find_fg=#000000 -find_font= -font= -font_antialiasing=true -item_css= -item_spacing= -menu_bar_css="\n ;background: ${bg}\n ;color: ${fg}" -menu_bar_disabled_css="\n ;color: ${bg - #666}" -menu_bar_selected_css="\n ;background: ${sel_bg}\n ;color: ${sel_fg}" -menu_css="\n ;border-top: 0.08em solid ${bg + #333}\n ;border-left: 0.08em solid ${bg + #333}\n ;border-bottom: 0.08em solid ${bg - #333}\n ;border-right: 0.08em solid ${bg - #333}" -notes_bg=#000000 -notes_css= -notes_fg=#ffffff -notes_font= -notification_bg=#333 -notification_fg=#ddd -notification_font= -num_fg=#909090 -num_font= -search_bar="\n ;background: ${edit_bg}\n ;color: ${edit_fg}\n ;border: 1px solid ${alt_bg}\n ;margin: 2px" -search_bar_focused="\n ;border: 1px solid ${sel_bg}" -sel_bg=#204a87 -sel_fg=#ffffff -sel_item_css= -show_number=true -show_scrollbars=true -style_main_window=false -tab_bar_css="\n ;background: ${bg - #222}" -tab_bar_item_counter="\n ;color: ${fg - #044 + #400}\n ;font-size: 6pt" -tab_bar_scroll_buttons_css="\n ;background: ${bg - #222}\n ;color: ${fg}\n ;border: 0" -tab_bar_sel_item_counter="\n ;color: ${sel_bg - #044 + #400}" -tab_bar_tab_selected_css="\n ;padding: 0.5em\n ;background: ${bg}\n ;border: 0.05em solid ${bg}\n ;color: ${fg}" -tab_bar_tab_unselected_css="\n ;border: 0.05em solid ${bg}\n ;padding: 0.5em\n ;background: ${bg - #222}\n ;color: ${fg - #333}" -tab_tree_css="\n ;color: ${fg}\n ;background-color: ${bg}" -tab_tree_item_counter="\n ;color: ${fg - #044 + #400}\n ;font-size: 6pt" -tab_tree_item_css=padding:2px -tab_tree_sel_item_counter="\n ;color: ${sel_fg - #044 + #400}" -tab_tree_sel_item_css="\n ;color: ${sel_fg}\n ;background-color: ${sel_bg}" -tool_bar_css="\n ;color: ${fg}\n ;background-color: ${bg}\n ;border: 0" -tool_button_css="\n ;background-color: transparent" -tool_button_pressed_css="\n ;background: ${sel_bg}" -tool_button_selected_css="\n ;background: ${sel_bg}\n ;color: ${sel_fg}" -use_system_icons=false diff --git a/.config/copyq/copyq.conf b/.config/copyq/copyq.conf deleted file mode 100644 index e5745e0..0000000 --- a/.config/copyq/copyq.conf +++ /dev/null @@ -1,201 +0,0 @@ -[General] -plugin_priority=itemimage, itemencrypted, itemfakevim, itemnotes, itemsync, itemtext, itemtags, itempinned, itemweb - -[Options] -action_has_input=false -action_has_output=false -action_output_tab= -action_separator=\\n -activate_closes=true -activate_focuses=true -activate_pastes=false -always_on_top=false -autocompletion=true -autostart=false -check_clipboard=true -check_selection=false -clipboard_notification_lines=0 -clipboard_tab=&clipboard -close_on_unfocus=false -command_history_size=100 -confirm_exit=true -copy_clipboard=false -copy_selection=false -disable_tray=true -edit_ctrl_return=true -editor=gvim %1 -expire_tab=0 -filter_history= -hide_main_window=true -hide_main_window_in_task_bar=false -hide_tabs=false -hide_toolbar=true -hide_toolbar_labels=true -item_popup_interval=0 -language=en -max_process_manager_rows=1000 -maxitems=10000 -move=true -notification_horizontal_offset=10 -notification_maximum_height=100 -notification_maximum_width=300 -notification_position=3 -notification_vertical_offset=10 -number_search=false -open_windows_on_current_screen=false -run_selection=true -save_filter_history=false -show_advanced_command_settings=false -show_simple_items=false -show_tab_item_count=true -tab_tree=true -tabs=&clipboard, &saved, imported -text_wrap=true -transparency=0 -transparency_focused=0 -tray_commands=false -tray_images=false -tray_item_paste=false -tray_items=0 -tray_tab= -tray_tab_is_current=false -vi=true - -[Plugins] -itemdata\enabled=true -itemencrypted\enabled=true -itemencrypted\encrypt_tabs= -itemfakevim\enabled=true -itemfakevim\really_enable=false -itemfakevim\source_file= -itemimage\enabled=true -itemimage\image_editor= -itemimage\max_image_height=240 -itemimage\max_image_width=320 -itemimage\svg_editor= -itemnotes\enabled=true -itempinned\enabled=true -itemsync\enabled=true -itemtags\enabled=true -itemtags\tags=@Invalid() -itemtext\enabled=true -itemtext\max_height=0 -itemtext\max_lines=0 -itemtext\use_rich_text=false -itemweb\enabled=true -itemweb\max_height=0 - -[Shortcuts] -about=shift+f1 -action=F5 -change_tab_icon=ctrl+shift+t -commands=f6 -copy_selected_items=ctrl+c -delete_item=del -edit=f2 -edit_notes=shift+f2 -editor=ctrl+e -exit=ctrl+q -export=ctrl+s -export_tab=Ctrl+S -find_items=ctrl+g -format-next=ctrl+right -format-previous=ctrl+left -help=f1 -import=ctrl+i -import_tab=Ctrl+I -item-menu=shift+f10 -move_down=ctrl+down -move_to_bottom=ctrl+end -move_to_clipboard= -move_to_top=ctrl+home -move_up=ctrl+up -new=ctrl+n -new_tab=ctrl+t -next_tab=right -next_to_clipboard=Ctrl+Shift+N -paste_selected_items=ctrl+v -preferences=ctrl+p -previous_tab=left -previous_to_clipboard=Ctrl+Shift+P -process_manager=ctrl+shift+z -remove_tab=ctrl+w -rename_tab=ctrl+f2 -reverse_selected_items=ctrl+shift+r -show-log=f12 -show_clipboard_content=ctrl+shift+c -show_item_content=f4 -show_item_preview=f7 -sort_selected_items=ctrl+shift+s -system-run=f5 -toggle_clipboard_storing=ctrl+shift+x - -[Tabs] -1\icon= -1\max_item_count=0 -1\name=imported -1\store_items=true -2\icon= -2\max_item_count=0 -2\name=&saved -2\store_items=true -3\icon= -3\max_item_count=0 -3\name=&clipboard -3\store_items=true -size=3 - -[Theme] -alt_bg=#f3f3f3 -alt_item_css= -bg=#fdfdfd -css= -cur_item_css="\n ;border: 0.1em solid ${sel_bg}" -edit_bg=#fdfdfd -edit_fg=#242424 -edit_font= -fg=#242424 -find_bg=#ff0 -find_fg=#000 -find_font= -font= -font_antialiasing=true -item_css= -item_spacing= -menu_bar_css="\n ;background: ${bg}\n ;color: ${fg}" -menu_bar_disabled_css="\n ;color: ${bg - #666}" -menu_bar_selected_css="\n ;background: ${sel_bg}\n ;color: ${sel_fg}" -menu_css="\n ;border-top: 0.08em solid ${bg + #333}\n ;border-left: 0.08em solid ${bg + #333}\n ;border-bottom: 0.08em solid ${bg - #333}\n ;border-right: 0.08em solid ${bg - #333}" -notes_bg=#ffffdc -notes_css= -notes_fg=#000000 -notes_font= -notification_bg=#333 -notification_fg=#ddd -notification_font= -num_fg=#909090 -num_font= -search_bar="\n ;background: ${edit_bg}\n ;color: ${edit_fg}\n ;border: 1px solid ${alt_bg}\n ;margin: 2px" -search_bar_focused="\n ;border: 1px solid ${sel_bg}" -sel_bg=#729fcf -sel_fg=#000000 -sel_item_css= -show_number=true -show_scrollbars=true -style_main_window=false -tab_bar_css="\n ;background: ${bg - #222}" -tab_bar_item_counter="\n ;color: ${fg - #044 + #400}\n ;font-size: 6pt" -tab_bar_scroll_buttons_css="\n ;background: ${bg - #222}\n ;color: ${fg}\n ;border: 0" -tab_bar_sel_item_counter="\n ;color: ${sel_bg - #044 + #400}" -tab_bar_tab_selected_css="\n ;padding: 0.5em\n ;background: ${bg}\n ;border: 0.05em solid ${bg}\n ;color: ${fg}" -tab_bar_tab_unselected_css="\n ;border: 0.05em solid ${bg}\n ;padding: 0.5em\n ;background: ${bg - #222}\n ;color: ${fg - #333}" -tab_tree_css="\n ;color: ${fg}\n ;background-color: ${bg}" -tab_tree_item_counter="\n ;color: ${fg - #044 + #400}\n ;font-size: 6pt" -tab_tree_item_css=padding:2px -tab_tree_sel_item_counter="\n ;color: ${sel_fg - #044 + #400}" -tab_tree_sel_item_css="\n ;color: ${sel_fg}\n ;background-color: ${sel_bg}" -tool_bar_css="\n ;color: ${fg}\n ;background-color: ${bg}\n ;border: 0" -tool_button_css="\n ;background-color: transparent" -tool_button_pressed_css="\n ;background: ${sel_bg}" -tool_button_selected_css="\n ;background: ${sel_bg}\n ;color: ${sel_fg}" -use_system_icons=false diff --git a/.config/dunst/dunstrc b/.config/dunst/dunstrc new file mode 100644 index 0000000..614c0b8 --- /dev/null +++ b/.config/dunst/dunstrc @@ -0,0 +1,50 @@ +[global] + font = Sans 8 + markup = full + format = "<b>%s</b>\n%b" + alignment = left + bounce_freq = 0 + follow = mouse + frame_color = "#000000" + frame_width = 3 + geometry = "250x5-5+35" + history_length = 20 + horizontal_padding = 8 + icon_position = off + idle_threshold = 120 + ignore_newline = no + indicate_hidden = yes + line_height = 0 + monitor = 0 + padding = 8 + separator_color = frame + separator_height = 2 + show_age_threshold = 60 + show_indicators = yes + shrink = yes + sort = yes + startup_notification = false + sticky_history = yes + transparency = 0 + word_wrap = yes + +[shortcuts] + close = ctrl+space + close_all = ctrl+shift+space + history = ctrl+grave + context = ctrl+shift+period + +[urgency_low] + background = "#000000" + foreground = "#ffffff" + timeout = 3 + +[urgency_normal] + background = "#000000" + foreground = "#ffffff" + timeout = 5 + +[urgency_critical] + background = "#FF0000" + foreground = "#000000" + timeout = 0 diff --git a/.config/emacs/init.el b/.config/emacs/init.el index 775253a..eb468ec 100644 --- a/.config/emacs/init.el +++ b/.config/emacs/init.el @@ -1,34 +1,32 @@ (custom-set-variables - '(package-selected-packages (quote (evil))) - '(tool-bar-mode nil) - ;; set slime history file location - '(slime-repl-history-file "~/.cache/slime-history.eld")) + '(package-selected-packages '(slime smex evil)) + '(slime-repl-history-file "~/.cache/slime-history.eld")) ; Set slime history file location. (custom-set-faces '(region ((t (:background "color-238"))))) -;; disable startup screen -(setq inhibit-startup-screen t) +(setq inhibit-startup-screen t) ; Disable startup screen. +(setq-default indent-tabs-mode nil) ; Use spaces for indentation. +(setq inferior-lisp-program "sbcl") ; Enable slime. +(setq-default mode-line-format nil) ; Remove status line. -;; disable menu bar -(menu-bar-mode -1) +(menu-bar-mode -1) ; Disable menu bar. +(tool-bar-mode -1) ; Disable tool bar. +(tooltip-mode -1) ; Disable tool tips. +(scroll-bar-mode -1) ; Disable scroll bar. +(set-fringe-mode 10) ; Create space. +(ido-mode t) ; Enable file search interactive mode C-x C-f. -;; use spaces for indentation -(setq-default indent-tabs-mode nil) +(setq backup-directory-alist + '(("." . "~/.config/emacs/backups"))) -;; set up package.el to work with melpa -(require 'package) +(require 'package) ; Set up package.el to work with melpa. (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/")) (package-initialize) +(unless package-archive-contents (package-refresh-contents)) +(package-install-selected-packages) -;; enable slime -(setq inferior-lisp-program "sbcl") -(unless (package-installed-p 'slime) - (package-install 'slime)) - -;; enable evil -(unless (package-installed-p 'evil) - (package-install 'evil)) -(require 'evil) -(evil-mode 1) +(global-set-key (kbd "M-x") 'smex) ; Enable smex interactive M-x. +(global-set-key (kbd "M-X") 'smex-major-mode-commands) +(global-set-key (kbd "C-c C-c M-x") 'execute-extended-command) ; Native M-x binding. diff --git a/.config/eslintrc.yml b/.config/eslint/config.yaml index 7dc8a5d..a030580 100644 --- a/.config/eslintrc.yml +++ b/.config/eslint/config.yaml @@ -1,8 +1,9 @@ +--- env: browser: true commonjs: true es6: true -extends: 'eslint:recommended' +extends: eslint:recommended globals: Atomics: readonly SharedArrayBuffer: readonly diff --git a/.config/fzf/completion.bash b/.config/fzf/completion.bash new file mode 100644 index 0000000..21aa450 --- /dev/null +++ b/.config/fzf/completion.bash @@ -0,0 +1,381 @@ +# ____ ____ +# / __/___ / __/ +# / /_/_ / / /_ +# / __/ / /_/ __/ +# /_/ /___/_/ completion.bash +# +# - $FZF_TMUX (default: 0) +# - $FZF_TMUX_OPTS (default: empty) +# - $FZF_COMPLETION_TRIGGER (default: '**') +# - $FZF_COMPLETION_OPTS (default: empty) + +if [[ $- =~ i ]]; then + +# To use custom commands instead of find, override _fzf_compgen_{path,dir} +if ! declare -f _fzf_compgen_path > /dev/null; then + _fzf_compgen_path() { + echo "$1" + command find -L "$1" \ + -name .git -prune -o -name .hg -prune -o -name .svn -prune -o \( -type d -o -type f -o -type l \) \ + -a -not -path "$1" -print 2> /dev/null | sed 's@^\./@@' + } +fi + +if ! declare -f _fzf_compgen_dir > /dev/null; then + _fzf_compgen_dir() { + command find -L "$1" \ + -name .git -prune -o -name .hg -prune -o -name .svn -prune -o -type d \ + -a -not -path "$1" -print 2> /dev/null | sed 's@^\./@@' + } +fi + +########################################################### + +# To redraw line after fzf closes (printf '\e[5n') +bind '"\e[0n": redraw-current-line' 2> /dev/null + +__fzf_comprun() { + if [[ "$(type -t _fzf_comprun 2>&1)" = function ]]; then + _fzf_comprun "$@" + elif [[ -n "$TMUX_PANE" ]] && { [[ "${FZF_TMUX:-0}" != 0 ]] || [[ -n "$FZF_TMUX_OPTS" ]]; }; then + shift + fzf-tmux ${FZF_TMUX_OPTS:--d${FZF_TMUX_HEIGHT:-40%}} -- "$@" + else + shift + fzf "$@" + fi +} + +__fzf_orig_completion() { + local l comp f cmd + while read -r l; do + if [[ "$l" =~ ^(.*\ -F)\ *([^ ]*).*\ ([^ ]*)$ ]]; then + comp="${BASH_REMATCH[1]}" + f="${BASH_REMATCH[2]}" + cmd="${BASH_REMATCH[3]}" + [[ "$f" = _fzf_* ]] && continue + printf -v "_fzf_orig_completion_${cmd//[^A-Za-z0-9_]/_}" "%s" "${comp} %s ${cmd} #${f}" + if [[ "$l" = *" -o nospace "* ]] && [[ ! "$__fzf_nospace_commands" = *" $cmd "* ]]; then + __fzf_nospace_commands="$__fzf_nospace_commands $cmd " + fi + fi + done +} + +_fzf_opts_completion() { + local cur prev opts + COMPREPLY=() + cur="${COMP_WORDS[COMP_CWORD]}" + prev="${COMP_WORDS[COMP_CWORD-1]}" + opts=" + -x --extended + -e --exact + --algo + -i +i + -n --nth + --with-nth + -d --delimiter + +s --no-sort + --tac + --tiebreak + -m --multi + --no-mouse + --bind + --cycle + --no-hscroll + --jump-labels + --height + --literal + --reverse + --margin + --inline-info + --prompt + --pointer + --marker + --header + --header-lines + --ansi + --tabstop + --color + --no-bold + --history + --history-size + --preview + --preview-window + -q --query + -1 --select-1 + -0 --exit-0 + -f --filter + --print-query + --expect + --sync" + + case "${prev}" in + --tiebreak) + COMPREPLY=( $(compgen -W "length begin end index" -- "$cur") ) + return 0 + ;; + --color) + COMPREPLY=( $(compgen -W "dark light 16 bw" -- "$cur") ) + return 0 + ;; + --history) + COMPREPLY=() + return 0 + ;; + esac + + if [[ "$cur" =~ ^-|\+ ]]; then + COMPREPLY=( $(compgen -W "${opts}" -- "$cur") ) + return 0 + fi + + return 0 +} + +_fzf_handle_dynamic_completion() { + local cmd orig_var orig ret orig_cmd orig_complete + cmd="$1" + shift + orig_cmd="$1" + orig_var="_fzf_orig_completion_$cmd" + orig="${!orig_var##*#}" + if [[ -n "$orig" ]] && type "$orig" > /dev/null 2>&1; then + $orig "$@" + elif [[ -n "$_fzf_completion_loader" ]]; then + orig_complete=$(complete -p "$orig_cmd" 2> /dev/null) + _completion_loader "$@" + ret=$? + # _completion_loader may not have updated completion for the command + if [[ "$(complete -p "$orig_cmd" 2> /dev/null)" != "$orig_complete" ]]; then + __fzf_orig_completion < <(complete -p "$orig_cmd" 2> /dev/null) + if [[ "$__fzf_nospace_commands" = *" $orig_cmd "* ]]; then + eval "${orig_complete/ -F / -o nospace -F }" + else + eval "$orig_complete" + fi + fi + return $ret + fi +} + +__fzf_generic_path_completion() { + local cur base dir leftover matches trigger cmd + cmd="${COMP_WORDS[0]//[^A-Za-z0-9_=]/_}" + COMPREPLY=() + trigger=${FZF_COMPLETION_TRIGGER-'**'} + cur="${COMP_WORDS[COMP_CWORD]}" + if [[ "$cur" == *"$trigger" ]]; then + base=${cur:0:${#cur}-${#trigger}} + eval "base=$base" + + [[ $base = *"/"* ]] && dir="$base" + while true; do + if [[ -z "$dir" ]] || [[ -d "$dir" ]]; then + leftover=${base/#"$dir"} + leftover=${leftover/#\/} + [[ -z "$dir" ]] && dir='.' + [[ "$dir" != "/" ]] && dir="${dir/%\//}" + matches=$(eval "$1 $(printf %q "$dir")" | FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} --reverse --bind=ctrl-z:ignore $FZF_DEFAULT_OPTS $FZF_COMPLETION_OPTS $2" __fzf_comprun "$4" -q "$leftover" | while read -r item; do + printf "%q$3 " "$item" + done) + matches=${matches% } + [[ -z "$3" ]] && [[ "$__fzf_nospace_commands" = *" ${COMP_WORDS[0]} "* ]] && matches="$matches " + if [[ -n "$matches" ]]; then + COMPREPLY=( "$matches" ) + else + COMPREPLY=( "$cur" ) + fi + printf '\e[5n' + return 0 + fi + dir=$(dirname "$dir") + [[ "$dir" =~ /$ ]] || dir="$dir"/ + done + else + shift + shift + shift + _fzf_handle_dynamic_completion "$cmd" "$@" + fi +} + +_fzf_complete() { + # Split arguments around -- + local args rest str_arg i sep + args=("$@") + sep= + for i in "${!args[@]}"; do + if [[ "${args[$i]}" = -- ]]; then + sep=$i + break + fi + done + if [[ -n "$sep" ]]; then + str_arg= + rest=("${args[@]:$((sep + 1)):${#args[@]}}") + args=("${args[@]:0:$sep}") + else + str_arg=$1 + args=() + shift + rest=("$@") + fi + + local cur selected trigger cmd post + post="$(caller 0 | awk '{print $2}')_post" + type -t "$post" > /dev/null 2>&1 || post=cat + + cmd="${COMP_WORDS[0]//[^A-Za-z0-9_=]/_}" + trigger=${FZF_COMPLETION_TRIGGER-'**'} + cur="${COMP_WORDS[COMP_CWORD]}" + if [[ "$cur" == *"$trigger" ]]; then + cur=${cur:0:${#cur}-${#trigger}} + + selected=$(FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} --reverse --bind=ctrl-z:ignore $FZF_DEFAULT_OPTS $FZF_COMPLETION_OPTS $str_arg" __fzf_comprun "${rest[0]}" "${args[@]}" -q "$cur" | $post | tr '\n' ' ') + selected=${selected% } # Strip trailing space not to repeat "-o nospace" + if [[ -n "$selected" ]]; then + COMPREPLY=("$selected") + else + COMPREPLY=("$cur") + fi + printf '\e[5n' + return 0 + else + _fzf_handle_dynamic_completion "$cmd" "${rest[@]}" + fi +} + +_fzf_path_completion() { + __fzf_generic_path_completion _fzf_compgen_path "-m" "" "$@" +} + +# Deprecated. No file only completion. +_fzf_file_completion() { + _fzf_path_completion "$@" +} + +_fzf_dir_completion() { + __fzf_generic_path_completion _fzf_compgen_dir "" "/" "$@" +} + +_fzf_complete_kill() { + local trigger=${FZF_COMPLETION_TRIGGER-'**'} + local cur="${COMP_WORDS[COMP_CWORD]}" + if [[ -z "$cur" ]]; then + COMP_WORDS[$COMP_CWORD]=$trigger + elif [[ "$cur" != *"$trigger" ]]; then + return 1 + fi + + _fzf_proc_completion "$@" +} + +_fzf_proc_completion() { + _fzf_complete -m --preview 'echo {}' --preview-window down:3:wrap --min-height 15 -- "$@" < <( + command ps -ef | sed 1d + ) +} + +_fzf_proc_completion_post() { + awk '{print $2}' +} + +_fzf_host_completion() { + _fzf_complete +m -- "$@" < <( + command cat <(command tail -n +1 ~/.ssh/config ~/.ssh/config.d/* /etc/ssh/ssh_config 2> /dev/null | command grep -i '^\s*host\(name\)\? ' | awk '{for (i = 2; i <= NF; i++) print $1 " " $i}' | command grep -v '[*?]') \ + <(command grep -oE '^[[a-z0-9.,:-]+' ~/.ssh/known_hosts | tr ',' '\n' | tr -d '[' | awk '{ print $1 " " $1 }') \ + <(command grep -v '^\s*\(#\|$\)' /etc/hosts | command grep -Fv '0.0.0.0') | + awk '{if (length($2) > 0) {print $2}}' | sort -u + ) +} + +_fzf_var_completion() { + _fzf_complete -m -- "$@" < <( + declare -xp | sed 's/=.*//' | sed 's/.* //' + ) +} + +_fzf_alias_completion() { + _fzf_complete -m -- "$@" < <( + alias | sed 's/=.*//' | sed 's/.* //' + ) +} + +# fzf options +complete -o default -F _fzf_opts_completion fzf + +d_cmds="${FZF_COMPLETION_DIR_COMMANDS:-cd pushd rmdir}" +a_cmds=" + awk cat diff diff3 + emacs emacsclient ex file ftp g++ gcc gvim head hg java + javac ld less more mvim nvim patch perl python ruby + sed sftp sort source tail tee uniq vi view vim wc xdg-open + basename bunzip2 bzip2 chmod chown curl cp dirname du + find git grep gunzip gzip hg jar + ln ls mv open rm rsync scp + svn tar unzip zip" + +# Preserve existing completion +__fzf_orig_completion < <(complete -p $d_cmds $a_cmds 2> /dev/null) + +if type _completion_loader > /dev/null 2>&1; then + _fzf_completion_loader=1 +fi + +__fzf_defc() { + local cmd func opts orig_var orig def + cmd="$1" + func="$2" + opts="$3" + orig_var="_fzf_orig_completion_${cmd//[^A-Za-z0-9_]/_}" + orig="${!orig_var}" + if [[ -n "$orig" ]]; then + printf -v def "$orig" "$func" + eval "$def" + else + complete -F "$func" $opts "$cmd" + fi +} + +# Anything +for cmd in $a_cmds; do + __fzf_defc "$cmd" _fzf_path_completion "-o default -o bashdefault" +done + +# Directory +for cmd in $d_cmds; do + __fzf_defc "$cmd" _fzf_dir_completion "-o nospace -o dirnames" +done + +# Kill completion (supports empty completion trigger) +complete -F _fzf_complete_kill -o default -o bashdefault kill + +unset cmd d_cmds a_cmds + +_fzf_setup_completion() { + local kind fn cmd + kind=$1 + fn=_fzf_${1}_completion + if [[ $# -lt 2 ]] || ! type -t "$fn" > /dev/null; then + echo "usage: ${FUNCNAME[0]} path|dir|var|alias|host|proc COMMANDS..." + return 1 + fi + shift + __fzf_orig_completion < <(complete -p "$@" 2> /dev/null) + for cmd in "$@"; do + case "$kind" in + dir) __fzf_defc "$cmd" "$fn" "-o nospace -o dirnames" ;; + var) __fzf_defc "$cmd" "$fn" "-o default -o nospace -v" ;; + alias) __fzf_defc "$cmd" "$fn" "-a" ;; + *) __fzf_defc "$cmd" "$fn" "-o default -o bashdefault" ;; + esac + done +} + +# Environment variables / Aliases / Hosts +_fzf_setup_completion 'var' export unset +_fzf_setup_completion 'alias' unalias +_fzf_setup_completion 'host' ssh telnet + +fi diff --git a/.config/fzf/key-bindings.bash b/.config/fzf/key-bindings.bash new file mode 100644 index 0000000..d2da0be --- /dev/null +++ b/.config/fzf/key-bindings.bash @@ -0,0 +1,95 @@ +# ____ ____ +# / __/___ / __/ +# / /_/_ / / /_ +# / __/ / /_/ __/ +# /_/ /___/_/ key-bindings.bash +# +# - $FZF_TMUX_OPTS +# - $FZF_CTRL_T_COMMAND +# - $FZF_CTRL_T_OPTS +# - $FZF_CTRL_R_OPTS +# - $FZF_ALT_C_COMMAND +# - $FZF_ALT_C_OPTS + +# Key bindings +# ------------ +__fzf_select__() { + local cmd="${FZF_CTRL_T_COMMAND:-"command find -L . -mindepth 1 \\( -path '*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' -o -fstype 'proc' \\) -prune \ + -o -type f -print \ + -o -type d -print \ + -o -type l -print 2> /dev/null | cut -b3-"}" + eval "$cmd" | FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} --reverse --bind=ctrl-z:ignore $FZF_DEFAULT_OPTS $FZF_CTRL_T_OPTS" $(__fzfcmd) -m "$@" | while read -r item; do + printf '%q ' "$item" + done + echo +} + +if [[ $- =~ i ]]; then + +__fzfcmd() { + [[ -n "$TMUX_PANE" ]] && { [[ "${FZF_TMUX:-0}" != 0 ]] || [[ -n "$FZF_TMUX_OPTS" ]]; } && + echo "fzf-tmux ${FZF_TMUX_OPTS:--d${FZF_TMUX_HEIGHT:-40%}} -- " || echo "fzf" +} + +fzf-file-widget() { + local selected="$(__fzf_select__)" + READLINE_LINE="${READLINE_LINE:0:$READLINE_POINT}$selected${READLINE_LINE:$READLINE_POINT}" + READLINE_POINT=$(( READLINE_POINT + ${#selected} )) +} + +__fzf_cd__() { + local cmd dir + cmd="${FZF_ALT_C_COMMAND:-"command find -L . -mindepth 1 \\( -path '*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' -o -fstype 'proc' \\) -prune \ + -o -type d -print 2> /dev/null | cut -b3-"}" + dir=$(eval "$cmd" | FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} --reverse --bind=ctrl-z:ignore $FZF_DEFAULT_OPTS $FZF_ALT_C_OPTS" $(__fzfcmd) +m) && printf 'cd -- %q' "$dir" +} + +__fzf_history__() { + local output + output=$( + cat $HISTFILEPERSIST | + FZF_DEFAULT_OPTS="--reverse --height ${FZF_TMUX_HEIGHT:-40%} $FZF_DEFAULT_OPTS -n2..,.. --tiebreak=index --bind=ctrl-r:toggle-sort,ctrl-z:ignore $FZF_CTRL_R_OPTS +m --prompt '* ~ > '" $(__fzfcmd) --query "$READLINE_LINE" + ) || return + READLINE_LINE=${output#*$'\t'} + if [[ -z "$READLINE_POINT" ]]; then + echo "$READLINE_LINE" + else + READLINE_POINT=0x7fffffff + fi +} + +# Required to refresh the prompt after fzf +bind -m emacs-standard '"\er": redraw-current-line' + +bind -m vi-command '"\C-z": emacs-editing-mode' +bind -m vi-insert '"\C-z": emacs-editing-mode' +bind -m emacs-standard '"\C-z": vi-editing-mode' + +if (( BASH_VERSINFO[0] < 4 )); then + # CTRL-T - Paste the selected file path into the command line + bind -m emacs-standard '"\C-t": " \C-b\C-k \C-u`__fzf_select__`\e\C-e\er\C-a\C-y\C-h\C-e\e \C-y\ey\C-x\C-x\C-f"' + bind -m vi-command '"\C-t": "\C-z\C-t\C-z"' + bind -m vi-insert '"\C-t": "\C-z\C-t\C-z"' + + # CTRL-R - Paste the selected command from history into the command line + bind -m emacs-standard '"\C-r": "\C-e \C-u\C-y\ey\C-u"$(__fzf_history__)"\e\C-e\er"' + bind -m vi-command '"\C-r": "\C-z\C-r\C-z"' + bind -m vi-insert '"\C-r": "\C-z\C-r\C-z"' +else + # CTRL-T - Paste the selected file path into the command line + bind -m emacs-standard -x '"\C-t": fzf-file-widget' + bind -m vi-command -x '"\C-t": fzf-file-widget' + bind -m vi-insert -x '"\C-t": fzf-file-widget' + + # CTRL-R - Paste the selected command from history into the command line + bind -m emacs-standard -x '"\C-r": __fzf_history__' + bind -m vi-command -x '"\C-r": __fzf_history__' + bind -m vi-insert -x '"\C-r": __fzf_history__' +fi + +# ALT-C - cd into the selected directory +bind -m emacs-standard '"\ec": " \C-b\C-k \C-u`__fzf_cd__`\e\C-e\er\C-m\C-y\C-h\e \C-y\ey\C-x\C-x\C-d"' +bind -m vi-command '"\ec": "\C-z\ec\C-z"' +bind -m vi-insert '"\ec": "\C-z\ec\C-z"' + +fi diff --git a/.config/git/config b/.config/git/config index fa790b3..cdc1251 100644 --- a/.config/git/config +++ b/.config/git/config @@ -1,10 +1,25 @@ [user] name = tdro - email = tdro@users.noreply.github.com + email = tdro@noreply.example.com + [push] default = simple + [color] ui = auto + [core] editor = vim excludesfile = ~/.config/git/ignore + +[init] + defaultBranch = master + +[alias] + ignored = !git ls-files -v | grep '^h' + +[diff] + algorithm = patience + +[commit] + verbose = true diff --git a/.config/latexindent/settings.yaml b/.config/latexindent/settings.yaml new file mode 100644 index 0000000..7eafd4c --- /dev/null +++ b/.config/latexindent/settings.yaml @@ -0,0 +1,30 @@ +--- +# Default: https://raw.githubusercontent.com/cmhughes/latexindent.pl/main/defaultSettings.yaml +onlyOneBackUp: 1 +backupExtension: .backup.tex + +modifyLineBreaks: + preserveBlankLines: 1 + condenseMultipleBlankLinesInto: 1 + oneSentencePerLine: + manipulateSentences: 0 + textWrapSentences: 1 + textWrapOptions: + all: 1 + columns: 80 + perCodeBlockBasis: 1 + +verbatimEnvironments: + pre: 1 + filecontents*: 1 + +noAdditionalIndentGlobal: + filecontents: 1 + +logFilePreferences: + endLogFileWith: '--------------' + showAmalgamatedSettings: 0 + showDecorationFinishCodeBlockTrace: 0 + showDecorationStartCodeBlockTrace: 0 + showEveryYamlRead: 0 + showGitHubInfoFooter: 0 diff --git a/.config/libvirt/libvirt.conf b/.config/libvirt/libvirt.conf new file mode 100644 index 0000000..deb583b --- /dev/null +++ b/.config/libvirt/libvirt.conf @@ -0,0 +1 @@ +uri_default = "qemu:///system" diff --git a/.config/lxc/builds/almalinux8.dockerfile b/.config/lxc/builds/almalinux8.dockerfile new file mode 100644 index 0000000..4b2532b --- /dev/null +++ b/.config/lxc/builds/almalinux8.dockerfile @@ -0,0 +1,22 @@ +FROM docker.io/library/almalinux:8.5-20220306@sha256:cd49d7250ed7bb194d502d8a3e50bd775055ca275d1d9c2785aea72b890afe6a + +RUN dnf install --assumeyes --setopt=install_weak_deps=False epel-release \ + && dnf --assumeyes update + +RUN dnf install --assumeyes --setopt=install_weak_deps=False \ + openssh-server dhcp-client xauth vim htop + +RUN systemctl enable sshd + +RUN curl --silent https://raw.githubusercontent.com/dylanaraps/neofetch/ccd5d9f52609bbdcd5d8fa78c4fdb0f12954125f/neofetch \ + --output /usr/bin/neofetch && chmod +x /usr/bin/neofetch + +RUN printf 'neofetch\n' >> /etc/profile +RUN printf 'export TERM=linux\n' >> /etc/profile +RUN printf 'dhclient\n' >> /etc/rc.d/rc.local && chmod +x /etc/rc.d/rc.local + +RUN printf '{ [ "$(whoami)" = "root" ] && export PS1='\''(alma) \[\\e[0;31m\]\W\[\\e[0m\] \[\\e[0;31m\]\$\[\\e[0m\] '\''; } || true\n' >> /etc/profile +RUN printf '{ [ "$(whoami)" = "user" ] && export PS1='\''(alma) \[\\e[0;32m\]\W\[\\e[0m\] \[\\e[0;32m\]\$\[\\e[0m\] '\''; } || true\n' >> /etc/profile +RUN printf 'id --user 1000 > /dev/null 2>&1 || { adduser user --uid 1000 --groups wheel --create-home --user-group --password "$(uuidgen)" && printf ". /etc/profile\n" >> /home/user/.bashrc; }\n' >> /etc/profile + +RUN usermod --password "$(uuidgen)" root diff --git a/.config/lxc/builds/alpine3.15.dockerfile b/.config/lxc/builds/alpine3.15.dockerfile new file mode 100644 index 0000000..bcdf390 --- /dev/null +++ b/.config/lxc/builds/alpine3.15.dockerfile @@ -0,0 +1,20 @@ +FROM docker.io/library/alpine:3.15@sha256:e7d88de73db3d3fd9b2d63aa7f447a10fd0220b7cbf39803c803f2af9ba256b3 + +RUN apk update + +RUN apk add openrc neofetch xauth openssh vim htop + +RUN rc-update add networking +RUN rc-update add sshd + +RUN printf 'auto lo\niface lo inet loopback\n\nauto eth0\niface eth0 inet dhcp\n' > /etc/network/interfaces + +RUN printf 'export TERM=xterm-256color\n' >> /etc/profile +RUN printf 'id -u user > /dev/null 2>&1 || { adduser -u 1000 -g user user -D; }\n' >> /etc/profile + +RUN printf '. /etc/profile && neofetch\n' > /etc/profile.d/neofetch + +RUN printf "export ENV='/etc/profile.d/neofetch'\n" >> /etc/profile + +RUN printf '{ [ "$(whoami)" = "root" ] && export PS1='\''(alpine) \[\\e[0;31m\]\w\[\\e[0m\] \[\\e[0;31m\]\$\[\\e[0m\] '\''; } || true\n' >> /etc/profile +RUN printf '{ [ "$(whoami)" = "user" ] && export PS1='\''(alpine) \[\\e[0;32m\]\w\[\\e[0m\] \[\\e[0;32m\]\$\[\\e[0m\] '\''; } || true\n' >> /etc/profile diff --git a/.config/lxc/builds/archlinux.dockerfile b/.config/lxc/builds/archlinux.dockerfile new file mode 100644 index 0000000..4441ee6 --- /dev/null +++ b/.config/lxc/builds/archlinux.dockerfile @@ -0,0 +1,69 @@ +FROM docker.io/library/archlinux:base-devel-20230115.0.118859@sha256:d363f036cbbe40976a3b5883712fa56637a7245c24eca278d9afe71d64a93aea + +RUN pacman --noconfirm -Syu wget + +RUN printf '\ +[options] \n\ +ParallelDownloads = 5 \n\ +Architecture = auto \n\ +HoldPkg = pacman glibc \n\ +XferCommand = /usr/bin/wget --quiet --passive-ftp --show-progress --tries=1 --waitretry=1 --read-timeout=1 --continue --output-document %%o %%u \n\ + \n\ +Color \n\ +VerbosePkgLists \n\ +LocalFileSigLevel = Optional \n\ +SigLevel = Required DatabaseOptional \n\ + \n\ +[core] \n\ +Include = /etc/pacman.d/mirrorlist \n\ + \n\ +[extra] \n\ +Include = /etc/pacman.d/mirrorlist \n\ + \n\ +[community] \n\ +Include = /etc/pacman.d/mirrorlist \n\ + \n\ +[options] \n\ +NoExtract = usr/share/help/* !usr/share/help/en* \n\ +NoExtract = usr/share/gtk-doc/html/* usr/share/doc/* \n\ +NoExtract = usr/share/locale/* usr/share/X11/locale/* usr/share/i18n/* \n\ +NoExtract = !*locale*/en*/* !usr/share/i18n/charmaps/UTF-8.gz !usr/share/*locale*/locale.* \n\ +NoExtract = !usr/share/*locales/en_?? !usr/share/*locales/i18n* !usr/share/*locales/iso* \n\ +NoExtract = !usr/share/*locales/trans* \n\ +NoExtract = usr/share/man/* usr/share/info/* \n\ +NoExtract = usr/share/vim/vim*/lang/* \n\ +' > /etc/pacman.conf + +RUN pacman --noconfirm -Syu neofetch vim htop dhcpcd git go + +RUN cd /tmp \ + && curl --remote-name https://aur.archlinux.org/cgit/aur.git/snapshot/yay.tar.gz \ + && tar --extract --file yay.tar.gz \ + && chmod o+w yay + +RUN su -s /bin/sh -c 'cd /tmp/yay && export GOCACHE=/tmp/yay && makepkg --syncdeps --noconfirm --skippgpcheck' - nobody \ + && pacman --noconfirm -U /tmp/yay/*.zst + +RUN pacman --noconfirm -Rns go gcc sudo + +RUN rm --recursive --force /tmp/yay /tmp/yay.tar.gz /var/cache/pacman/pkg + +RUN systemctl enable dhcpcd +RUN systemctl mask \ + sys-kernel-config.mount \ + sys-kernel-debug.mount \ + systemd-journald-audit.socket \ + systemd-firstboot.service \ + tmp.mount + +RUN printf 'permit :wheel\npermit nopass keepenv root\n' > /etc/doas.conf && chmod 400 /etc/doas.conf + +RUN printf 'export TERM=linux\n' >> /etc/profile +RUN printf 'neofetch\n' >> /etc/profile + +RUN printf '{ [ "$(whoami)" = "root" ] && export PS1='\''(arch) \[\\e[0;31m\]\w\[\\e[0m\] \[\\e[0;31m\]\$\[\\e[0m\] '\''; } || true\n' >> /etc/profile +RUN printf '{ [ "$(whoami)" = "user" ] && export PS1='\''(arch) \[\\e[0;32m\]\w\[\\e[0m\] \[\\e[0;32m\]\$\[\\e[0m\] '\''; } || true\n' >> /etc/profile + +RUN printf 'id --user 1000 > /dev/null 2>&1 || { useradd --uid 1000 --groups wheel --create-home --comment user user && printf ". ./etc/profile\n" >> /home/user/.bashrc; }\n' >> /etc/profile + +RUN usermod --password "$(uuidgen)" root diff --git a/.config/lxc/builds/debian-bullseye11.dockerfile b/.config/lxc/builds/debian-bullseye11.dockerfile new file mode 100644 index 0000000..ea106fb --- /dev/null +++ b/.config/lxc/builds/debian-bullseye11.dockerfile @@ -0,0 +1,19 @@ +FROM docker.io/library/debian:bullseye-slim@sha256:7c78fedca85eec82669ff06969250175edac0750cb883628dfe7be18cb906928 + +RUN apt update + +RUN apt install --no-install-recommends --assume-yes \ + init uuid-runtime neofetch vim-tiny iproute2 dhcpcd5 xauth htop + +RUN systemctl mask sys-kernel-config.mount sys-kernel-debug.mount systemd-journald-audit.socket + +RUN ln --symbolic --force bash /bin/sh + +RUN printf 'export TERM=linux\n' >> /etc/profile +RUN printf 'neofetch\n' >> /etc/profile + +RUN printf '{ [ "$(whoami)" = "root" ] && export PS1='\''(debian) \[\\e[0;31m\]\W\[\\e[0m\] \[\\e[0;31m\]\$\[\\e[0m\] '\''; } || true\n' >> /etc/profile +RUN printf '{ [ "$(whoami)" = "user" ] && export PS1='\''(debian) \[\\e[0;32m\]\W\[\\e[0m\] \[\\e[0;32m\]\$\[\\e[0m\] '\''; } || true\n' >> /etc/profile +RUN printf 'id --user 1000 > /dev/null 2>&1 || { adduser user --uid 1000 --gecos user --disabled-password && printf ". ./etc/profile\n" >> /home/user/.bashrc; }\n' >> /etc/profile + +RUN usermod --password "$(uuidgen)" root diff --git a/.config/lxc/builds/fedora35.dockerfile b/.config/lxc/builds/fedora35.dockerfile new file mode 100644 index 0000000..2b732c9 --- /dev/null +++ b/.config/lxc/builds/fedora35.dockerfile @@ -0,0 +1,21 @@ +FROM docker.io/library/fedora@sha256:762d7c5766839057fd9f96a0f2cedf143e2b818feb7767dc1bb70c00c4c3890a + +RUN dnf --assumeyes update + +RUN dnf install --assumeyes --setopt=install_weak_deps=False \ + openssh-server iproute neofetch dhcp-client xauth htop + +RUN systemctl enable sshd +RUN systemctl mask sys-kernel-config.mount sys-kernel-debug.mount systemd-journald-audit.socket + +RUN mkdir --parents /etc/rc.d +RUN printf '#!/bin/sh -eu\ndhclient\n' > /etc/rc.d/rc.local && chmod +x /etc/rc.d/rc.local + +RUN printf 'neofetch\n' >> /etc/profile +RUN printf 'export TERM=linux\n' >> /etc/profile + +RUN printf '{ [ "$(whoami)" = "root" ] && export PS1='\''(fedora) \[\\e[0;31m\]\W\[\\e[0m\] \[\\e[0;31m\]\$\[\\e[0m\] '\''; } || true\n' >> /etc/profile +RUN printf '{ [ "$(whoami)" = "user" ] && export PS1='\''(fedora) \[\\e[0;32m\]\W\[\\e[0m\] \[\\e[0;32m\]\$\[\\e[0m\] '\''; } || true\n' >> /etc/profile +RUN printf 'id --user 1000 > /dev/null 2>&1 || { adduser user --uid 1000 --groups wheel --create-home --user-group --password "$(uuidgen)" && printf ". ./etc/profile\n" >> /home/user/.bashrc; }\n' >> /etc/profile + +RUN usermod --password "$(uuidgen)" root diff --git a/.config/lxc/builds/oracle8.dockerfile b/.config/lxc/builds/oracle8.dockerfile new file mode 100644 index 0000000..2a440e0 --- /dev/null +++ b/.config/lxc/builds/oracle8.dockerfile @@ -0,0 +1,19 @@ +FROM docker.io/library/oraclelinux:8-slim@sha256:9c3ca322d552af7f20c3b80eea42e854487bcc5983b0ad66928c00e16c49d5e8 + +RUN microdnf install epel-release && microdnf --assumeyes update + +RUN microdnf install --assumeyes openssh-server network-scripts dhcp-client neofetch htop + +RUN systemctl enable sshd + +RUN systemctl mask sys-kernel-config.mount sys-kernel-debug.mount rdisc.service + +RUN printf 'neofetch\n' >> /etc/profile +RUN printf 'export TERM=linux\n' >> /etc/profile +RUN printf 'dhclient\n' >> /etc/rc.d/rc.local && chmod +x /etc/rc.d/rc.local + +RUN printf '{ [ "$(whoami)" = "root" ] && export PS1='\''(oracle) \[\\e[0;31m\]\W\[\\e[0m\] \[\\e[0;31m\]\$\[\\e[0m\] '\''; } || true\n' >> /etc/profile +RUN printf '{ [ "$(whoami)" = "user" ] && export PS1='\''(oracle) \[\\e[0;32m\]\W\[\\e[0m\] \[\\e[0;32m\]\$\[\\e[0m\] '\''; } || true\n' >> /etc/profile +RUN printf 'id --user 1000 > /dev/null 2>&1 || { adduser user --uid 1000 --groups wheel --create-home --user-group --password "$(uuidgen)" && printf ". /etc/profile\n" >> /home/user/.bashrc; }\n' >> /etc/profile + +RUN usermod --password "$(uuidgen)" root diff --git a/.config/lxc/builds/rockylinux8.dockerfile b/.config/lxc/builds/rockylinux8.dockerfile new file mode 100644 index 0000000..a220fbf --- /dev/null +++ b/.config/lxc/builds/rockylinux8.dockerfile @@ -0,0 +1,24 @@ +FROM docker.io/library/rockylinux:8.5@sha256:8a94380717b7e6b21c56f8333e0e8242e89a020c0c861d6346f59f179f096240 + +RUN dnf install --assumeyes --setopt=install_weak_deps=False epel-release \ + && dnf --assumeyes update + +RUN dnf install --assumeyes --setopt=install_weak_deps=False \ + openssh-server network-scripts dhcp-client xauth vim htop + +RUN systemctl enable network sshd + +RUN sed --in-place 's/ens3/eth0/' /etc/sysconfig/network-scripts/ifcfg-ens3 + +RUN systemctl mask sys-kernel-config.mount sys-kernel-debug.mount + +RUN curl --silent https://raw.githubusercontent.com/dylanaraps/neofetch/ccd5d9f52609bbdcd5d8fa78c4fdb0f12954125f/neofetch \ + --output /usr/bin/neofetch && chmod +x /usr/bin/neofetch +RUN printf 'neofetch\n' >> /etc/profile +RUN printf 'export TERM=linux\n' >> /etc/profile + +RUN printf '{ [ "$(whoami)" = "root" ] && export PS1='\''(rocky) \[\\e[0;31m\]\W\[\\e[0m\] \[\\e[0;31m\]\$\[\\e[0m\] '\''; } || true\n' >> /etc/profile +RUN printf '{ [ "$(whoami)" = "user" ] && export PS1='\''(rocky) \[\\e[0;32m\]\W\[\\e[0m\] \[\\e[0;32m\]\$\[\\e[0m\] '\''; } || true\n' >> /etc/profile +RUN printf 'id --user 1000 > /dev/null 2>&1 || { adduser user --uid 1000 --groups wheel --create-home --user-group --password "$(uuidgen)" && printf ". /etc/profile\n" >> /home/user/.bashrc; }\n' >> /etc/profile + +RUN usermod --password "$(uuidgen)" root diff --git a/.config/lxc/builds/ubuntu-lunar23.04.dockerfile b/.config/lxc/builds/ubuntu-lunar23.04.dockerfile new file mode 100644 index 0000000..c86f47b --- /dev/null +++ b/.config/lxc/builds/ubuntu-lunar23.04.dockerfile @@ -0,0 +1,21 @@ +FROM docker.io/library/ubuntu:lunar@sha256:a40051efc6b591d38faffb11fdcef157103b9a4143edbc959c47e4b8c7d2e9eb + +RUN apt update + +RUN apt install --no-install-recommends --assume-yes \ + init uuid-runtime neofetch vim-tiny iproute2 xauth htop + +RUN systemctl mask sys-kernel-debug.mount +RUN systemctl enable systemd-networkd + +RUN ln --symbolic --force bash /bin/sh + +RUN printf '[Match]\nName=eth0\n\n[Network]\nDHCP=yes' > /etc/systemd/network/20-wired.network +RUN printf 'export TERM=linux\n' >> /etc/profile +RUN printf 'neofetch\n' >> /etc/profile + +RUN printf '{ [ "$(whoami)" = "root" ] && export PS1='\''(ubuntu) \[\\e[0;31m\]\W\[\\e[0m\] \[\\e[0;31m\]\$\[\\e[0m\] '\''; } || true\n' >> /etc/profile +RUN printf '{ [ "$(whoami)" = "user" ] && export PS1='\''(ubuntu) \[\\e[0;32m\]\W\[\\e[0m\] \[\\e[0;32m\]\$\[\\e[0m\] '\''; } || true\n' >> /etc/profile +RUN printf 'id --user 1000 > /dev/null 2>&1 || { adduser user --uid 1000 --gecos user --disabled-password && printf ". ./etc/profile\n" >> /home/user/.bashrc; }\n' >> /etc/profile + +RUN usermod --password "$(uuidgen)" root diff --git a/.config/lxc/builds/void.dockerfile b/.config/lxc/builds/void.dockerfile new file mode 100644 index 0000000..155df96 --- /dev/null +++ b/.config/lxc/builds/void.dockerfile @@ -0,0 +1,25 @@ +FROM docker.io/voidlinux/voidlinux:latest@sha256:26ba972f0c06beadcec4796ec3037e0bec32af4d255edb68a528bd98304c74f4 + +RUN xbps-install -Syu xbps +RUN xbps-install -Syu +RUN xbps-install -y openssh dhcpcd iputils iproute2 socklog-void neofetch htop + +RUN mkdir --parents /run/runit/runsvdir + +RUN ln --symbolic --force bash /bin/sh +RUN ln --symbolic /etc/runit/runsvdir/current /run/runit/runsvdir/current +RUN ln --symbolic /etc/sv/sshd /var/service/ +RUN ln --symbolic /etc/sv/dhcpcd-eth0 /var/service/ +RUN ln --symbolic /etc/sv/socklog-unix /var/service/ + +RUN printf 'neofetch\n' >> /etc/profile +RUN printf 'export TERM=linux\n' >> /etc/profile + +RUN printf '{ [ "$(whoami)" = "root" ] && export PS1='\''(void) \[\\e[0;31m\]\W\[\\e[0m\] \[\\e[0;31m\]\$\[\\e[0m\] '\''; } || true\n' >> /etc/profile +RUN printf '{ [ "$(whoami)" = "user" ] && export PS1='\''(void) \[\\e[0;32m\]\W\[\\e[0m\] \[\\e[0;32m\]\$\[\\e[0m\] '\''; } || true\n' >> /etc/profile + +RUN printf 'id --user 1000 > /dev/null 2>&1 || { useradd --uid 1000 --groups wheel --create-home --comment user user && printf ". ./etc/profile\n" >> /home/user/.bashrc; }\n' >> /etc/profile + +RUN usermod --password "$(uuidgen)" root + + diff --git a/.config/lxc/default.conf b/.config/lxc/default.conf new file mode 100644 index 0000000..9bc4192 --- /dev/null +++ b/.config/lxc/default.conf @@ -0,0 +1,21 @@ +# Distribution configuration +lxc.include = /etc/lxc/common.conf +lxc.include = /etc/lxc/userns.conf + +# Unprivileged user group mappings +lxc.idmap = u 0 200000 65536 +lxc.idmap = g 0 200000 65536 + +# Network configuration +lxc.net.0.type = veth +lxc.net.0.link = lxcbr0 +lxc.net.0.flags = up +lxc.net.0.hwaddr = 00:16:3e:xx:xx:xx + +# Xorg configuration +lxc.environment = DISPLAY=:1.0 +lxc.environment = XAUTHORITY=/home/user/.config/X11/Xauthority +lxc.mount.entry = /dev/dri dev/dri none bind,optional,create=dir +lxc.mount.entry = /dev/snd dev/snd none bind,optional,create=dir +lxc.mount.entry = /dev/shm dev/shm none bind,optional,create=dir +lxc.mount.entry = /tmp/.X11-unix tmp/.X11-unix none bind,optional,create=dir,ro diff --git a/.config/mimeapps.list b/.config/mimeapps.list index f6664a9..4f52c6f 100644 --- a/.config/mimeapps.list +++ b/.config/mimeapps.list @@ -1,76 +1,293 @@ [Added Associations] application/epub+zip=pdf.desktop; -application/octet-stream=editor.desktop; +application/gzip=archive.desktop; +application/java-archive=archive.desktop; +application/octet-stream=binary.desktop; application/pdf=pdf.desktop; -application/vnd.openxmlformats-officedocument.presentationml.presentation=libreoffice.desktop; -application/vnd.openxmlformats-officedocument.presentationml.slide=libreoffice.desktop; -application/vnd.openxmlformats-officedocument.presentationml.slideshow=libreoffice.desktop; -application/vnd.openxmlformats-officedocument.presentationml.template=libreoffice.desktop; -application/vnd.openxmlformats-officedocument.spreadsheetml.sheet=libreoffice.desktop; -application/vnd.openxmlformats-officedocument.spreadsheetml.template=libreoffice.desktop; -application/vnd.openxmlformats-officedocument.wordprocessingml.document=libreoffice.desktop; -application/vnd.openxmlformats-officedocument.wordprocessingml.template=libreoffice.desktop; -application/x-awk=editor.desktop; +application/vnd.android.package-archive=archive.desktop; +application/vnd.oasis.opendocument.text=office.desktop; +application/vnd.openxmlformats-officedocument.presentationml.presentation=office.desktop; +application/vnd.openxmlformats-officedocument.presentationml.slide=office.desktop; +application/vnd.openxmlformats-officedocument.presentationml.slideshow=office.desktop; +application/vnd.openxmlformats-officedocument.presentationml.template=office.desktop; +application/vnd.openxmlformats-officedocument.spreadsheetml.sheet=office.desktop; +application/vnd.openxmlformats-officedocument.spreadsheetml.template=office.desktop; +application/vnd.openxmlformats-officedocument.wordprocessingml.document=office.desktop; +application/vnd.openxmlformats-officedocument.wordprocessingml.template=office.desktop; +application/x-7z=archive.desktop; +application/x-7z-compressed=archive.desktop; +application/x-ace=archive.desktop; +application/x-ace-compressed=archive.desktop; +application/x-archive=archive.desktop; +application/x-arj=archive.desktop; +application/x-astrotite-afa=archive.desktop; +application/x-awk=text.desktop; +application/x-b1=archive.desktop; application/x-bittorrent=torrent.desktop; -application/x-desktop=editor.desktop; -application/x-shellscript=editor.desktop; +application/x-blender=blender.desktop; +application/x-bzip2=archive.desktop; +application/x-cd-image=archive.desktop; +application/x-cfs=archive.desktop; +application/x-cfs-compressed=archive.desktop; +application/x-compress=archive.desktop; +application/x-cpio=archive.desktop; +application/x-cpio-compressed=archive.desktop; +application/x-dar=archive.desktop; +application/x-desktop=text.desktop; +application/x-dgc=archive.desktop; +application/x-dgc-compressed=archive.desktop; +application/x-freearc=archive.desktop; +application/x-gca=archive.desktop; +application/x-gca-compressed=archive.desktop; +application/x-gtar=archive.desktop; +application/x-gtar-compressed=archive.desktop; +application/x-lzh=archive.desktop; +application/x-lzh-compressed=archive.desktop; +application/x-lzip=archive.desktop; +application/x-lzma=archive.desktop; +application/x-lzop=archive.desktop; +application/x-lzx=archive.desktop; +application/x-rar=archive.desktop; +application/x-rar-compressed=archive.desktop; +application/x-sbx=archive.desktop; +application/x-shar=archive.desktop; +application/x-shellscript=text.desktop; +application/x-snappy-framed=archive.desktop; +application/x-stuffit=archive.desktop; +application/x-stuffitx=archive.desktop; +application/x-tar=archive.desktop; +application/x-xar=archive.desktop; +application/x-xz=archive.desktop; +application/x-zoo=archive.desktop; +application/x-zstd-compressed-tar=archive.desktop; +application/zip=archive.desktop; +application/zstd=archive.desktop; +audio/1d-interleaved-parityfec=audio.desktop; audio/32kadpcm=audio.desktop; +audio/3gpp=audio.desktop; +audio/3gpp2=audio.desktop; audio/AMR=audio.desktop; audio/AMR-WB=audio.desktop; audio/ATRAC-ADVANCED-LOSSLESS=audio.desktop; audio/ATRAC-X=audio.desktop; audio/ATRAC3=audio.desktop; +audio/BV16=audio.desktop; +audio/BV32=audio.desktop; +audio/CN=audio.desktop; +audio/DAT12=audio.desktop; +audio/DV=audio.desktop; +audio/DVI4=audio.desktop; audio/EVRC=audio.desktop; +audio/EVRC-QCP=audio.desktop; +audio/EVRC0=audio.desktop; +audio/EVRC1=audio.desktop; audio/EVRCB=audio.desktop; +audio/EVRCB0=audio.desktop; +audio/EVRCB1=audio.desktop; audio/EVRCNW=audio.desktop; audio/EVRCWB=audio.desktop; +audio/EVRCWB0=audio.desktop; +audio/EVRCWB1=audio.desktop; +audio/G719=audio.desktop; +audio/G722=audio.desktop; +audio/G7221=audio.desktop; +audio/G723=audio.desktop; +audio/G726-16=audio.desktop; +audio/G726-24=audio.desktop; +audio/G726-32=audio.desktop; +audio/G726-40=audio.desktop; +audio/G728=audio.desktop; +audio/G729=audio.desktop; +audio/G7291=audio.desktop; +audio/G729D=audio.desktop; +audio/G729E=audio.desktop; +audio/GSM=audio.desktop; +audio/GSM-EFR=audio.desktop; +audio/GSM-HR-08=audio.desktop; audio/L16=audio.desktop; +audio/L20=audio.desktop; +audio/L24=audio.desktop; +audio/L8=audio.desktop; +audio/LPC=audio.desktop; +audio/MP4A-LATM=audio.desktop; +audio/MPA=audio.desktop; +audio/PCMA=audio.desktop; +audio/PCMA-WB=audio.desktop; +audio/PCMU=audio.desktop; +audio/PCMU-WB=audio.desktop; +audio/QCELP=audio.desktop; +audio/RED=audio.desktop; audio/SMV=audio.desktop; +audio/SMV-QCP=audio.desktop; +audio/SMV0=audio.desktop; +audio/UEMCLIP=audio.desktop; +audio/VDVI=audio.desktop; +audio/VMR-WB=audio.desktop; audio/ac3=audio.desktop; +audio/adpcm=audio.desktop; +audio/amr=audio.desktop; +audio/amr-wb=audio.desktop; +audio/amr-wb+=audio.desktop; +audio/annodex=audio.desktop; audio/asc=audio.desktop; audio/basic=audio.desktop; +audio/bv16=audio.desktop; +audio/bv32=audio.desktop; +audio/clearmode=audio.desktop; +audio/cn=audio.desktop; +audio/csound=audio.desktop; +audio/dat12=audio.desktop; audio/dls=audio.desktop; +audio/dsr-es201108=audio.desktop; +audio/dsr-es202050=audio.desktop; +audio/dsr-es202211=audio.desktop; +audio/dsr-es202212=audio.desktop; +audio/dvi4=audio.desktop; +audio/eac3=audio.desktop; +audio/evrc=audio.desktop; +audio/evrc-qcp=audio.desktop; +audio/evrc0=audio.desktop; +audio/evrc1=audio.desktop; +audio/evrcb=audio.desktop; +audio/evrcb0=audio.desktop; +audio/evrcb1=audio.desktop; +audio/evrcwb=audio.desktop; +audio/evrcwb0=audio.desktop; +audio/evrcwb1=audio.desktop; +audio/example=audio.desktop; +audio/flac=audio.desktop; +audio/fwdred=audio.desktop; +audio/g.722.1=audio.desktop; +audio/g719=audio.desktop; +audio/g722=audio.desktop; +audio/g7221=audio.desktop; +audio/g723=audio.desktop; +audio/g726-16=audio.desktop; +audio/g726-24=audio.desktop; +audio/g726-32=audio.desktop; +audio/g726-40=audio.desktop; +audio/g728=audio.desktop; +audio/g729=audio.desktop; +audio/g7291=audio.desktop; +audio/g729d=audio.desktop; +audio/g729e=audio.desktop; +audio/gsm=audio.desktop; +audio/gsm-efr=audio.desktop; audio/iLBC=audio.desktop; +audio/ilbc=audio.desktop; +audio/ip-mr_v2.5=audio.desktop; +audio/l16=audio.desktop; +audio/l20=audio.desktop; +audio/l24=audio.desktop; +audio/l8=audio.desktop; +audio/lpc=audio.desktop; audio/midi=audio.desktop; audio/mobile-xmf=audio.desktop; audio/mp4=audio.desktop; +audio/mp4a-latm=audio.desktop; +audio/mpa=audio.desktop; +audio/mpa-robust=audio.desktop; audio/mpeg=audio.desktop; +audio/mpeg4-generic=audio.desktop; +audio/mpegurl=audio.desktop; audio/ogg=audio.desktop; +audio/parityfec=audio.desktop; +audio/pcma=audio.desktop; +audio/pcma-wb=audio.desktop; +audio/pcmu=audio.desktop; +audio/pcmu-wb=audio.desktop; audio/prs.sid=audio.desktop; audio/qcelp=audio.desktop; +audio/raptorfec=audio.desktop; +audio/red=audio.desktop; +audio/rtp-enc-aescm128=audio.desktop; +audio/rtp-midi=audio.desktop; +audio/rtx=audio.desktop; +audio/s3m=audio.desktop; +audio/silk=audio.desktop; +audio/smv=audio.desktop; +audio/smv-qcp=audio.desktop; +audio/smv0=audio.desktop; +audio/sp-midi=audio.desktop; +audio/speex=audio.desktop; +audio/t140c=audio.desktop; +audio/t38=audio.desktop; +audio/telephone-event=audio.desktop; +audio/tone=audio.desktop; +audio/ulpfec=audio.desktop; +audio/vdvi=audio.desktop; +audio/vmr-wb=audio.desktop; +audio/vnd.3gpp.iufp=audio.desktop; +audio/vnd.4SB=audio.desktop; +audio/vnd.4sb=audio.desktop; +audio/vnd.CELP=audio.desktop; audio/vnd.audikoz=audio.desktop; +audio/vnd.audiokoz=audio.desktop; +audio/vnd.celp=audio.desktop; +audio/vnd.cisco.nse=audio.desktop; +audio/vnd.cmles.radio-events=audio.desktop; +audio/vnd.cns.anp1=audio.desktop; +audio/vnd.cns.inf1=audio.desktop; audio/vnd.dece.audio=audio.desktop; audio/vnd.digital-winds=audio.desktop; +audio/vnd.dlna.adts=audio.desktop; +audio/vnd.dolby.heaac.1=audio.desktop; +audio/vnd.dolby.heaac.2=audio.desktop; audio/vnd.dolby.mlp=audio.desktop; +audio/vnd.dolby.mps=audio.desktop; +audio/vnd.dolby.pl2=audio.desktop; +audio/vnd.dolby.pl2x=audio.desktop; +audio/vnd.dolby.pl2z=audio.desktop; +audio/vnd.dolby.pulse.1=audio.desktop; +audio/vnd.dra=audio.desktop; audio/vnd.dts=audio.desktop; audio/vnd.dts.hd=audio.desktop; +audio/vnd.dvb.file=audio.desktop; audio/vnd.everad.plj=audio.desktop; +audio/vnd.hns.audio=audio.desktop; audio/vnd.lucent.voice=audio.desktop; audio/vnd.ms-playready.media.pya=audio.desktop; +audio/vnd.nokia.mobile-xmf=audio.desktop; audio/vnd.nortel.vbk=audio.desktop; audio/vnd.nuera.ecelp4800=audio.desktop; audio/vnd.nuera.ecelp7470=audio.desktop; audio/vnd.nuera.ecelp9600=audio.desktop; +audio/vnd.octel.sbc=audio.desktop; +audio/vnd.qcelp=audio.desktop; +audio/vnd.rhetorex.32kadpcm=audio.desktop; audio/vnd.rip=audio.desktop; audio/vnd.sealedmedia.softseal.mpeg=audio.desktop; +audio/vnd.vmx.cvsd=audio.desktop; +audio/vorbis=audio.desktop; +audio/vorbis-config=audio.desktop; +audio/webm=audio.desktop; +audio/x-aac=audio.desktop; audio/x-aiff=audio.desktop; audio/x-annodex=audio.desktop; +audio/x-caf=audio.desktop; audio/x-flac=audio.desktop; +audio/x-gsm=audio.desktop; audio/x-matroska=audio.desktop; audio/x-mod=audio.desktop; audio/x-mpegurl=audio.desktop; audio/x-ms-wax=audio.desktop; audio/x-ms-wma=audio.desktop; audio/x-pn-realaudio=audio.desktop; +audio/x-pn-realaudio-plugin=audio.desktop; audio/x-realaudio=audio.desktop; audio/x-s3m=audio.desktop; +audio/x-scpls=audio.desktop; +audio/x-sd2=audio.desktop; audio/x-stm=audio.desktop; audio/x-wav=audio.desktop; +audio/xm=audio.desktop; image/bmp=image.desktop; image/cgm=image.desktop; image/dicom-rle=image.desktop; image/emf=image.desktop; +image/example=image.desktop; image/fits=image.desktop; +image/g3fax=image.desktop; image/gif=image.desktop; image/ief=image.desktop; image/jls=image.desktop; @@ -79,17 +296,23 @@ image/jpeg=image.desktop; image/jpm=image.desktop; image/jpx=image.desktop; image/ktx=image.desktop; +image/naplps=image.desktop; +image/pcx=image.desktop; image/png=image.desktop; image/prs.btif=image.desktop; image/prs.pti=image.desktop; +image/pwg-raster=image.desktop; +image/sgi=image.desktop; image/svg+xml=image.desktop; image/t38=image.desktop; image/tiff=image.desktop; image/tiff-fx=image.desktop; image/vnd.adobe.photoshop=image.desktop; image/vnd.airzip.accelerator.azv=image.desktop; +image/vnd.cns.inf2=image.desktop; image/vnd.dece.graphic=image.desktop; image/vnd.djvu=image.desktop; +image/vnd.dvb.subtitle=image.desktop; image/vnd.dwg=image.desktop; image/vnd.dxf=image.desktop; image/vnd.fastbidsheet=image.desktop; @@ -99,12 +322,16 @@ image/vnd.fujixerox.edmics-mmr=image.desktop; image/vnd.fujixerox.edmics-rlc=image.desktop; image/vnd.globalgraphics.pgb=image.desktop; image/vnd.microsoft.icon=image.desktop; +image/vnd.mix=image.desktop; image/vnd.mozilla.apng=image.desktop; image/vnd.ms-modi=image.desktop; +image/vnd.ms-photo=image.desktop; +image/vnd.net-fpx=image.desktop; image/vnd.radiance=image.desktop; image/vnd.sealed.png=image.desktop; image/vnd.sealedmedia.softseal.gif=image.desktop; image/vnd.sealedmedia.softseal.jpg=image.desktop; +image/vnd.svf=image.desktop; image/vnd.tencent.tap=image.desktop; image/vnd.valve.source.texture=image.desktop; image/vnd.wap.wbmp=image.desktop; @@ -112,113 +339,304 @@ image/vnd.xiff=image.desktop; image/vnd.zbrush.pcx=image.desktop; image/webp=image.desktop; image/wmf=image.desktop; +image/x-3ds=image.desktop; +image/x-canon-cr2=image.desktop; +image/x-canon-crw=image.desktop; image/x-cmu-raster=image.desktop; +image/x-cmx=image.desktop; +image/x-coreldraw=image.desktop; +image/x-coreldrawpattern=image.desktop; +image/x-coreldrawtemplate=image.desktop; +image/x-corelphotopaint=image.desktop; +image/x-epson-erf=image.desktop; +image/x-freehand=image.desktop; +image/x-icon=image.desktop; +image/x-jg=image.desktop; +image/x-jng=image.desktop; +image/x-mrsid-image=image.desktop; +image/x-ms-bmp=image.desktop; +image/x-nikon-nef=image.desktop; +image/x-olympus-orf=image.desktop; +image/x-pcx=image.desktop; +image/x-photoshop=image.desktop; +image/x-pict=image.desktop; image/x-portable-anymap=image.desktop; image/x-portable-bitmap=image.desktop; image/x-portable-graymap=image.desktop; image/x-portable-pixmap=image.desktop; image/x-rgb=image.desktop; image/x-targa=image.desktop; +image/x-tga=image.desktop; image/x-xbitmap=image.desktop; image/x-xpixmap=image.desktop; image/x-xwindowdump=image.desktop; -inode/directory=file-manager.desktop; -message/rfc822=email.desktop; -text/cache-manifest=editor.desktop; -text/calendar=editor.desktop; -text/css=editor.desktop; -text/csv=editor.desktop; -text/csv-schema=editor.desktop; -text/dns=editor.desktop; -text/html=editor.desktop; -text/html-sandboxed=editor.desktop; -text/jcr-cnd=editor.desktop; -text/markdown=editor.desktop; -text/mizar=editor.desktop; -text/n3=editor.desktop; -text/plain=editor.desktop; -text/provenance-notation=editor.desktop; -text/prs.fallenstein.rst=editor.desktop; -text/prs.lines.tag=editor.desktop; -text/richtext=editor.desktop; -text/rust=editor.desktop; -text/sgml=editor.desktop; -text/tab-separated-values=editor.desktop; -text/troff=editor.desktop; -text/turtle=editor.desktop; -text/uri-list=editor.desktop; -text/vcard=editor.desktop; -text/vnd.DMClientScript=editor.desktop; -text/vnd.a=editor.desktop; -text/vnd.abc=editor.desktop; -text/vnd.ascii-art=editor.desktop; -text/vnd.debian.copyright=editor.desktop; -text/vnd.dvb.subtitle=editor.desktop; -text/vnd.esmertec.theme-descriptor=editor.desktop; -text/vnd.fly=editor.desktop; -text/vnd.fmi.flexstor=editor.desktop; -text/vnd.graphviz=editor.desktop; -text/vnd.in3d.3dml=editor.desktop; -text/vnd.in3d.spot=editor.desktop; -text/vnd.ms-mediapackage=editor.desktop; -text/vnd.net2phone.commcenter.command=editor.desktop; -text/vnd.si.uricatalogue=editor.desktop; -text/vnd.sun.j2me.app-descriptor=editor.desktop; -text/vnd.trolltech.linguist=editor.desktop; -text/vnd.wap.si=editor.desktop; -text/vnd.wap.sl=editor.desktop; -text/vnd.wap.wml=editor.desktop; -text/vnd.wap.wmlscript=editor.desktop; -text/x-lua=editor.desktop; -text/x-pod=editor.desktop; -text/x-ruby=editor.desktop; -text/x-setext=editor.desktop; -text/x-systemd-unit=editor.desktop; -text/xml=editor.desktop; -text/xml-external-parsed-entity=editor.desktop; +inode/blockdevice=inode.desktop; +inode/chardevice=inode.desktop; +inode/directory=inode.desktop; +inode/directory-locked=inode.desktop; +inode/fifo=inode.desktop; +inode/socket=inode.desktop; +message/CPIM=message.desktop; +message/cpim=message.desktop; +message/delivery-status=message.desktop; +message/disposition-notification=message.desktop; +message/example=message.desktop; +message/external-body=message.desktop; +message/feedback-report=message.desktop; +message/global=message.desktop; +message/global-delivery-status=message.desktop; +message/global-disposition-notification=message.desktop; +message/global-headers=message.desktop; +message/http=message.desktop; +message/imdn+xml=message.desktop; +message/news=message.desktop; +message/partial=message.desktop; +message/rfc822=message.desktop; +message/s-http=message.desktop; +message/sip=message.desktop; +message/sipfrag=message.desktop; +message/tracking-status=message.desktop; +message/vnd.si.simp=message.desktop; +text/cache-manifest=text.desktop; +text/calendar=text.desktop; +text/comma-separated-values=text.desktop; +text/css=text.desktop; +text/csv=text.desktop; +text/csv-schema=text.desktop; +text/directory=text.desktop; +text/dns=text.desktop; +text/ecmascript=text.desktop; +text/english=text.desktop; +text/enriched=text.desktop; +text/example=text.desktop; +text/h323=text.desktop; +text/html=text.desktop; +text/html-sandboxed=text.desktop; +text/iuls=text.desktop; +text/javascript=text.desktop; +text/jcr-cnd=text.desktop; +text/markdown=text.desktop; +text/mathml=text.desktop; +text/mizar=text.desktop; +text/n3=text.desktop; +text/parityfec=text.desktop; +text/plain=text.desktop; +text/provenance-notation=text.desktop; +text/prs.fallenstein.rst=text.desktop; +text/prs.lines.tag=text.desktop; +text/red=text.desktop; +text/rfc822-headers=text.desktop; +text/richtext=text.desktop; +text/rtf=text.desktop; +text/rtp-enc-aescm128=text.desktop; +text/rtx=text.desktop; +text/rust=text.desktop; +text/scriptlet=text.desktop; +text/sgml=text.desktop; +text/t140=text.desktop; +text/tab-separated-values=text.desktop; +text/texmacs=text.desktop; +text/troff=text.desktop; +text/turtle=text.desktop; +text/ulpfec=text.desktop; +text/uri-list=text.desktop; +text/vcard=text.desktop; +text/vnd.DMClientScript=text.desktop; +text/vnd.IPTC.NITF=text.desktop; +text/vnd.IPTC.NewsML=text.desktop; +text/vnd.a=text.desktop; +text/vnd.abc=text.desktop; +text/vnd.ascii-art=text.desktop; +text/vnd.curl=text.desktop; +text/vnd.curl.dcurl=text.desktop; +text/vnd.curl.mcurl=text.desktop; +text/vnd.curl.scurl=text.desktop; +text/vnd.debian.copyright=text.desktop; +text/vnd.dmclientscript=text.desktop; +text/vnd.dvb.subtitle=text.desktop; +text/vnd.esmertec.theme-descriptor=text.desktop; +text/vnd.flatland.3dml=text.desktop; +text/vnd.fly=text.desktop; +text/vnd.fmi.flexstor=text.desktop; +text/vnd.graphviz=text.desktop; +text/vnd.in3d.3dml=text.desktop; +text/vnd.in3d.spot=text.desktop; +text/vnd.iptc.newsml=text.desktop; +text/vnd.iptc.nitf=text.desktop; +text/vnd.latex-z=text.desktop; +text/vnd.motorola.reflex=text.desktop; +text/vnd.ms-mediapackage=text.desktop; +text/vnd.net2phone.commcenter.command=text.desktop; +text/vnd.si.uricatalogue=text.desktop; +text/vnd.sun.j2me.app-descriptor=text.desktop; +text/vnd.trolltech.linguist=text.desktop; +text/vnd.wap.si=text.desktop; +text/vnd.wap.sl=text.desktop; +text/vnd.wap.wml=text.desktop; +text/vnd.wap.wmlscript=text.desktop; +text/x-asm=text.desktop; +text/x-bibtex=text.desktop; +text/x-boo=text.desktop; +text/x-c=text.desktop; +text/x-c++hdr=text.desktop; +text/x-c++src=text.desktop; +text/x-chdr=text.desktop; +text/x-component=text.desktop; +text/x-crontab=text.desktop; +text/x-csh=text.desktop; +text/x-csrc=text.desktop; +text/x-diff=text.desktop; +text/x-dsrc=text.desktop; +text/x-fortran=text.desktop; +text/x-haskell=text.desktop; +text/x-java=text.desktop; +text/x-java-source=text.desktop; +text/x-lilypond=text.desktop; +text/x-literate-haskell=text.desktop; +text/x-lua=text.desktop; +text/x-makefile=text.desktop; +text/x-moc=text.desktop; +text/x-nfo=text.desktop; +text/x-opml=text.desktop; +text/x-pascal=text.desktop; +text/x-pcs-gcd=text.desktop; +text/x-perl=text.desktop; +text/x-pod=text.desktop; +text/x-psp=text.desktop; +text/x-python=text.desktop; +text/x-ruby=text.desktop; +text/x-scala=text.desktop; +text/x-server-parsed-html=text.desktop; +text/x-setext=text.desktop; +text/x-sfv=text.desktop; +text/x-sh=text.desktop; +text/x-systemd-unit=text.desktop; +text/x-tcl=text.desktop; +text/x-tex=text.desktop; +text/x-uuencode=text.desktop; +text/x-vcalendar=text.desktop; +text/x-vcard=text.desktop; +text/xml=text.desktop; +text/xml-external-parsed-entity=text.desktop; +video/1d-interleaved-parityfec=video.desktop; video/3gpp=video.desktop; +video/3gpp-tt=video.desktop; video/3gpp2=video.desktop; +video/BMPEG=video.desktop; +video/BT656=video.desktop; +video/CelB=video.desktop; +video/DV=video.desktop; +video/H261=video.desktop; +video/H263=video.desktop; +video/H263-1998=video.desktop; +video/H263-2000=video.desktop; +video/H264=video.desktop; +video/H264-RCDO=video.desktop; +video/H264-SVC=video.desktop; +video/JPEG=video.desktop; +video/MJ2=video.desktop; +video/MP1S=video.desktop; +video/MP2P=video.desktop; +video/MP2T=video.desktop; +video/MP4V-ES=video.desktop; +video/MPV=video.desktop; +video/SMPTE292M=video.desktop; +video/annodex=video.desktop; +video/bmpeg=video.desktop; +video/bt656=video.desktop; +video/celb=video.desktop; +video/dl=video.desktop; +video/dv=video.desktop; +video/example=video.desktop; +video/fli=video.desktop; +video/gl=video.desktop; +video/h261=video.desktop; +video/h263=video.desktop; +video/h263-1998=video.desktop; +video/h263-2000=video.desktop; +video/h264=video.desktop; video/iso.segment=video.desktop; +video/jpeg=video.desktop; +video/jpeg2000=video.desktop; +video/jpm=video.desktop; video/mj2=video.desktop; +video/mp1s=video.desktop; +video/mp2p=video.desktop; +video/mp2t=video.desktop; video/mp4=video.desktop; +video/mp4v-es=video.desktop; video/mpeg=video.desktop; +video/mpeg4-generic=video.desktop; +video/mpv=video.desktop; +video/nv=video.desktop; video/ogg=video.desktop; +video/parityfec=video.desktop; +video/pointer=video.desktop; video/quicktime=video.desktop; +video/raptorfec=video.desktop; +video/raw=video.desktop; +video/rtp-enc-aescm128=video.desktop; +video/rtx=video.desktop; +video/smpte292m=video.desktop; +video/ulpfec=video.desktop; +video/vc1=video.desktop; +video/vnd.CCTV=video.desktop; +video/vnd.cctv=video.desktop; video/vnd.dece.hd=video.desktop; video/vnd.dece.mobile=video.desktop; video/vnd.dece.mp4=video.desktop; video/vnd.dece.pd=video.desktop; video/vnd.dece.sd=video.desktop; video/vnd.dece.video=video.desktop; +video/vnd.directv.mpeg=video.desktop; +video/vnd.directv.mpeg-tts=video.desktop; +video/vnd.dlna.mpeg-tts=video.desktop; video/vnd.dvb.file=video.desktop; video/vnd.fvt=video.desktop; +video/vnd.hns.video=video.desktop; +video/vnd.iptvforum.1dparityfec-1010=video.desktop; +video/vnd.iptvforum.1dparityfec-2005=video.desktop; +video/vnd.iptvforum.2dparityfec-1010=video.desktop; +video/vnd.iptvforum.2dparityfec-2005=video.desktop; +video/vnd.iptvforum.ttsavc=video.desktop; +video/vnd.iptvforum.ttsmpeg2=video.desktop; +video/vnd.motorola.video=video.desktop; +video/vnd.motorola.videop=video.desktop; video/vnd.mpegurl=video.desktop; video/vnd.ms-playready.media.pyv=video.desktop; +video/vnd.mts=video.desktop; video/vnd.nokia.interleaved-multimedia=video.desktop; +video/vnd.nokia.videovoip=video.desktop; +video/vnd.objectvideo=video.desktop; video/vnd.radgamettools.bink=video.desktop; video/vnd.radgamettools.smacker=video.desktop; video/vnd.sealed.mpeg1=video.desktop; video/vnd.sealed.mpeg4=video.desktop; video/vnd.sealed.swf=video.desktop; video/vnd.sealedmedia.softseal.mov=video.desktop; +video/vnd.uvvu.mp4=video.desktop; video/vnd.vivo=video.desktop; video/webm=video.desktop; video/x-annodex=video.desktop; +video/x-f4v=video.desktop; +video/x-fli=video.desktop; video/x-flv=video.desktop; video/x-javafx=video.desktop; +video/x-la-asf=video.desktop; +video/x-m4v=video.desktop; video/x-matroska=video.desktop; video/x-matroska-3d=video.desktop; +video/x-mng=video.desktop; video/x-ms-asf=video.desktop; +video/x-ms-vob=video.desktop; video/x-ms-wm=video.desktop; video/x-ms-wmv=video.desktop; video/x-ms-wmx=video.desktop; video/x-ms-wvx=video.desktop; video/x-msvideo=video.desktop; video/x-sgi-movie=video.desktop; +video/x-smv=video.desktop; +x-scheme-handler/http=browser.desktop; +x-scheme-handler/https=browser.desktop; x-scheme-handler/magnet=torrent.desktop; -x-scheme-handler/mailto=email.desktop; -[Default Applications] -message/rfc822=email.desktop; -x-scheme-handler/magnet=torrent.desktop; -x-scheme-handler/mailto=email.desktop; - +x-scheme-handler/mailto=message.desktop; diff --git a/.config/mimeo/associations.txt b/.config/mimeo/associations.txt index 3466fc1..519b2fe 100644 --- a/.config/mimeo/associations.txt +++ b/.config/mimeo/associations.txt @@ -1,6 +1,3 @@ -chromium %U - ^https?:// - xournalpp %U \.xoj$ \.xopp$ diff --git a/.config/moc/config b/.config/moc/config index b7b469e..c3f7971 100644 --- a/.config/moc/config +++ b/.config/moc/config @@ -1 +1,2 @@ Theme = /home/thedro/.config/moc/themes/terminal +Keymap = keymap diff --git a/.config/moc/keymap b/.config/moc/keymap new file mode 100644 index 0000000..79b54ff --- /dev/null +++ b/.config/moc/keymap @@ -0,0 +1,9 @@ +menu_down = j DOWN +menu_up = k UP +menu_page_down = ^f PAGE_DOWN +menu_page_up = ^b PAGE_UP +menu_first_item = J HOME +menu_last_item = K END +toggle_menu = ^W TAB +toggle_layout = +help = ? diff --git a/.config/nixpkgs/config.nix b/.config/nixpkgs/config.nix index d8f9248..a95debd 100644 --- a/.config/nixpkgs/config.nix +++ b/.config/nixpkgs/config.nix @@ -1,17 +1,28 @@ let + pkgs = import <nixpkgs> { }; + + system = builtins.currentSystem; + + previous = import (builtins.fetchTarball { + url = "https://releases.nixos.org/nixos/22.11/nixos-22.11.466.596a8e828c5/nixexprs.tar.xz"; + sha256 = "1367bad5zz0mfm4czb6p0s0ni38f0x1ffh02z76rx4nranipqbgg"; }) { inherit system; }; + stable = import (builtins.fetchTarball { - url = "https://releases.nixos.org/nixos/20.09/nixos-20.09.3346.4d0ee90c6e2/nixexprs.tar.xz"; - sha256 = "1hl3ibkqpk0fihppj85fgiin5r6l9jsqmfjbmcqfyjvykh9fy6ag"; }) {}; + url = "https://releases.nixos.org/nixos/23.11/nixos-23.11.6510.a5e4bbcb4780/nixexprs.tar.xz"; + sha256 = "0f73pbh4j89wgk7rn9xp0q8ybw15zkhw0prjz5r37aaryjs8hnbd"; }) { inherit system; }; unstable = import (builtins.fetchTarball { - url = "https://releases.nixos.org/nixos/unstable/nixos-21.03pre265961.891f607d530/nixexprs.tar.xz"; - sha256 = "1hwwb4n15bbqxnbqffq4kfb369vz65sq74p537fqdp6i4ywpqsyh"; }) {}; + url = "https://releases.nixos.org/nixos/unstable/nixos-24.05pre615148.6143fc5eeb9c/nixexprs.tar.xz"; + sha256 = "0bymwq04dxl3ljjjzw21aspdnwwfm56pqi218lg0vdwargy8yxm8"; }) { inherit system; }; in { + allowBroken = true; allowUnfree = true; + allowUnsupportedSystem = true; + allowInsecurePredicate = pkgs: true; packageOverrides = pkgs: with stable; { @@ -20,9 +31,9 @@ in Woodpecker = pkgs.buildEnv { name = "woodpecker"; paths = [ - Terminal Graphical Xorg Awesome Fonts Audio LaTeX - Android JavaScript Python PHP Lua Elixir Html Shell Haskell - Perl Nix C Golang Rust CSS SQL YAML + Terminal Graphical Xorg Wayland Awesome Fonts Audio LaTeX Dictionary Android + JavaScript Python PHP Lua Elixir HTML Shell Haskell Perl Nix C Golang Rust CSS + SQL YAML HTTP Ruby Nim Themes Emulators Clojure Lisp ]; }; @@ -36,17 +47,22 @@ in Ferret = pkgs.buildEnv { name = "ferret"; - paths = [ Terminal Graphical Fonts Xorg Awesome Audio ]; + paths = [ Terminal Graphical Fonts Xorg Awesome Audio Themes ]; }; Tiger = pkgs.buildEnv { name = "tiger"; - paths = [ Nix Terminal Graphical Fonts Xorg Awesome JavaScript Python ]; + paths = [ Nix Terminal Graphical Fonts Xorg Awesome JavaScript Python Themes ]; }; Hound = pkgs.buildEnv { name = "hound"; - paths = [ Terminal Graphical Fonts Xorg Xfce JavaScript Python ]; + paths = [ Terminal Graphical Fonts Xorg Xfce JavaScript Python Themes ]; + }; + + Ant = pkgs.buildEnv { + name = "ant"; + paths = [ Xorg-Aarch64 Xfce-Aarch64 Terminal-Aarch64 Graphical-Aarch64 Themes Fonts ]; }; # Package Sets @@ -54,21 +70,33 @@ in Terminal = pkgs.buildEnv { name = "terminal"; paths = [ - (callPackage ./packages/chromexup/default.nix {}) - (callPackage ./packages/gmni/default.nix {}) - (callPackage ./packages/literate/default.nix {}) - (callPackage ./packages/systemd2nix/default.nix {}) - (callPackage ./packages/youtube-dl/default.nix {}) - (pass.withExtensions (ext: with ext; [ (callPackage ./packages/pass-import/default.nix {}) pass-audit pass-otp ])) - unstable.amfora - unstable.emacs - unstable.fzf + (callPackage ./packages/chromexup/package.nix { }) + (callPackage ./packages/emacs-batch-indent/package.nix { }) + (callPackage ./packages/pdf2htmlex/package.nix { }) + (callPackage ./packages/systemd2nix/package.nix { }) + (pass.withExtensions (ext: with ext; [ pass-import pass-audit pass-otp ])) unstable.hugo + unstable.piper-tts + unstable.validator-nu + unstable.vimHugeX + unstable.yt-dlp + unstable.ios-webkit-debug-proxy + unstable.libimobiledevice aerc + alacritty alsaUtils + amfora + ansi2html ansible + atftp + atool bat + bind bleachbit + cava + cloc + csvkit + curlftpfs davmail desktop-file-utils diceware @@ -76,21 +104,27 @@ in docker-compose dtrx electrum + emacs encfs entr - exercism + expect + fdupes ffmpeg flashrom fortune + fzf gettext gifsicle git groff + hexedit + hexyl highlight ideviceinstaller imagemagick img2pdf jpegoptim + jq keychain kjv libqalculate @@ -98,38 +132,49 @@ in mdcat mimeo moc + monolith neofetch + netcat-openbsd + nethogs newsboat nnn + nodePackages.mermaid-cli ocrmypdf pandoc - picotts + pdsh + pipes + plantuml pngnq pngquant poppler_utils - powertop - pulsemixer + pssh + quickemu ranger rclone ripgrep rxvt-unicode - sbcl + s-tui + sfeed silver-searcher sshfs subversion surfraw tcl + tesseract tmux + toipe trash-cli units vale - vault - vimHugeX + vcal + ventoy-bin vnstat w3m wavemon weechat + woof xdg-user-dirs + xterm zbar ]; pathsToLink = [ "/etc" "/share" "/bin" ]; @@ -138,88 +183,97 @@ in Graphical = pkgs.buildEnv { name = "graphical"; paths = [ - (callPackage ./packages/beaker-browser/default.nix {}) - (callPackage ./packages/boomer/default.nix {}) - (callPackage ./packages/dmenu/default.nix {}) - (callPackage ./packages/gnaural/default.nix {}) - (callPackage ./packages/ntrviewer/default.nix {}) - unstable.nyxt - unstable.tilp2 + (callPackage ./packages/boomer/package.nix { }) + (callPackage ./packages/dmenu/package.nix { }) + (callPackage ./packages/rofi/package.nix { }) + (callPackage ./packages/sowon/package.nix { }) + (mplayer.override { v4lSupport = true; }) + previous.code-server + previous.qownnotes + previous.recoll + unstable.firefox + unstable.google-chrome unstable.ungoogled-chromium aegisub anki - audacity blender - code-server - copyq + claws-mail + corrscope dconf diffpdf escrotum evince + exiftool feh - firefox flameshot freerdp + fsearch gImageReader + gcolor2 gimp - gnome3.simple-scan - gnome3.zenity - google-chrome + gnaural gparted + gromit-mpx + gst_all_1.gst-plugins-base + gst_all_1.gst-plugins-good + gst_all_1.gstreamer i3lock-fancy + kcharselect keepassxc krop libnotify libreoffice + liferea mate.engrampa meld - mplayer - mupdf + mupdf_1_17 mypaint - palemoon pavucontrol peek - planner - qownnotes qrencode - recoll redshift - rofi scrcpy screenkey - scribus + sent sigil skippy-xd spaceFM + stalonetray sublime3 sxiv syncthing - tabula - thunderbird tigervnc transmission-gtk treesheets - treesheets - unclutter - vimb virt-manager + vlc vscodium xournalpp xsane + yad zathura - zim + zeal + ]; + }; + + Emulators = pkgs.buildEnv { + name = "emulators"; + paths = [ + (callPackage ./packages/ntrviewer/package.nix { }) + (callPackage ./packages/tiemu/package.nix { }) + desmume + mgba ]; - pathsToLink = [ "/share" "/bin" ]; }; Xorg = pkgs.buildEnv { name = "xorg"; paths = [ - (callPackage ./packages/x11vnc/default.nix {}) - (callPackage ./packages/xprintidle/default.nix {}) + autocutsel glxinfo - tdrop + unclutter-xfixes wmctrl + x11vnc xbindkeys xdotool xorg.xauth @@ -239,99 +293,151 @@ in xorg.xrdb xorg.xset xorg.xsetroot + xprintidle xsel xzoom ]; }; - Awesome = pkgs.buildEnv { - name = "awesome"; + Wayland = pkgs.buildEnv { + name = "wayland"; paths = [ - (callPackage ./packages/deepin-gtk-theme/default.nix {}) - awesome - lxappearance + (callPackage ./packages/wf-shell/package.nix { }) + wayfire + weston + wev + wofi ]; - pathsToLink = [ "/share" "/bin" ]; + }; + + Awesome = pkgs.buildEnv { + name = "awesome"; + paths = [ (callPackage ./packages/awesome/package.nix { }) ]; }; Xfce = pkgs.buildEnv { name = "xfce"; paths = [ - plank + bamf deadbeef - zuki-themes + dunst + plank polkit_gnome xfce.exo - xfce.gvfs xfce.garcon - xfce.tumbler - xfce.xfwm4 - xfce.xfwm4-themes + xfce.libxfce4ui + xfce.libxfce4util xfce.thunar xfce.thunar-archive-plugin xfce.thunar-volman - xfce.xfconf - xfce.xfdesktop - xfce.libxfce4ui - xfce.libxfce4util xfce.xfce4-session xfce.xfce4-settings + xfce.xfconf + xfce.xfdesktop + xfce.xfwm4 + xfce.xfwm4-themes + zuki-themes ]; }; Fonts = pkgs.buildEnv { name = "fonts"; paths = [ - (callPackage ./packages/nerdfonts-dejavu-sans-mono/default.nix {}) - etBook - ibm-plex - corefonts + (callPackage ./packages/nerdfonts-dejavu-sans-mono/package.nix { }) cm_unicode cooper-hewitt + corefonts + etBook + fira + fira-code + fira-code-symbols + fira-mono font-awesome_4 - yanone-kaffeesatz + ibm-plex + inter noto-fonts noto-fonts-cjk noto-fonts-emoji - fira - fira-code - fira-mono - fira-code-symbols source-code-pro + source-sans-pro source-serif-pro + yanone-kaffeesatz + ]; + }; + + Themes = pkgs.buildEnv { + name = "themes"; + paths = [ + glib + gnome.dconf-editor + gnome.gnome-themes-extra + gtk-engine-murrine + gtk3.dev + librsvg + lxappearance + papirus-icon-theme + qt5ct + unstable.nwg-look + vanilla-dmz + ]; + }; + + Dictionary = pkgs.buildEnv { + name = "dictionary"; + paths = [ + (aspellWithDicts (dictionary: [ + dictionary.en + dictionary.en-computers + dictionary.en-science + ])) + hunspell + hunspellDicts.en_US-large + hyphen + mythes ]; }; Audio = pkgs.buildEnv { name = "audio"; - paths = [ ardour cadence qjackctl jack2 ]; + paths = [ + (callPackage ./packages/qprompt/package.nix { }) + ardour + pulsemixer + qjackctl + tenacity + ]; }; - LaTeX = pkgs.buildEnv { - name = "latex"; - paths = [ gummi texworks texlive.combined.scheme-full ]; + Design = pkgs.buildEnv { + name = "design"; + paths = [ kicad freecadStable openscad librecad ]; }; Android = pkgs.buildEnv { name = "android"; paths = [ - (callPackage ./packages/edl/default.nix {}) - (callPackage ./packages/mkbootfs/default.nix {}) - (callPackage ./packages/mkbootimg/default.nix {}) + (callPackage ./packages/mkbootfs/package.nix { }) + (callPackage ./packages/mkbootimg/package.nix { }) + edl abootimg ]; }; + LaTeX = pkgs.buildEnv { + name = "latex"; + paths = [ gummi texlive.combined.scheme-full previous.texworks ]; + }; + JavaScript = pkgs.buildEnv { name = "javascript"; paths = [ - nodejs-14_x unstable.deno - nodePackages.bower2nix + unstable.swc + esbuild nodePackages.eslint nodePackages.jsonlint - nodePackages.node2nix nodePackages.prettier + nodejs ]; pathsToLink = [ "/bin" ]; }; @@ -339,64 +445,94 @@ in Python = pkgs.buildEnv { name = "python"; paths = [ - (python38.withPackages (ps: with ps; [ bandit black mypy pyflakes pylint ])) + (python3.withPackages (ps: with ps; [ + bandit + black + flake8 + mypy + pyflakes + pygments + pylint + ])) + ruff ]; }; PHP = pkgs.buildEnv { name = "php"; paths = [ - php74 - php74Packages.psysh - php74Packages.psalm - php74Packages.phpcbf - php74Packages.phpstan - php74Packages.composer + (php.buildEnv { + extensions = ({ enabled, all }: enabled ++ (with all; [ xdebug ])); + extraConfig = '' + xdebug.mode=develop,debug + xdebug.start_with_request=yes + ''; + }) + (callPackage ./packages/phar-composer/package.nix { }) + graphviz + kcachegrind + phpPackages.composer + phpPackages.phpcbf + phpPackages.phpstan + phpPackages.psalm + phpPackages.psysh ]; }; Lua = pkgs.buildEnv { name = "lua"; paths = [ - (callPackage ./packages/luaformatter/default.nix {}) - lua5_3 - lua53Packages.luacheck + (callPackage ./packages/redbean/package.nix { }) + lua + luaPackages.luacheck + luaformatter ]; }; Elixir = pkgs.buildEnv { name = "elixir"; - paths = [ elixir_1_10 ]; + paths = [ elixir ]; }; - Html = pkgs.buildEnv { + HTML = pkgs.buildEnv { name = "html"; paths = [ html-tidy html-xml-utils libxml2 + libxslt xmlstarlet ]; }; Shell = pkgs.buildEnv { name = "shell"; - paths = [ bats dash shellcheck shfmt ]; + paths = [ dash fish bats shellcheck shfmt ]; }; Haskell = pkgs.buildEnv { name = "haskell"; - paths = [ ghc ghcid haskellPackages.hlint haskellPackages.brittany ]; + paths = [ ghc ghcid haskellPackages.hlint previous.haskellPackages.brittany ]; + }; + + Clojure = pkgs.buildEnv { + name = "clojure"; + paths = [ clojure leiningen ]; }; Perl = pkgs.buildEnv { name = "perl"; - paths = [ rakudo perl530 perl530Packages.PerlCritic perl530Packages.PerlTidy ]; + paths = [ rakudo (perl.withPackages (ps: with ps; [ PerlCritic PerlTidy TextLorem LaTeXML ])) ]; }; Nix = pkgs.buildEnv { name = "nix"; - paths = [ nixos-generators nix-index nix-linter nixfmt nixpkgs-fmt nixpkgs-lint ]; + paths = [ nix-index previous.nix-linter nixfmt nixpkgs-fmt nixpkgs-lint ]; + }; + + Ruby = pkgs.buildEnv { + name = "ruby"; + paths = [ rubocop ruby ]; }; C = pkgs.buildEnv { @@ -406,7 +542,7 @@ in Golang = pkgs.buildEnv { name = "golang"; - paths = [ go unstable.gore ]; + paths = [ go gore ]; }; Rust = pkgs.buildEnv { @@ -414,32 +550,143 @@ in paths = [ evcxr rustup ]; }; + Nim = pkgs.buildEnv { + name = "nim"; + paths = [ nim ]; + }; + + Lisp = pkgs.buildEnv { + name = "lisp"; + paths = [ + (pkgs.writeScriptBin "guile" '' + export GUILE_LOAD_PATH="${pkgs.lib.concatStrings [ + "${unstable.guile-gnutls}/share/guile/site/3.0:" + "$GUILE_LOAD_PATH" + ]}" + ${unstable.guile_3_0}/bin/guile "$@" + '') + sbcl + ]; + }; + + HTTP = pkgs.buildEnv { + name = "http"; + paths = [ caddy apacheHttpd httpie ]; + }; + CSS = pkgs.buildEnv { name = "css"; paths = [ - (callPackage ./packages/csstidy/default.nix {}) + (previous.callPackage ./packages/csstidy/package.nix { }) + nodePackages.stylelint csslint + sassc ]; }; SQL = pkgs.buildEnv { name = "sql"; paths = [ - (callPackage ./packages/skeema/default.nix {}) - (callPackage ./packages/sqldef/default.nix {}) - (callPackage ./packages/sqlfluff/default.nix {}) - dbeaver pgformatter + skeema + sqlfluff sqlint sqlite + sqlitebrowser + unstable.sqldef ]; }; YAML = pkgs.buildEnv { name = "yaml"; paths = [ - (callPackage ./packages/ruamel.yaml.cmd/default.nix {}) - python38Packages.yamllint + (previous.callPackage ./packages/yaml2nix/package.nix { }) + (callPackage ./packages/ruamel.yaml.cmd/package.nix { }) + python39Packages.yamllint + yj + ]; + }; + + Xorg-Aarch64 = pkgs.buildEnv { + name = "xorg-aarch64"; + paths = [ + glxinfo + unclutter-xfixes + wmctrl + x11vnc + xbindkeys + xdotool + xorg.xauth + xorg.xev + xorg.xf86inputevdev + xorg.xf86inputlibinput + xorg.xf86videofbdev + xorg.xinit + xorg.xinput + xorg.xmodmap + xorg.xorgserver + xorg.xrandr + xorg.xrdb + xorg.xset + xorg.xsetroot + xprintidle + xsel + xzoom + ]; + }; + + Xfce-Aarch64 = pkgs.buildEnv { + name = "xfce-aarch64"; + paths = [ + bamf + dunst + polkit_gnome + xfce.exo + xfce.garcon + xfce.libxfce4ui + xfce.libxfce4util + xfce.thunar + xfce.thunar-archive-plugin + xfce.thunar-volman + xfce.xfce4-session + xfce.xfce4-settings + xfce.xfconf + xfce.xfdesktop + xfce.xfwm4 + xfce.xfwm4-themes + zuki-themes + ]; + }; + + Graphical-Aarch64 = pkgs.buildEnv { + name = "graphical-aarch64"; + paths = [ + unstable.firefox + unstable.ungoogled-chromium + audacity + freerdp + fsearch + galculator + gpicview + pavucontrol + pcmanfm + sylpheed + xsane + ]; + }; + + Terminal-Aarch64 = pkgs.buildEnv { + name = "terminal-aarch64"; + paths = [ + unstable.vimHugeX + alsaUtils + fzf + libnotify + redshift + rofi + rxvt-unicode + skippy-xd + tigervnc ]; }; }; diff --git a/.config/nixpkgs/packages/awesome/package.nix b/.config/nixpkgs/packages/awesome/package.nix new file mode 100644 index 0000000..6bf06ee --- /dev/null +++ b/.config/nixpkgs/packages/awesome/package.nix @@ -0,0 +1,98 @@ +{ lib, stdenv, fetchgit, lua, cairo, librsvg, cmake, imagemagick, pkg-config +, gdk-pixbuf, xorg, libstartup_notification, libxdg_basedir, libpthreadstubs +, xcb-util-cursor, makeWrapper, pango, gobject-introspection, which, dbus +, nettools, git, doxygen, xmlto, docbook_xml_dtd_45, docbook_xsl +, findXMLCatalogs, libxkbcommon, xcbutilxrm, hicolor-icon-theme, asciidoctor +, gtk3, makeFontsConf, ghostscript }: + +let luaEnv = lua.withPackages (ps: [ ps.lgi ps.ldoc ]); + +in stdenv.mkDerivation rec { + pname = "awesome"; + version = "d2dc428e567e378a3f534c4d748543413fc30172"; + + src = fetchgit { + rev = version; + url = "https://github.com/awesomeWM/awesome.git"; + sha256 = "sha256-gViEIuDn9ygzVof8e5e7cqDVPNeKDzlXK8V8oYzUUgA="; + }; + + nativeBuildInputs = [ + asciidoctor + cmake + docbook_xml_dtd_45 + docbook_xsl + doxygen + findXMLCatalogs + imagemagick + makeWrapper + pkg-config + xmlto + ]; + + outputs = [ "out" "doc" ]; + + FONTCONFIG_FILE = makeFontsConf { + fontDirectories = [ "${ghostscript}/share/ghostscript/fonts" ]; + }; + + propagatedUserEnvPkgs = [ hicolor-icon-theme ]; + + buildInputs = [ + cairo + dbus + gdk-pixbuf + git + gobject-introspection + gtk3 + libpthreadstubs + librsvg + libstartup_notification + libxdg_basedir + libxkbcommon + lua + luaEnv + nettools + pango + xcb-util-cursor + xcbutilxrm + xorg.libXau + xorg.libXdmcp + xorg.libxcb + xorg.libxshmfence + xorg.xcbutil + xorg.xcbutilimage + xorg.xcbutilkeysyms + xorg.xcbutilrenderutil + xorg.xcbutilwm + ]; + + cmakeFlags = [ "-DOVERRIDE_VERSION=${version}" ] + ++ lib.optional lua.pkgs.isLuaJIT + "-DLUA_LIBRARY=${lua}/lib/libluajit-5.1.so"; + + GI_TYPELIB_PATH = "${pango.out}/lib/girepository-1.0"; + LUA_CPATH = "${luaEnv}/lib/lua/${lua.luaversion}/?.so"; + LUA_PATH = "${luaEnv}/share/lua/${lua.luaversion}/?.lua;;"; + + postInstall = '' + mv "$out/bin/awesome" "$out/bin/.awesome-wrapped" + makeWrapper "$out/bin/.awesome-wrapped" "$out/bin/awesome" \ + --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \ + --add-flags '--search ${luaEnv}/lib/lua/${lua.luaversion}' \ + --add-flags '--search ${luaEnv}/share/lua/${lua.luaversion}' \ + --prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" + + wrapProgram $out/bin/awesome-client \ + --prefix PATH : "${which}/bin" + ''; + + passthru = { inherit lua; }; + + meta = with lib; { + license = licenses.gpl2Plus; + platforms = platforms.linux; + homepage = "https://awesomewm.org/"; + description = "Highly configurable, dynamic window manager for X"; + }; +} diff --git a/.config/nixpkgs/packages/beaker-browser/default.nix b/.config/nixpkgs/packages/beaker-browser/default.nix deleted file mode 100644 index a827a87..0000000 --- a/.config/nixpkgs/packages/beaker-browser/default.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ stdenv, fetchurl, appimageTools }: - -let version = "1.1.0"; in - -appimageTools.wrapType2 { - name = "beaker-browser"; - - src = fetchurl { - url = "https://github.com/beakerbrowser/beaker/releases/download/${version}/Beaker.Browser-${version}.AppImage"; - sha256 = "07hcyr6vyim8vrvw120v5jjfvy5jkcaqc3wgqgyf6prbqdx71dkp"; - }; - - meta = with stdenv.lib; { - homepage = "https://beakerbrowser.com"; - license = licenses.mit; - description = "An experimental peer-to-peer Web browser"; - }; -} diff --git a/.config/nixpkgs/packages/boomer/default.nix b/.config/nixpkgs/packages/boomer/package.nix index 417aa22..885de27 100644 --- a/.config/nixpkgs/packages/boomer/default.nix +++ b/.config/nixpkgs/packages/boomer/package.nix @@ -1,17 +1,15 @@ -{ stdenv, fetchFromGitHub, makeWrapper, nim, libX11, libXrandr, libGL }: +{ lib, stdenv, fetchgit, makeWrapper, nim, libX11, libXrandr, libGL }: let - x11-nim = fetchFromGitHub { - repo = "x11"; - owner = "nim-lang"; + x11-nim = fetchgit { + url = "https://github.com/nim-lang/x11"; rev = "b7bae7dffa4e3f12370d5a18209359422ae8bedd"; sha256 = "1j3kyp0vf2jl20c67gcm759jnfskdf0wc4ajrdbvfxias285c5sb"; }; - opengl-nim = fetchFromGitHub { - repo = "opengl"; - owner = "nim-lang"; + opengl-nim = fetchgit { + url = "https://github.com/nim-lang/opengl"; rev = "a6fb649e5bd94d8420d4a11287092a4dc3e922b4"; sha256 = "0w62lfrdms2vb24kd4jnypwmqvdk5x9my1dinnqdq82yl4nz6d0s"; }; @@ -19,12 +17,12 @@ let in stdenv.mkDerivation rec { pname = "boomer"; - version = "d16c65ce3eae31f4c77de1585b340d8d624c1252"; - src = fetchFromGitHub { - owner = "tsoding"; - repo = "boomer"; + version = "cc0f5311193da8361ee782a421d6bc4ad8541cf3"; + + src = fetchgit { + url = "https://github.com/tsoding/boomer"; rev = version; - sha256 = "1kqfg2i5p1zrvl9jx0ig7f0ckxnaxi9svr0bs52aavwydldnnl8d"; + sha256 = "sha256-3yg0nuJE0Rrw13VEQ/CjjjPN5G4ytssgiesdXwlHaF8="; }; buildInputs = [ nim libX11 libXrandr libGL makeWrapper ]; @@ -44,14 +42,12 @@ in stdenv.mkDerivation rec { fixupPhase = '' runHook preFixup - patchelf --set-rpath ${ - stdenv.lib.makeLibraryPath [ stdenv.cc.cc libX11 libXrandr libGL ] - } $out/bin/boomer + patchelf --set-rpath ${lib.makeLibraryPath [ stdenv.cc.cc libX11 libXrandr libGL ]} $out/bin/boomer wrapProgram "$out/bin/boomer" --set LIBGL_ALWAYS_SOFTWARE 1 runHook postFixup ''; - meta = with stdenv.lib; { + meta = with lib; { license = licenses.mit; platforms = platforms.linux; homepage = "https://github.com/tsoding/boomer"; diff --git a/.config/nixpkgs/packages/chromexup/default.nix b/.config/nixpkgs/packages/chromexup/package.nix index 78d974b..c6c4622 100644 --- a/.config/nixpkgs/packages/chromexup/default.nix +++ b/.config/nixpkgs/packages/chromexup/package.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchgit, python38 }: +{ lib, fetchgit, python38 }: with python38.pkgs; @@ -20,7 +20,7 @@ buildPythonApplication rec { cp -rT scripts/systemd $out ''; - meta = with stdenv.lib; { + meta = with lib; { license = licenses.mit; inherit (src.meta) homepage; platforms = platforms.linux; diff --git a/.config/nixpkgs/packages/csstidy/default.nix b/.config/nixpkgs/packages/csstidy/package.nix index 7e9a8d0..5ccf7ff 100644 --- a/.config/nixpkgs/packages/csstidy/default.nix +++ b/.config/nixpkgs/packages/csstidy/package.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchgit, sconsPackages, gcc }: +{ lib, stdenv, fetchgit, sconsPackages, gcc }: stdenv.mkDerivation rec { @@ -14,15 +14,17 @@ stdenv.mkDerivation rec { buildInputs = [ sconsPackages.scons_3_0_1 ]; preBuild = '' - sed -i "/env = Environment()/a env.Replace(CXX='${gcc}/bin/g++')" SConstruct + sed --in-place "/env = Environment()/a env.Replace(CXX='${gcc}/bin/g++')" SConstruct ''; installPhase = '' - mkdir -p $out/bin + runHook preInstall + mkdir --parents $out/bin cp release/csstidy/csstidy $out/bin + runHook postInstall ''; - meta = with stdenv.lib; { + meta = with lib; { license = licenses.lgpl21; inherit (src.meta) homepage; platforms = platforms.linux; diff --git a/.config/nixpkgs/packages/deepin-gtk-theme/default.nix b/.config/nixpkgs/packages/deepin-gtk-theme/default.nix deleted file mode 100644 index bdddc28..0000000 --- a/.config/nixpkgs/packages/deepin-gtk-theme/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ stdenv, fetchFromGitHub, gtk-engine-murrine }: - -stdenv.mkDerivation rec { - name = "deepin-gtk-theme-${version}"; - version = "17.10.5"; - - src = fetchFromGitHub { - owner = "linuxdeepin"; - repo = "deepin-gtk-theme"; - rev = version; - sha256 = "0ff1yg4gz4p7nd0qg3dcbsiw8yqlvqccm55kxi998w8j1wrg6pq3"; - }; - - propagatedUserEnvPkgs = [ gtk-engine-murrine ]; - - makeFlags = [ "PREFIX=$(out)" ]; - - meta = { - description = "Deepin GTK Theme"; - homepage = https://github.com/linuxdeepin/deepin-gtk-theme; - license = stdenv.lib.licenses.lgpl3; - platforms = stdenv.lib.platforms.unix; - maintainers = [ stdenv.lib.maintainers.romildo ]; - }; -} diff --git a/.config/nixpkgs/packages/dmenu/default.nix b/.config/nixpkgs/packages/dmenu/default.nix deleted file mode 100644 index 2ac9664..0000000 --- a/.config/nixpkgs/packages/dmenu/default.nix +++ /dev/null @@ -1,44 +0,0 @@ -{ stdenv, fetchurl, libX11, libXinerama, libXft, zlib, fetchpatch }: - -stdenv.mkDerivation rec { - name = "dmenu-4.9"; - - src = fetchurl { - url = "https://dl.suckless.org/tools/${name}.tar.gz"; - sha256 = "0ia9nqr83bv6x247q30bal0v42chcj9qcjgv59xs6xj46m7iz5xk"; - }; - - buildInputs = [ libX11 libXinerama zlib libXft ]; - - patches = [ - (fetchpatch { - name = "dmenu-xresources-4.9.patch"; - url = "https://tools.suckless.org/dmenu/patches/xresources/dmenu-xresources-4.9.diff"; - sha256 = "0clczp17zwkxy1qhy0inqjplxpq4mgaf4vvfvn063hk733r4i7rn"; - }) - (fetchpatch { - name = "xim.patch"; - url = "https://raw.githubusercontent.com/NixOS/nixpkgs/1f16d0496ce86d4c903e2e4ed6cbe4e952a7196f/pkgs/applications/misc/dmenu/xim.patch"; - sha256 = "006np7hlhr11wmj9652fcvacrw1fnv4w8hdlm80pyn0vn1wjdkw6"; - }) - ]; - - postPatch = '' - sed -ri -e 's!\<(dmenu|dmenu_path|stest)\>!'"$out/bin"'/&!g' dmenu_run - sed -ri -e 's!\<stest\>!'"$out/bin"'/&!g' dmenu_path - ''; - - preConfigure = '' - sed -i "s@PREFIX = /usr/local@PREFIX = $out@g" config.mk - ''; - - makeFlags = [ "CC:=$(CC)" ]; - - meta = with stdenv.lib; { - license = licenses.mit; - platforms = platforms.all; - homepage = "https://tools.suckless.org/dmenu"; - maintainers = with maintainers; [ pSub globin ]; - description = "A generic, highly customizable, and efficient menu for the X Window System"; - }; -} diff --git a/.config/nixpkgs/packages/dmenu/package.nix b/.config/nixpkgs/packages/dmenu/package.nix new file mode 100644 index 0000000..f0f933c --- /dev/null +++ b/.config/nixpkgs/packages/dmenu/package.nix @@ -0,0 +1,32 @@ +{ lib, stdenv, fetchgit, libX11, libXinerama, libXft, zlib }: + +stdenv.mkDerivation rec { + name = "dmenu"; + version = "9b0be7712e2aae65b459f758a080c56983056021"; + + src = fetchgit { + rev = version; + url = "https://www.thedroneely.com/git/thedroneely/dmenu/"; + sha256 = "0sbwwxbm5bcn0m4s1y2gl90wc224kf6755d1xdr23bz5ihy3jzg2"; + }; + + buildInputs = [ libX11 libXinerama zlib libXft ]; + + postPatch = '' + sed -ri -e 's!\<(dmenu|dmenu_path|stest)\>!'"$out/bin"'/&!g' dmenu_run + sed -ri -e 's!\<stest\>!'"$out/bin"'/&!g' dmenu_path + ''; + + preConfigure = '' + sed -i "s@PREFIX = /usr/local@PREFIX = $out@g" config.mk + ''; + + makeFlags = [ "CC:=$(CC)" ]; + + meta = { + license = lib.licenses.mit; + platforms = lib.platforms.all; + homepage = "https://tools.suckless.org/dmenu"; + description = "A generic, highly customizable, and efficient menu for the X Window System"; + }; +} diff --git a/.config/nixpkgs/packages/edl/default.nix b/.config/nixpkgs/packages/edl/default.nix deleted file mode 100644 index 1830afa..0000000 --- a/.config/nixpkgs/packages/edl/default.nix +++ /dev/null @@ -1,43 +0,0 @@ -{ stdenv, fetchgit, python38 }: - -python38.pkgs.buildPythonApplication rec { - - pname = "edl"; - url = "https://github.com/bkerler/edl.git"; - version = "6ca9feb8ac7b260a0395d4f51e9e91fc0feda058"; - - src = fetchgit { - inherit url; - rev = version; - sha256 = "1lpgamg6wkwpj3mxcn8nrxxw90svx5xy3kahk8rdf09ph6wlii4x"; - }; - - doCheck = false; - dontBuild = true; - - propagatedBuildInputs = with python38.pkgs; [ - pyusb - pyserial - docopt - pycryptodome - qrcode - ]; - - pythonEnv = python38.withPackages (ps: with ps; propagatedBuildInputs); - - installPhase = '' - mkdir -p $out/share/edl - cp -rT ${src} $out/share/edl - makeWrapper ${pythonEnv}/bin/python $out/bin/edl --add-flags $out/share/edl/edl.py - makeWrapper ${pythonEnv}/bin/python $out/bin/edl-diag --add-flags $out/share/edl/diag.py - makeWrapper ${pythonEnv}/bin/python $out/bin/edl-tcpclient --add-flags $out/share/edl/tcpclient.py - makeWrapper ${pythonEnv}/bin/python $out/bin/edl-fhloaderparse --add-flags $out/share/edl/fhloaderparse.py - ''; - - meta = with stdenv.lib; { - homepage = url; - license = licenses.mit; - platforms = platforms.linux; - description = "QC Firehose / Sahara Client / QC Diag Tools :)"; - }; -} diff --git a/.config/nixpkgs/packages/emacs-batch-indent/package.nix b/.config/nixpkgs/packages/emacs-batch-indent/package.nix new file mode 100644 index 0000000..92042af --- /dev/null +++ b/.config/nixpkgs/packages/emacs-batch-indent/package.nix @@ -0,0 +1,30 @@ +{ lib, stdenv, fetchgit }: + +stdenv.mkDerivation rec { + + name = "emacs-batch-indent"; + version = "145e8771b9709a82e3df82cdc06c6d9505de905d"; + url = "https://github.com/cwfoo/emacs-batch-indent"; + + src = fetchgit { + inherit url; + rev = version; + sha256 = "sha256-Qqg/ZLbfTZnH2aO7ZW2XiiVBqEvK2+LMo2Kz6HSnOCE="; + }; + + phases = [ "unpackPhase" "installPhase" ]; + + installPhase = '' + runHook preInstall + mkdir --parents $out/bin + cp emacs-batch-indent $out/bin + runHook postInstall + ''; + + meta = with lib; { + homepage = url; + license = licenses.gpl3; + platforms = platforms.linux; + description = "Indent Common Lisp, Emacs Lisp, and Scheme from the command line using Emacs."; + }; +} diff --git a/.config/nixpkgs/packages/gmni/default.nix b/.config/nixpkgs/packages/gmni/default.nix deleted file mode 100644 index 573c9df..0000000 --- a/.config/nixpkgs/packages/gmni/default.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ stdenv, fetchgit, pkg-config, openssl }: - -stdenv.mkDerivation rec { - pname = "gmni"; - version = "f5d540bc5d0112895376aebe6bf54adb32545d6e"; - url = "https://git.sr.ht/~sircmpwn/gmni"; - - src = fetchgit { - inherit url; - rev = version; - sha256 = "0x4bg7mffq7vj9f3dj3s0m7q6f18nrysl68x6dlzk74hj6wsslbc"; - }; - - buildInputs = [ pkg-config openssl ]; - - meta = with stdenv.lib; { - homepage = url; - license = licenses.gpl3; - description = "A Gemini client"; - }; -} diff --git a/.config/nixpkgs/packages/gnaural/default.nix b/.config/nixpkgs/packages/gnaural/default.nix deleted file mode 100644 index 4324736..0000000 --- a/.config/nixpkgs/packages/gnaural/default.nix +++ /dev/null @@ -1,29 +0,0 @@ -{ stdenv, fetchurl, portaudio, libsndfile, pkg-config, gtk2, gcc48 }: - -stdenv.mkDerivation rec { - - pname = "gnaural"; - version = "20110606"; - - src = fetchurl { - url = "https://iweb.dl.sourceforge.net/project/gnaural/Gnaural/gnaural_${version}.tar.xz"; - sha256 = "1gq519c0imsh57zklyi0f8h64l3ai48lh672c834470z8c6kvbfi"; - }; - - patches = [ - (fetchurl { - name = "gnaural.patch"; - url = "https://aur.archlinux.org/cgit/aur.git/plain/gnaural.patch?h=gnaural"; - sha256 = "15bplxcvjml8cz7pi2fwb444fpp7ypsh279642v8s9hgl3i3jvsz"; - }) - ]; - - buildInputs = [ gcc48 portaudio pkg-config gtk2 libsndfile ]; - - meta = with stdenv.lib; { - license = licenses.gpl2; - platforms = platforms.linux; - homepage = "http://gnaural.sourceforge.net/"; - description = "Auditory binaural-beat generator"; - }; -} diff --git a/.config/nixpkgs/packages/literate/default.nix b/.config/nixpkgs/packages/literate/default.nix deleted file mode 100644 index f5be32e..0000000 --- a/.config/nixpkgs/packages/literate/default.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ stdenv, fetchgit, dmd, dub }: - -stdenv.mkDerivation rec { - name = "Literate"; - version = "7004dffec0cff3068828514eca72172274fd3f7d"; - - src = fetchgit { - rev = version; - url = "https://github.com/zyedidia/Literate.git"; - sha256 = "0x4xgrdskybaa7ssv81grmwyc1k167v3nwj320jvp5l59xxlbcvs"; - }; - - buildInputs = [ dmd dub ]; - - installPhase = "install -D bin/lit $out/bin/lit"; - - meta = with stdenv.lib; { - description = "A literate programming tool for any language"; - homepage = "http://literate.zbyedidia.webfactional.com/"; - license = licenses.mit; - platforms = platforms.unix; - }; -} diff --git a/.config/nixpkgs/packages/luaformatter/default.nix b/.config/nixpkgs/packages/luaformatter/default.nix deleted file mode 100644 index 88bbc9f..0000000 --- a/.config/nixpkgs/packages/luaformatter/default.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ stdenv, fetchFromGitHub, cmake }: - -stdenv.mkDerivation rec { - pname = "LuaFormatter"; - version = "1.3.3"; - - src = fetchFromGitHub { - sha256 = "1dfqsh6v8brnwzg3lgi7228lw08qqfy4ghbjyvwn7mr82fy1xcnd"; - rev = version; - repo = pname; - owner = "Koihik"; - fetchSubmodules = true; - }; - - buildInputs = [ cmake ]; - - meta = with stdenv.lib; { - inherit (src.meta) homepage; - description = "Code formatter for Lua"; - license = licenses.asl20; - platforms = platforms.linux; - }; -} diff --git a/.config/nixpkgs/packages/mkbootfs/default.nix b/.config/nixpkgs/packages/mkbootfs/package.nix index 379bb8c..b8c6050 100644 --- a/.config/nixpkgs/packages/mkbootfs/default.nix +++ b/.config/nixpkgs/packages/mkbootfs/package.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchgit }: +{ lib, stdenv, fetchgit }: stdenv.mkDerivation rec { @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { cp mkbootfs $out/bin ''; - meta = with stdenv.lib; { + meta = with lib; { homepage = url; platforms = platforms.linux; license = licenses.unlicense; diff --git a/.config/nixpkgs/packages/mkbootimg/default.nix b/.config/nixpkgs/packages/mkbootimg/package.nix index 40be21d..738fd33 100644 --- a/.config/nixpkgs/packages/mkbootimg/default.nix +++ b/.config/nixpkgs/packages/mkbootimg/package.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchgit }: +{ lib, stdenv, fetchgit }: stdenv.mkDerivation rec { @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { cp unpackbootimg $out/bin ''; - meta = with stdenv.lib; { + meta = with lib; { homepage = url; platforms = platforms.linux; license = licenses.unlicense; diff --git a/.config/nixpkgs/packages/nerdfonts-dejavu-sans-mono/default.nix b/.config/nixpkgs/packages/nerdfonts-dejavu-sans-mono/package.nix index 18d3b15..866a6af 100644 --- a/.config/nixpkgs/packages/nerdfonts-dejavu-sans-mono/default.nix +++ b/.config/nixpkgs/packages/nerdfonts-dejavu-sans-mono/package.nix @@ -1,10 +1,9 @@ -{ stdenv, fetchurl, unzip }: +{ lib, stdenv, fetchurl, unzip }: stdenv.mkDerivation rec { pname = "nerdfonts-dejavu-sans-mono"; version = "2.1.0"; - buildInputs = [ unzip ]; src = fetchurl { @@ -13,23 +12,18 @@ stdenv.mkDerivation rec { }; phases = [ "unpackPhase" "installPhase" ]; - unpackPhase = '' unzip ${src} ''; installPhase = '' - mkdir -p $out/share/fonts/nerdfonts-dejavu-sans-mono - cp -r * $out/share/fonts/nerdfonts-dejavu-sans-mono + runHook preInstall + mkdir --parents $out/share/fonts/nerdfonts-dejavu-sans-mono + cp --recursive * $out/share/fonts/nerdfonts-dejavu-sans-mono + runHook postInstall ''; - meta = with stdenv.lib; { - description = '' - Nerd Fonts is a project that attempts to patch as many developer targeted - and/or used fonts as possible. The patch is to specifically add a high - number of additional glyphs from popular 'iconic fonts' such as Font - Awesome, Devicons, Octicons, and others. - ''; - homepage = "https://github.com/ryanoasis/nerd-fonts"; + meta = with lib; { license = licenses.mit; platforms = platforms.all; + homepage = "https://github.com/ryanoasis/nerd-fonts"; }; } diff --git a/.config/nixpkgs/packages/nixpkgs.lib/package.nix b/.config/nixpkgs/packages/nixpkgs.lib/package.nix new file mode 100644 index 0000000..6f5c4e8 --- /dev/null +++ b/.config/nixpkgs/packages/nixpkgs.lib/package.nix @@ -0,0 +1,59 @@ +{ lib, stdenv, fetchgit, writeTextFile }: + +stdenv.mkDerivation rec { + + pname = "nixpkgs.lib"; + version = "f9d58ee370835f4c658cd0a62e8def4bda8b1f32"; + + src = fetchgit { + url = "https://github.com/nix-community/nixpkgs.lib.git"; + sha256 = "sha256-KnumcE6UuNQPapsr32KjcRVDVuRGWB5PnAczHoo9nJc="; + rev = version; + }; + + installPhase = '' + runHook preInstall + mkdir --parents $out + cp --recursive --no-target-directory $src $out + runHook postInstall + ''; + + patches = [ + (writeTextFile { + name = "remove-nonexistent-external-calls.patch"; + text = '' + --- a/lib/default.nix + +++ b/lib/default.nix + @@ -24,8 +24,8 @@ let + # packaging + customisation = callLibs ./customisation.nix; + derivations = callLibs ./derivations.nix; + - maintainers = import ../maintainers/maintainer-list.nix; + - teams = callLibs ../maintainers/team-list.nix; + + maintainers = { }; + + teams = { }; + meta = callLibs ./meta.nix; + sources = callLibs ./sources.nix; + versions = callLibs ./versions.nix; + diff --git a/lib/trivial.nix b/lib/trivial.nix + index 5d4fad8..d679563 100644 + --- a/lib/trivial.nix + +++ b/lib/trivial.nix + @@ -164,7 +164,7 @@ rec { + version = release + versionSuffix; + + /* Returns the current nixpkgs release number as string. */ + - release = lib.strings.fileContents ../.version; + + release = ""; + + /* The latest release that is supported, at the time of release branch-off, + if applicable. + ''; + }) + ]; + + meta = with lib; { + description = "nixpkgs lib for cheap instantiation "; + homepage = "https://github.com/nix-community/nixpkgs.lib"; + }; +} diff --git a/.config/nixpkgs/packages/ntrviewer/default.nix b/.config/nixpkgs/packages/ntrviewer/package.nix index 6a754bf..af155bf 100644 --- a/.config/nixpkgs/packages/ntrviewer/default.nix +++ b/.config/nixpkgs/packages/ntrviewer/package.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, fetchpatch, libjpeg, ffmpeg, SDL }: +{ lib, stdenv, fetchFromGitHub, fetchpatch, libjpeg, ffmpeg, SDL }: stdenv.mkDerivation rec { pname = "ntrviewer"; @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { patches = [ (fetchpatch { name = "ntrviewer.patch"; - url = "https://aur.archlinux.org/cgit/aur.git/plain/ntrviewer.patch?h=ntrviewer-git"; + url = "https://aur.archlinux.org/cgit/aur.git/plain/ntrviewer.patch?h=ntrviewer-git&id=7ae6776d6db1476ee9df8cac7a933167a1bc3d25"; sha256 = "0lw1zmm4fdjb09iqsw593pdv4p36q77zq5lb2qh0xqcaf2ll84z5"; }) ]; @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { runHook postInstall ''; - meta = with stdenv.lib; { + meta = with lib; { license = licenses.gpl3; inherit (src.meta) homepage; platforms = platforms.linux; diff --git a/.config/nixpkgs/packages/pass-import/default.nix b/.config/nixpkgs/packages/pass-import/default.nix deleted file mode 100644 index 78dded4..0000000 --- a/.config/nixpkgs/packages/pass-import/default.nix +++ /dev/null @@ -1,61 +0,0 @@ -{ stdenv, pass, fetchFromGitHub, python38, makeWrapper, fetchpatch }: - -with python38.pkgs; - -let - - pythonEnv = pythonPackages.python.withPackages (_: [ - defusedxml - setuptools - pyaml - pykeepass - filemagic - cryptography - secretstorage - ]); - -in stdenv.mkDerivation rec { - pname = "pass-import"; - version = "a8f56cc6a85362ed20f46c1360c87fdd213b890c"; - - src = fetchFromGitHub { - owner = "roddhjav"; - repo = "pass-import"; - rev = version; - sha256 = "0hg40fqnss9n31ns8lc8v1h9hjdw4qjg68xs0hm6c9njabahl1pq"; - }; - - dontBuild = true; - buildInputs = [ pythonEnv ]; - nativeBuildInputs = [ makeWrapper ]; - - patches = [ - # https://github.com/roddhjav/pass-import/pull/91 - (fetchpatch { - url = "https://github.com/roddhjav/pass-import/commit/6ccaf639e92df45bd400503757ae4aa2c5c030d7.patch"; - sha256 = "0lw9vqvbqcy96s7v7nz0i1bdx93x7qr13azymqypcdhjwmq9i63h"; - }) - ]; - - postPatch = '' - sed -i -e 's|$0|${pass}/bin/pass|' import.bash - ''; - - installFlags = [ "PREFIX=$(out)" "BASHCOMPDIR=$(out)/etc/bash_completion.d" ]; - - postFixup = '' - install -D pass_import.py $out/${pythonPackages.python.sitePackages}/pass_import.py - wrapProgram $out/lib/password-store/extensions/import.bash \ - --prefix PATH : "${pythonEnv}/bin" \ - --prefix PYTHONPATH : "$out/${pythonPackages.python.sitePackages}" \ - --run "export PREFIX" - ''; - - meta = with stdenv.lib; { - description = "Pass extension for importing data from existing password managers"; - homepage = "https://github.com/roddhjav/pass-import"; - license = licenses.gpl3Plus; - maintainers = with maintainers; [ lovek323 the-kenny fpletz tadfisher ]; - platforms = platforms.unix; - }; -} diff --git a/.config/nixpkgs/packages/pdf2htmlex/package.nix b/.config/nixpkgs/packages/pdf2htmlex/package.nix new file mode 100644 index 0000000..82021ef --- /dev/null +++ b/.config/nixpkgs/packages/pdf2htmlex/package.nix @@ -0,0 +1,17 @@ +{ lib, fetchurl, appimageTools }: + +appimageTools.wrapType2 rec { + name = "pdf2htmlex"; + version = "0.18.8.rc1"; + + src = fetchurl { + url = "https://github.com/pdf2htmlEX/pdf2htmlEX/releases/download/v${version}/pdf2htmlEX-${version}-master-20200630-Ubuntu-focal-x86_64.AppImage"; + sha256 = "sha256-Ed4lg6Orzl8UH9f6+x/qLGexWIblRta3Z1xgABLmq4w="; + }; + + meta = with lib; { + license = licenses.gpl3; + platforms = platforms.linux; + description = "Convert PDF to HTML without losing text or format. "; + }; +} diff --git a/.config/nixpkgs/packages/phar-composer/package.nix b/.config/nixpkgs/packages/phar-composer/package.nix new file mode 100644 index 0000000..79ee71b --- /dev/null +++ b/.config/nixpkgs/packages/phar-composer/package.nix @@ -0,0 +1,29 @@ +{ stdenv, fetchurl, makeWrapper, lib, php }: + +stdenv.mkDerivation rec { + + pname = "phar-composer"; + version = "1.4.0"; + + src = fetchurl { + url = "https://github.com/clue/${pname}/releases/download/v${version}/${pname}-${version}.phar"; + sha256 = "sha256-GUKo/l8b0UkQpGHsyagjgtAkZbfmjdhWOXkZT5vLB8A="; + }; + + dontUnpack = true; + nativeBuildInputs = [ makeWrapper ]; + + installPhase = '' + runHook preInstall + mkdir --parents $out/bin + install -D $src $out/libexec/${pname}/${pname}.phar + makeWrapper ${php}/bin/php $out/bin/${pname} --add-flags "$out/libexec/${pname}/${pname}.phar" + runHook postInstall + ''; + + meta = { + license = lib.licenses.mit; + homepage = "https://github.com/clue/phar-composer#readme"; + description = "Simple phar creation for every PHP project managed via Composer."; + }; +} diff --git a/.config/nixpkgs/packages/qprompt/package.nix b/.config/nixpkgs/packages/qprompt/package.nix new file mode 100644 index 0000000..67a4c83 --- /dev/null +++ b/.config/nixpkgs/packages/qprompt/package.nix @@ -0,0 +1,30 @@ +{ lib, stdenv, fetchgit, cmake, extra-cmake-modules, qt5, libsForQt5 }: + +stdenv.mkDerivation rec { + name = "qprompt"; + version = "v1.1.2"; + + src = fetchgit { + rev = version; + url = "https://github.com/Cuperino/QPrompt.git"; + sha256 = "sha256-EeLJC77X9lcjvbr+TkIpMHO0YFdI91tiVUplde3wEzA="; + }; + + buildInputs = [ + cmake + extra-cmake-modules + qt5.wrapQtAppsHook + qt5.qtquickcontrols2.dev + qt5.qtx11extras.dev + libsForQt5.ki18n.dev + libsForQt5.kcoreaddons.dev + libsForQt5.kiconthemes.dev + libsForQt5.kirigami2.dev + ]; + + meta = { + license = with lib.licenses; [ gpl3 cc-by-sa-40 ]; + homepage = "https://github.com/Cuperino/QPrompt#qprompt"; + description = "Personal teleprompter software for all video creators."; + }; +} diff --git a/.config/nixpkgs/packages/redbean/package.nix b/.config/nixpkgs/packages/redbean/package.nix new file mode 100644 index 0000000..7ede4c6 --- /dev/null +++ b/.config/nixpkgs/packages/redbean/package.nix @@ -0,0 +1,29 @@ +{ lib, stdenv, fetchurl }: + +stdenv.mkDerivation rec { + + pname = "redbean"; + version = "2.0.1"; + + src = fetchurl { + url = "https://redbean.dev/redbean-${version}.com"; + sha256 = "sha256-W5GpecQdDwawkrkmENxSqCz40PkyrLh34FtiUwD7Kzk="; + }; + + dontFixup = true; + dontUnpack = true; + + installPhase = '' + runHook preInstall + mkdir --parents $out/bin + cp ${src} $out/bin/${pname}.com + chmod +x $out/bin/${pname}.com + runHook postInstall + ''; + + meta = with lib; { + license = licenses.isc; + platforms = platforms.all; + homepage = "https://github.com/jart/cosmopolitan"; + }; +} diff --git a/.config/nixpkgs/packages/rofi/package.nix b/.config/nixpkgs/packages/rofi/package.nix new file mode 100644 index 0000000..420d2d2 --- /dev/null +++ b/.config/nixpkgs/packages/rofi/package.nix @@ -0,0 +1,49 @@ +{ stdenv, lib, fetchgit, autoreconfHook, pkg-config, libxkbcommon, pango +, which, git, cairo, libxcb, xcbutil, xcbutilwm, xcbutilxrm, xcb-util-cursor +, libstartup_notification, bison, flex, librsvg, check }: + +stdenv.mkDerivation rec { + pname = "rofi-unwrapped"; + version = "1.7.0"; + + src = fetchgit { + rev = version; + fetchSubmodules = true; + url = "https://github.com/davatorium/rofi.git"; + sha256 = "03wdy56b3g8p2czb0qydrddyyhj3x037pirnhyqr5qbfczb9a63v"; + }; + + preConfigure = '' + patchShebangs "script" + # root not present in build /etc/passwd + sed -i 's/~root/~nobody/g' test/helper-expand.c + ''; + + nativeBuildInputs = [ autoreconfHook pkg-config ]; + buildInputs = [ + libxkbcommon + pango + cairo + git + bison + flex + librsvg + check + libstartup_notification + libxcb + xcbutil + xcbutilwm + xcbutilxrm + xcb-util-cursor + which + ]; + + doCheck = false; + + meta = with lib; { + license = licenses.mit; + platforms = with platforms; linux; + homepage = "https://github.com/davatorium/rofi"; + description = "Window switcher, run dialog and dmenu replacement"; + }; +} diff --git a/.config/nixpkgs/packages/ruamel.yaml.cmd/default.nix b/.config/nixpkgs/packages/ruamel.yaml.cmd/default.nix deleted file mode 100644 index f2dc6f9..0000000 --- a/.config/nixpkgs/packages/ruamel.yaml.cmd/default.nix +++ /dev/null @@ -1,69 +0,0 @@ -{ stdenv, python38 }: - -with python38.pkgs; - -let - - meta = with stdenv.lib; { - license = licenses.mit; - description = "Command line utility to manipulate YAML files"; - homepage = "https://sourceforge.net/p/ruamel-yaml-cmd/code/ci/default/tree"; - }; - - ruamel.std.argparse = buildPythonPackage rec { - pname = "ruamel.std.argparse"; - version = "0.8.3"; - src = fetchPypi { - inherit pname version; - sha256 = "0srv4g6jryyaz26csx315pbmfhm4rw8jhfsl7rq7krrglgqwjryi"; - }; - doCheck = false; - inherit meta; - }; - - ruamel.std.convert = buildPythonPackage rec { - pname = "ruamel.yaml.convert"; - version = "0.3.2"; - src = fetchPypi { - inherit pname version; - sha256 = "1i6919b5f5ygj7y7c4x0wi91n8y0mw4nf9f0bcfjk29i594xjph6"; - }; - propagatedBuildInputs = [ python-dateutil ruamel_yaml ]; - doCheck = false; - inherit meta; - }; - - ruamel.yaml.cmd = buildPythonPackage rec { - pname = "ruamel.yaml.cmd"; - version = "0.5.6"; - src = fetchPypi { - inherit pname version; - sha256 = "0zc2h6b721r8c05dm7y8zgrgbvifbgcm8jmqvns7ar4ajll3cvwv"; - }; - propagatedBuildInputs = [ configobj ruamel.std.argparse ruamel.std.convert ]; - patches = [ ./disable-backup-files.patch ]; - doCheck = false; - dontWrapPythonPrograms = true; - inherit meta; - }; - -in buildPythonApplication rec { - - pname = ruamel.yaml.cmd.pname; - version = ruamel.yaml.cmd.version; - propagatedBuildInputs = [ ruamel.yaml.cmd ]; - pythonEnvironment = python38.withPackages (_: propagatedBuildInputs); - - installPhase = '' - runHook preInstall - mkdir -p $out/bin - cp ${ruamel.yaml.cmd}/bin/yaml $out/bin - sed -i 's|^#!.*$|#!${pythonEnvironment}/bin/python3.8|' $out/bin/yaml - runHook postInstall - ''; - - dontUnpack = true; - dontBuild = true; - doCheck = false; - inherit meta; -} diff --git a/.config/nixpkgs/packages/ruamel.yaml.cmd/disable-backup-files.patch b/.config/nixpkgs/packages/ruamel.yaml.cmd/disable-backup-files.patch deleted file mode 100644 index b56e616..0000000 --- a/.config/nixpkgs/packages/ruamel.yaml.cmd/disable-backup-files.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/yaml_cmd.py 2020-12-14 22:13:19.000000000 -0500 -+++ b/yaml_cmd.py 2020-12-14 22:13:34.067115865 -0500 -@@ -513,8 +513,6 @@ - def round_trip_save(self, file_name): - inp = open(file_name).read() - backup_file_name = file_name + '.orig' -- if not os.path.exists(backup_file_name): -- os.rename(file_name, backup_file_name) - return self.round_trip_single(inp, out_file=file_name) - - def round_trip_input(self, inp): diff --git a/.config/nixpkgs/packages/ruamel.yaml.cmd/package.nix b/.config/nixpkgs/packages/ruamel.yaml.cmd/package.nix new file mode 100644 index 0000000..362b4bd --- /dev/null +++ b/.config/nixpkgs/packages/ruamel.yaml.cmd/package.nix @@ -0,0 +1,85 @@ +{ lib, pkgs, python39 }: + +let + + meta = with lib; { + license = licenses.mit; + description = "Command line utility to manipulate YAML files"; + homepage = "https://sourceforge.net/p/ruamel-yaml-cmd/code/ci/default/tree"; + }; + + ruamel.std.argparse = python39.pkgs.buildPythonPackage rec { + pname = "ruamel.std.argparse"; + version = "0.8.3"; + src = python39.pkgs.fetchPypi { + inherit pname version; + sha256 = "0srv4g6jryyaz26csx315pbmfhm4rw8jhfsl7rq7krrglgqwjryi"; + }; + doCheck = false; + inherit meta; + }; + + ruamel.std.convert = python39.pkgs.buildPythonPackage rec { + pname = "ruamel.yaml.convert"; + version = "0.3.2"; + src = python39.pkgs.fetchPypi { + inherit pname version; + sha256 = "1i6919b5f5ygj7y7c4x0wi91n8y0mw4nf9f0bcfjk29i594xjph6"; + }; + propagatedBuildInputs = [ python39.pkgs.python-dateutil python39.pkgs.ruamel_yaml ]; + doCheck = false; + inherit meta; + }; + + ruamel.yaml.cmd = python39.pkgs.buildPythonPackage rec { + pname = "ruamel.yaml.cmd"; + version = "0.5.7"; + src = python39.pkgs.fetchPypi { + inherit pname version; + sha256 = "0w6ralskvjhswqsgxyqm5wpn0an7kj3v2mzf46ipp7b8xirjrc6r"; + }; + propagatedBuildInputs = [ python39.pkgs.configobj ruamel.std.argparse ruamel.std.convert ]; + patches = [ + (pkgs.writeTextFile { + name = "disable-backup-files.patch"; + text = '' + --- a/yaml_cmd.py 2020-12-14 22:13:19.000000000 -0500 + +++ b/yaml_cmd.py 2020-12-14 22:13:34.067115865 -0500 + @@ -513,8 +513,6 @@ + def round_trip_save(self, file_name): + inp = open(file_name).read() + backup_file_name = file_name + '.orig' + - if not os.path.exists(backup_file_name): + - os.rename(file_name, backup_file_name) + return self.round_trip_single(inp, out_file=file_name) + + def round_trip_input(self, inp): + ''; + }) + ]; + doCheck = false; + dontWrapPythonPrograms = true; + inherit meta; + }; + +in python39.pkgs.buildPythonApplication rec { + + pname = ruamel.yaml.cmd.pname; + version = ruamel.yaml.cmd.version; + propagatedBuildInputs = [ ruamel.yaml.cmd ]; + pythonEnvironment = python39.withPackages (_: propagatedBuildInputs); + + installPhase = '' + runHook preInstall + mkdir --parents $out/bin + cp ${ruamel.yaml.cmd}/bin/yaml $out/bin + sed --in-place 's|^#!.*$|#!${pythonEnvironment}/bin/python|' $out/bin/yaml + runHook postInstall + ''; + + dontUnpack = true; + dontBuild = true; + doCheck = false; + format = "other"; + inherit meta; +} diff --git a/.config/nixpkgs/packages/skeema/default.nix b/.config/nixpkgs/packages/skeema/default.nix deleted file mode 100644 index 4017f75..0000000 --- a/.config/nixpkgs/packages/skeema/default.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ stdenv, fetchgit, buildGoModule }: - -buildGoModule rec { - pname = "skeema"; - version = "v1.5.0"; - url = "https://github.com/skeema/skeema"; - - src = fetchgit { - inherit url; - rev = version; - sha256 = "0mrspmgiww0jlpml24r5f4ail8153f2liva88w9760fd5aky3ix3"; - }; - - vendorSha256 = null; - - doCheck = false; - - meta = with stdenv.lib; { - homepage = url; - license = licenses.asl20; - description = "Schema management CLI for MySQL"; - }; -} diff --git a/.config/nixpkgs/packages/sowon/package.nix b/.config/nixpkgs/packages/sowon/package.nix new file mode 100644 index 0000000..38d06b0 --- /dev/null +++ b/.config/nixpkgs/packages/sowon/package.nix @@ -0,0 +1,30 @@ +{ lib, stdenv, fetchgit, SDL2, pkg-config }: + +stdenv.mkDerivation rec { + pname = "sowon"; + version = "85dbbd06e7f20fe0a727fcb34e5206c23894ff83"; + url = "https://github.com/tsoding/sowon.git"; + + src = fetchgit { + inherit url; + rev = version; + sha256 = "06gc1qsn5j902861qfbrixpjdmxyngrhvp312zz82k9gqjsacwyi"; + }; + + buildInputs = [ SDL2 ]; + nativeBuildInputs = [ pkg-config ]; + + installPhase = '' + runHook preInstall + mkdir --parents $out/bin + cp ${pname} $out/bin + runHook postInstall + ''; + + meta = with lib; { + homepage = url; + inherit version; + license = licenses.mit; + description = "Starting Soon Timer for Tsoding Streams"; + }; +} diff --git a/.config/nixpkgs/packages/sqldef/default.nix b/.config/nixpkgs/packages/sqldef/default.nix deleted file mode 100644 index 6829f00..0000000 --- a/.config/nixpkgs/packages/sqldef/default.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ stdenv, fetchgit, buildGoModule }: - -buildGoModule rec { - pname = "sqldef"; - version = "v0.8.9"; - url = "https://github.com/k0kubun/sqldef"; - - src = fetchgit { - inherit url; - rev = version; - sha256 = "1hvx05qwy2g4r1zc1k2f9xv4z815p5jh1a6g41fdlxskjl3kyyf5"; - }; - - vendorSha256 = "066184zmwdhd8dbkbmwds8aimiawfcvb8px8z1q48c949gvywlx7"; - - doCheck = false; - - meta = with stdenv.lib; { - homepage = url; - license = licenses.mit; - description = "Idempotent MySQL/PostgreSQL schema management by SQL"; - }; -} diff --git a/.config/nixpkgs/packages/sqlfluff/default.nix b/.config/nixpkgs/packages/sqlfluff/default.nix deleted file mode 100644 index 0030d31..0000000 --- a/.config/nixpkgs/packages/sqlfluff/default.nix +++ /dev/null @@ -1,58 +0,0 @@ -{ stdenv, fetchgit, python36 }: - -with python36.pkgs; - -let - - bench-it = buildPythonPackage rec { - pname = "bench-it"; - version = "1.0.1"; - src = fetchPypi { - inherit pname version; - sha256 = "0v6kfvgdnjlfmwlafmyjadgllfr8qc1hq83kz9q287gh5nvw851f"; - }; - postPatch = '' - # Avoid building pypandoc - sed -i 's|^import pypandoc.*||' setup.py - sed -i 's|^description = pypandoc.*|description = ""|' setup.py - ''; - doCheck = false; - }; - -in buildPythonApplication rec { - - pname = "sqlfluff"; - url = "https://github.com/sqlfluff/sqlfluff"; - version = "0.4.1"; - - src = fetchgit { - inherit url; - rev = version; - sha256 = "0g53rhdg8b2p3xx9rmkc2fkqnz4fsrmkg98n5fi10s16wscn90kz"; - }; - - propagatedBuildInputs = [ - appdirs - bench-it - cached-property - click - colorama - configparser - dataclasses - diff_cover - jinja2 - oyaml - pathspec - pluggy - typing-extensions - ]; - - doCheck = false; - - meta = with stdenv.lib; { - homepage = url; - license = licenses.mit; - platforms = platforms.linux; - description = "A SQL linter and auto-formatter for Humans"; - }; -} diff --git a/.config/nixpkgs/packages/systemd2nix/default.nix b/.config/nixpkgs/packages/systemd2nix/package.nix index 9d78393..b4c6103 100644 --- a/.config/nixpkgs/packages/systemd2nix/default.nix +++ b/.config/nixpkgs/packages/systemd2nix/package.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchgit, python38 }: +{ lib, fetchgit, python38 }: python38.pkgs.buildPythonApplication rec { @@ -14,14 +14,17 @@ python38.pkgs.buildPythonApplication rec { doCheck = false; dontBuild = true; + format = "other"; installPhase = '' - mkdir -p $out/bin $out/share/${pname} + runHook preInstall + mkdir --parents $out/bin $out/share/${pname} cp ${src}/${pname}.py $out/share/${pname} makeWrapper ${python38}/bin/python $out/bin/${pname} --add-flags $out/share/${pname}/${pname}.py + runHook postInstall ''; - meta = with stdenv.lib; { + meta = with lib; { homepage = url; license = licenses.mit; platforms = platforms.linux; diff --git a/.config/nixpkgs/packages/tiemu/package.nix b/.config/nixpkgs/packages/tiemu/package.nix new file mode 100644 index 0000000..f703981 --- /dev/null +++ b/.config/nixpkgs/packages/tiemu/package.nix @@ -0,0 +1,45 @@ +{ lib, stdenv, fetchurl, fetchpatch, pkg-config, libticalcs2, libticables2 +, libtifiles2, libticonv, gnome2, gtk2, SDL, glib }: + +stdenv.mkDerivation rec { + name = "tiemu"; + version = "3.03"; + src = fetchurl { + url = "http://download.sourceforge.net/project/gtktiemu/tiemu-linux/TIEmu%20${version}/tiemu-${version}-nogdb.tar.gz"; + sha256 = "14m5p1ani7pz23z77h2hibl38sz0i5dpywdhkbr8v2i788487llj"; + }; + + hardeningDisable = [ "format" ]; + preConfigure = ''configureFlags="--without-kde --disable-gdb"''; + + buildInputs = [ + pkg-config + libticables2 + libticalcs2 + libtifiles2 + glib + libticonv + gtk2 + gnome2.libglade + SDL + ]; + + patches = [ + (fetchpatch { + name = "01-build-fix.patch"; + sha256 = "0p4qns6w1hfs3ci6pqpidd2ikjgvpvyd7bnsfj9cx06chwc9sysl"; + url = "https://aur.archlinux.org/cgit/aur.git/plain/01-build-fix.patch?h=tiemu"; + }) + (fetchpatch { + name = "sysdeps.patch"; + sha256 = "1j6gns3vhykizxyb09670a65lafa1xd8wjyl45kvmysv250089z5"; + url = "https://aur.archlinux.org/cgit/aur.git/plain/sysdeps.patch?h=tiemu"; + }) + ]; + + meta = with lib; { + license = licenses.gpl2; + platforms = platforms.linux; + homepage = "http://lpg.ticalc.org/prj_tiemu/"; + }; +} diff --git a/.config/nixpkgs/packages/wf-shell/package.nix b/.config/nixpkgs/packages/wf-shell/package.nix new file mode 100644 index 0000000..42e4121 --- /dev/null +++ b/.config/nixpkgs/packages/wf-shell/package.nix @@ -0,0 +1,32 @@ +{ stdenv, lib, fetchgit, meson, ninja, pkg-config, wayland, alsa-lib, gtkmm3 +, gtk-layer-shell, pulseaudio, wayfire, wf-config, libdbusmenu-gtk3 }: + +stdenv.mkDerivation rec { + pname = "wf-shell"; + version = "9a9af00dc02780357466e27c5e77e316469e7a37"; + + src = fetchgit { + url = "https://github.com/WayfireWM/wf-shell"; + sha256 = "sha256-qkfN6JfAp5UaHXNuU6Jwu87YNCyjEJzVLLy8EUG5UNE"; + }; + + mesonFlags = [ "--sysconfdir" "/etc" ]; + nativeBuildInputs = [ meson ninja pkg-config wayland ]; + + buildInputs = [ + alsa-lib + gtk-layer-shell + gtkmm3 + libdbusmenu-gtk3 + pulseaudio + wayfire + wf-config + ]; + + meta = with lib; { + homepage = "https://github.com/WayfireWM/wf-shell"; + description = "GTK3-based panel for Wayfire"; + license = licenses.mit; + platforms = platforms.unix; + }; +} diff --git a/.config/nixpkgs/packages/x11vnc/default.nix b/.config/nixpkgs/packages/x11vnc/default.nix deleted file mode 100644 index 0507e45..0000000 --- a/.config/nixpkgs/packages/x11vnc/default.nix +++ /dev/null @@ -1,44 +0,0 @@ -{ lib, stdenv, fetchgit, openssl, zlib, libjpeg, xorg -, libvncserver, autoreconfHook, pkg-config }: - -stdenv.mkDerivation rec { - pname = "x11vnc"; - version = "f07df92816ef10b7382a542125955df7f4156a5c"; - - src = fetchgit { - url = "https://github.com/LibVNC/x11vnc"; - rev = version; - sha256 = "1vgkgcqz6fxjgdzqpnw05lg30hdczrfgyzj39z1ips9vcjpb6v8s"; - }; - - nativeBuildInputs = [ autoreconfHook pkg-config ]; - - buildInputs = [ - xorg.libXfixes - xorg.xorgproto - openssl - xorg.libXdamage - zlib - xorg.libX11 - libjpeg - xorg.libXtst - xorg.libXinerama - xorg.libXrandr - xorg.libXext - xorg.libXi - xorg.libXrender - libvncserver - ]; - - preConfigure = '' - configureFlags="--mandir=$out/share/man" - ''; - - meta = with lib; { - description = "A VNC server connected to a real X11 screen"; - homepage = "https://github.com/LibVNC/x11vnc/"; - platforms = platforms.linux; - license = licenses.gpl2; - maintainers = with maintainers; [ OPNA2608 ]; - }; -} diff --git a/.config/nixpkgs/packages/xprintidle/default.nix b/.config/nixpkgs/packages/xprintidle/default.nix deleted file mode 100644 index 975b464..0000000 --- a/.config/nixpkgs/packages/xprintidle/default.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ stdenv, fetchFromGitHub, libX11, libXScrnSaver, libXext, meson, pkg-config -, ninja }: - -stdenv.mkDerivation rec { - pname = "xprintidle"; - version = "0.2.4"; - - src = fetchFromGitHub { - owner = "g0hl1n"; - repo = pname; - rev = version; - sha256 = "10na3ymzfhpq800wsyd23m57ngz69nn5i10c7p9iya8hzi7cf20a"; - }; - - nativeBuildInputs = [ meson pkg-config ninja ]; - - buildInputs = [ libX11 libXScrnSaver libXext ]; - - meta = { - inherit version; - description = "A command-line tool to print idle time from libXss"; - homepage = "https://github.com/g0hl1n/xprintidle"; - license = stdenv.lib.licenses.gpl2; - maintainers = [ stdenv.lib.maintainers.raskin ]; - platforms = stdenv.lib.platforms.linux; - }; -} diff --git a/.config/nixpkgs/packages/yaml2nix/package.nix b/.config/nixpkgs/packages/yaml2nix/package.nix new file mode 100644 index 0000000..af4ae38 --- /dev/null +++ b/.config/nixpkgs/packages/yaml2nix/package.nix @@ -0,0 +1,20 @@ +{ lib, rustPlatform, fetchgit }: + +rustPlatform.buildRustPackage rec { + pname = "yaml2nix"; + version = "b220acf4299376ee1b4131ca4c4248ebf0337d79"; + + src = fetchgit { + rev = version; + url = "https://github.com/euank/yaml2nix.git"; + sha256 = "1i7s18chpqckq16ljy9sh81zvambqkh4hvcyap6xi4yzp2h82198"; + }; + + cargoSha256 = "0bnkznzmyi7iyv4rlkfj8ikkx1ajfhvwd3rrmhrlbx6hbv554fkh"; + + meta = with lib; { + homepage = url; + license = licenses.gpl3; + description = "A command line tool to convert yaml into a nix expression."; + }; +} diff --git a/.config/nixpkgs/packages/youtube-dl/default.nix b/.config/nixpkgs/packages/youtube-dl/default.nix deleted file mode 100644 index 3dc4a27..0000000 --- a/.config/nixpkgs/packages/youtube-dl/default.nix +++ /dev/null @@ -1,56 +0,0 @@ -{ python38Packages, lib, fetchurl, zip, ffmpeg, rtmpdump, phantomjs2 -, atomicparsley, pandoc, generateManPage ? true, ffmpegSupport ? true -, rtmpSupport ? true, phantomjsSupport ? false, hlsEncryptedSupport ? true -, installShellFiles, makeWrapper }: - -python38Packages.buildPythonPackage rec { - - pname = "youtube-dl"; - version = "2020.12.05"; - - src = fetchurl { - url = "https://yt-dl.org/downloads/${version}/${pname}-${version}.tar.gz"; - sha256 = "065s45l8qz7wlkaxw9bj20gq9647zpwdj9vc6chhqjscl63z1aqm"; - }; - - nativeBuildInputs = [ installShellFiles makeWrapper ]; - buildInputs = [ zip ] ++ lib.optional generateManPage pandoc; - propagatedBuildInputs = - lib.optional hlsEncryptedSupport python38Packages.pycryptodome; - - makeWrapperArgs = let - packagesToBinPath = [ atomicparsley ] ++ lib.optional ffmpegSupport ffmpeg - ++ lib.optional rtmpSupport rtmpdump - ++ lib.optional phantomjsSupport phantomjs2; - in [ ''--prefix PATH : "${lib.makeBinPath packagesToBinPath}"'' ]; - - setupPyBuildFlags = [ "build_lazy_extractors" ]; - - postInstall = '' - installShellCompletion youtube-dl.zsh - ''; - - doCheck = false; - - meta = with lib; { - homepage = "https://ytdl-org.github.io/youtube-dl/"; - description = - "Command-line tool to download videos from YouTube.com and other sites"; - longDescription = '' - youtube-dl is a small, Python-based command-line program - to download videos from YouTube.com and a few more sites. - youtube-dl is released to the public domain, which means - you can modify it, redistribute it or use it however you like. - ''; - license = licenses.publicDomain; - platforms = with platforms; linux ++ darwin; - maintainers = with maintainers; [ - bluescreen303 - phreedom - AndersonTorres - fpletz - enzime - ma27 - ]; - }; -} diff --git a/.config/nixpkgs/shells/ansible.nix b/.config/nixpkgs/shells/ansible.nix deleted file mode 100644 index 5da5e38..0000000 --- a/.config/nixpkgs/shells/ansible.nix +++ /dev/null @@ -1,20 +0,0 @@ -with import <nixpkgs> { }; - -let project = "${builtins.getEnv "HOME"}/Shares/Projects/infrastructure/ansible"; - -in mkShell rec { - name = "ansible-mitogen"; - buildInputs = [ python38.pkgs.pip ansible_2_9 ]; - shellHook = '' - export virtualenvs=$HOME/.local/share/virtualenvs - mkdir -p $virtualenvs - python -m venv $virtualenvs/ansible-mitogen - . $virtualenvs/ansible-mitogen/bin/activate - python -m pip install mitogen==0.2.9 - export ANSIBLE_STRATEGY_PLUGINS=$virtualenvs/ansible-mitogen/lib/python3.8/site-packages/ansible_mitogen/plugins - export ANSIBLE_STRATEGY=mitogen_linear - export PS1='\h (${name}) \W \$ ' - cd '${project}' || exit 1 - ssh -T git@github.com - ''; -} diff --git a/.config/nixpkgs/shells/ansible/shell.nix b/.config/nixpkgs/shells/ansible/shell.nix new file mode 100644 index 0000000..96eb244 --- /dev/null +++ b/.config/nixpkgs/shells/ansible/shell.nix @@ -0,0 +1,29 @@ +let + + # nix-shell -E 'import (builtins.fetchurl "$url")' + + name = "nix-shell.ansible"; + + pkgs = import (builtins.fetchTarball { + url = "https://releases.nixos.org/nixos/21.11/nixos-21.11.336020.2128d0aa28e/nixexprs.tar.xz"; + sha256 = "0w8plbxms0di6gnh0k2yhj0pgxzxas7g5x0m01zjzixf16i2bapj"; + }) { }; + + project = "${builtins.getEnv "HOME"}/Shares/Projects/infrastructure/ansible"; + + python = pkgs.python39.withPackages (ps: with ps; [ mitogen ]); + +in pkgs.mkShell { + + inherit name; + + buildInputs = [ python pkgs.ansible_2_10 ]; + + shellHook = '' + export ANSIBLE_STRATEGY_PLUGINS=${python}/lib/*/site-packages/ansible_mitogen/plugins + export ANSIBLE_STRATEGY=mitogen_linear + export PS1='\h (${name}) \W \$ ' + cd '${project}' || exit 1 + ssh -T git@github.com + ''; +} diff --git a/.config/nixpkgs/shells/bubblewrap/shell.nix b/.config/nixpkgs/shells/bubblewrap/shell.nix new file mode 100644 index 0000000..aee8a8b --- /dev/null +++ b/.config/nixpkgs/shells/bubblewrap/shell.nix @@ -0,0 +1,36 @@ +let + + # nix-shell -E 'import (builtins.fetchurl "$url")' + # https://github.com/containers/bubblewrap/blob/main/demos/bubblewrap-shell.sh + # https://manpages.debian.org/testing/bubblewrap/bwrap.1.en.html + + name = "nix-shell.bubblewrap"; + + pkgs = import (builtins.fetchTarball { + url = "https://releases.nixos.org/nixos/22.11/nixos-22.11.466.596a8e828c5/nixexprs.tar.xz"; + sha256 = "1367bad5zz0mfm4czb6p0s0ni38f0x1ffh02z76rx4nranipqbgg"; + }) { }; + + bubblewrap = arguments@{ ... }: pkgs.writeShellApplication { + inherit name; + text = '' + PATH=${pkgs.lib.strings.makeBinPath [ pkgs.bubblewrap ]} + bwrap \ + '' + pkgs.lib.strings.concatStringsSep " \\\n" + (pkgs.lib.attrsets.mapAttrsToList (argument: value: "--${argument} ${value} ") + arguments) + "/bin/sh\n"; + }; + + jail = bubblewrap { + clearenv = ""; + setenv = "PATH ${pkgs.lib.strings.makeBinPath [ pkgs.busybox ]}"; + ro-bind = "/nix /nix" + " --ro-bind /bin /bin"; + }; + +in pkgs.mkShell { + inherit name; + shellHook = '' + printf '%s\n' "${jail}/bin/${jail.name}" + exec "${jail}/bin/${jail.name}" + ''; +} diff --git a/.config/nixpkgs/shells/cake/shell.nix b/.config/nixpkgs/shells/cake/shell.nix new file mode 100644 index 0000000..2991136 --- /dev/null +++ b/.config/nixpkgs/shells/cake/shell.nix @@ -0,0 +1,212 @@ +let + + # nix-shell -E 'import (builtins.fetchurl "$url")' + # NIX_CONFIG="sandbox = relaxed" nix-shell --option builders '' shell.nix + + name = "nix-shell.cake"; + + pkgs = import (builtins.fetchTarball { + url = "https://releases.nixos.org/nixos/23.11/nixos-23.11.6510.a5e4bbcb4780/nixexprs.tar.xz"; + sha256 = "0f73pbh4j89wgk7rn9xp0q8ybw15zkhw0prjz5r37aaryjs8hnbd"; + }) { }; + + alpine = pkgs.fetchurl { + url = "https://dl-cdn.alpinelinux.org/alpine/v3.19/releases/x86_64/alpine-minirootfs-3.19.1-x86_64.tar.gz"; + sha256 = "sha256-GFEjzrbn0I8kSf/1VD2yBv+3nezYFGCNOZrUR+CPop4="; + }; + + cook = { name, src, contents ? [ ], path ? [ ], script ? "", prepare ? "", cleanup ? "" }: pkgs.stdenvNoCC.mkDerivation { + __noChroot = true; + inherit name src contents; + phases = [ "installPhase" ]; + buildInputs = [ pkgs.proot pkgs.rsync pkgs.tree pkgs.kmod ]; + bootstrap = pkgs.writeScript "bootstrap-${name}" '' + ${script} + rm "$0" + ''; + PROOT_NO_SECCOMP = "1"; + installPhase = '' + set -euo pipefail + mkdir --parents rootfs $out/rootfs + tar --extract --file=${src} -C rootfs + + ${prepare} + + cp $bootstrap rootfs/bootstrap + proot --cwd=/ --root-id --rootfs=rootfs /usr/bin/env - /bin/sh -euc 'BASH_VERSION= . /etc/profile && /bootstrap' + printf 'PATH=${pkgs.lib.strings.makeBinPath path}:$PATH' >> rootfs/etc/profile + + [ -n "$contents" ] && { + printf "\n" + for paths in $contents; do + printf "Cooking... Adding %s \n" "$paths" + rsync --copy-dirlinks --relative --archive --chown=0:0 "$paths/" "rootfs" || exit 1 + done + printf "\n" + } || printf '\n%s\n' 'No contents to cook.'; + + ${cleanup} + + printf '\n%s\n\n' "$(du --all --max-depth 1 --human-readable rootfs | sort --human-numeric-sort)" + cp --recursive --no-target-directory rootfs $out/rootfs + ''; + }; + + bake = { name, image, size ? "1G", debug ? false, kernel ? pkgs.linux, options ? [ ], modules ? [ ], uuid ? "99999999-9999-9999-9999-999999999999" }: let + initrd = cook { + name = "initrd-${name}"; + src = alpine; + script = '' + rm -rf home opt media root run srv tmp var + printf '#!/bin/sh -eu + mount -t devtmpfs none /dev + mount -t proc none /proc + mount -t sysfs none /sys + sh /lib/modules/initrd/init + ${pkgs.lib.optionalString (debug) "sh +m"} + mount -r "$(findfs UUID=${uuid})" /mnt + mount -o move /dev /mnt/dev + umount /proc /sys + exec switch_root /mnt /sbin/init + ' > init + chmod +x init + find . ! -name bootstrap ! -name initramfs.cpio | cpio -H newc -ov > initramfs.cpio + gzip -9 initramfs.cpio + ''; + prepare = '' + modules='${pkgs.lib.strings.concatMapStringsSep " " (module: module) modules}' + initrd_directory=rootfs/lib/modules/initrd + [ -n "$modules" ] && { + mkdir --parents "$initrd_directory" + printf "\n" + for module in $modules; do + module_file=$(find ${kernel} -name "$module.ko*" -type f) + module_basename=$(basename "$module_file") + printf "Cooking initrd... Adding module %s \n" "$module" + cp "$module_file" "$initrd_directory" || exit 1 + printf 'insmod /lib/modules/initrd/%s\n' "$module_basename" >> "$initrd_directory/init" + done + } || printf '\n%s\n' 'No modules to cook.' + ''; + }; in pkgs.writeScript name '' + set -euo pipefail + PATH=${pkgs.lib.strings.makeBinPath [ + pkgs.coreutils + pkgs.e2fsprogs + pkgs.gawk + pkgs.rsync + pkgs.syslinux + pkgs.tree + pkgs.utillinux + ]} + IMAGE=${name}.img + LOOP=/dev/loop0 + ROOTFS=rootfs + rm "$IMAGE" || true + fallocate --length ${size} $IMAGE && chmod o+rw "$IMAGE" + printf 'o\nn\np\n1\n2048\n\na\nw\n' | fdisk "$IMAGE" + dd bs=440 count=1 conv=notrunc if=${pkgs.syslinux}/share/syslinux/mbr.bin of="$IMAGE" + mkdir --parents "$ROOTFS" + umount --verbose "$ROOTFS" || true + losetup --detach "$LOOP" || true + losetup --offset "$((2048 * 512))" "$LOOP" "$IMAGE" + mkfs.ext4 -U ${uuid} "$LOOP" + mount --verbose "$LOOP" "$ROOTFS" + rsync --archive --chown=0:0 "${image}/rootfs/" "$ROOTFS"; + mkdir --parents "$ROOTFS/boot" + cp ${kernel}/bzImage "$ROOTFS/boot/vmlinux" + cp ${initrd}/rootfs/initramfs.cpio.gz "$ROOTFS/boot/initrd" + printf ' + DEFAULT linux + LABEL linux + LINUX /boot/vmlinux + INITRD /boot/initrd + APPEND ${pkgs.lib.strings.concatMapStringsSep " " (option: option) options} + ' > "$ROOTFS/boot/syslinux.cfg" + extlinux --heads 64 --sectors 32 --install $ROOTFS/boot + printf '\n%s\n\n' "$(du --max-depth 1 --human-readable $ROOTFS | sort --human-numeric-sort)" + umount --verbose "$ROOTFS" + rm -r "$ROOTFS" + losetup --detach "$LOOP" + ''; + + system = cook { + name = "alpine"; + src = alpine; + contents = [ pkgs.glibc pkgs.gawk ]; + path = [ pkgs.gawk ]; + script = '' + cat /etc/alpine-release + sed -i 's/#ttyS0/ttyS0/' /etc/inittab + printf 'migh7Lib\nmigh7Lib\n' | adduser alpine + ''; + }; + + machine = cook { + name = "alpine"; + src = alpine; + contents = [ pkgs.glibc pkgs.gawk ]; + path = [ pkgs.gawk ]; + script = '' + apk update + apk upgrade + apk add openrc + cat /etc/alpine-release + sed -i 's/#ttyS0/ttyS0/' /etc/inittab + printf 'migh7Lib\nmigh7Lib\n' | adduser alpine + ''; + }; + + virtual-machine = bake { + name = "alpine-machine"; + image = machine; + kernel = pkgs.linuxPackages_5_10.kernel; + options = [ "console=tty1" "console=ttyS0" ]; + size = "128M"; + modules = [ + "virtio" + "virtio_ring" + "virtio_blk" + "virtio_pci" + "jbd2" + "mbcache" + "crc16" + "crc32c_generic" + "ext4" + ]; + }; + + container = { rootfs, binds ? [ ], options ? [] }: + pkgs.writeScript name '' + set -euxo pipefail + PATH=${pkgs.lib.strings.makeBinPath [ pkgs.proot ]} + proot \ + --cwd=/ \ + --rootfs='${rootfs}' \ + ${pkgs.lib.strings.concatMapStringsSep " " (option: "--bind=${option}") binds} \ + ${pkgs.lib.strings.concatMapStringsSep " " (value: value) options} \ + /usr/bin/env - /bin/sh -c '. /etc/profile && sh' + ''; + +in pkgs.mkShell { + + inherit name; + + buildInputs = [ pkgs.proot pkgs.qemu ]; + + shellHook = '' + export PS1='\h (${name}) \W \$ ' + + # sudo ${virtual-machine} + # doas ${virtual-machine} + # qemu-system-x86_64 -nographic -drive if=virtio,file=./${virtual-machine.name}.img,format=raw + # qemu-system-x86_64 -curses -drive if=virtio,file=./${virtual-machine.name}.img,format=raw + + ${container { + rootfs = "${system}/rootfs"; + binds = [ "/proc" "/dev" ]; + options = [ "--verbose=0" ]; + }} + exit + ''; +} diff --git a/.config/nixpkgs/shells/coreboot.nix b/.config/nixpkgs/shells/coreboot.nix deleted file mode 100644 index 57ca4e5..0000000 --- a/.config/nixpkgs/shells/coreboot.nix +++ /dev/null @@ -1,119 +0,0 @@ -# Shell derivation condensed from https://git.petabyte.dev/petabyteboy/corenix - -with import (builtins.fetchTarball { - url = "https://releases.nixos.org/nixos/20.09/nixos-20.09.3824.dec334fa196/nixexprs.tar.xz"; - sha256 = "1i38d1z672gzn73k6gsas2zjbbradg06w7dw3zs9f64l0hr3qd94"; }) { }; - -let - - architecture = "i386"; - url = "https://review.coreboot.org/coreboot"; - project = "${builtins.getEnv "HOME"}/Shares/Projects/coreboot"; - - dependencies = { fetchurl }: [ - rec { name = "Python-3.8.5.tar.xz"; archive = fetchurl { sha256 = "1c43dbv9lvlp3ynqmgdi4rh8q94swanhqarqrdx62zmigpakw073"; url = "https://www.python.org/ftp/python/3.8.5/${name}"; }; } - rec { name = "acpica-unix2-20200717.tar.gz"; archive = fetchurl { sha256 = "0jyy71szjr40c8v40qqw6yh3gfk8d6sl3nay69zrn5d88i3r0jca"; url = "https://acpica.org/sites/acpica/files/${name}"; }; } - rec { name = "binutils-2.35.tar.xz"; archive = fetchurl { sha256 = "119g6340ksv1jkg6bwaxdp2whhlly22l9m30nj6y284ynjgna48v"; url = "https://ftpmirror.gnu.org/binutils/${name}"; }; } - rec { name = "clang-10.0.1.src.tar.xz"; archive = fetchurl { sha256 = "091bvcny2lh32zy8f3m9viayyhb2zannrndni7325rl85cwgr6pr"; url = "https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.1/${name}"; }; } - rec { name = "clang-tools-extra-10.0.1.src.tar.xz"; archive = fetchurl { sha256 = "06n1yp638rh24xdxv9v2df0qajxbjz4w59b7dd4ky36drwmpi4yh"; url = "https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.1/${name}"; }; } - rec { name = "cmake-3.18.1.tar.gz"; archive = fetchurl { sha256 = "0215srmc9l7ygwdpfms8yx0wbd96qgz2d58ykmdiarvysf5k7qy0"; url = "https://cmake.org/files/v3.18/${name}"; }; } - rec { name = "compiler-rt-10.0.1.src.tar.xz"; archive = fetchurl { sha256 = "1yjqjri753w0fzmxcyz687nvd97sbc9rsqrxzpq720na47hwh3fr"; url = "https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.1/${name}"; }; } - rec { name = "expat-2.2.9.tar.bz2"; archive = fetchurl { sha256 = "0dx2m58gkj7cadk51lmp54ma7cqjhff4kjmwv8ks80j3vj2301pi"; url = "https://downloads.sourceforge.net/sourceforge/expat/${name}"; }; } - rec { name = "gcc-8.3.0.tar.xz"; archive = fetchurl { sha256 = "0b3xv411xhlnjmin2979nxcbnidgvzqdf4nbhix99x60dkzavfk4"; url = "https://ftpmirror.gnu.org/gcc/gcc-8.3.0/${name}"; }; } - rec { name = "gdb-9.2.tar.xz"; archive = fetchurl { sha256 = "0mf5fn8v937qwnal4ykn3ji1y2sxk0fa1yfqi679hxmpg6pdf31n"; url = "https://ftpmirror.gnu.org/gdb/${name}"; }; } - rec { name = "gmp-6.2.0.tar.xz"; archive = fetchurl { sha256 = "09hmg8k63mbfrx1x3yy6y1yzbbq85kw5avbibhcgrg9z3ganr3i5"; url = "https://ftpmirror.gnu.org/gmp/${name}"; }; } - rec { name = "llvm-10.0.1.src.tar.xz"; archive = fetchurl { sha256 = "1wydhbp9kyjp5y0rc627imxgkgqiv3dfirbqil9dgpnbaw5y7n65"; url = "https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.1/${name}"; }; } - rec { name = "mpc-1.2.0.tar.gz"; archive = fetchurl { sha256 = "19pxx3gwhwl588v496g3aylhcw91z1dk1d5x3a8ik71sancjs3z9"; url = "https://ftpmirror.gnu.org/mpc/${name}"; }; } - rec { name = "mpfr-4.1.0.tar.xz"; archive = fetchurl { sha256 = "0zwaanakrqjf84lfr5hfsdr7hncwv9wj0mchlr7cmxigfgqs760c"; url = "https://ftpmirror.gnu.org/mpfr/${name}"; }; } - rec { name = "nasm-2.15.03.tar.bz2"; archive = fetchurl { sha256 = "0y6p3d5lhmwzvgi85f00sz6c485ir33zd1nskzxby4pikcyk9rq4"; url = "https://www.nasm.us/pub/nasm/releasebuilds/2.15.03/${name}"; }; } - ]; - - toolchain = stdenv.mkDerivation rec { - pname = "crossgcc-${architecture}"; - version = "4.13"; - src = fetchgit { - inherit url; - rev = version; - sha256 = "0xwzwplyf2zc267ddprh7963p582q3jrdvxc7r4cwzj0lhgrv6rv"; - fetchSubmodules = true; - }; - - nativeBuildInputs = [ curl m4 flex bison zlib gnat ]; - - buildPhase = '' - mkdir -p util/crossgcc/tarballs - ${lib.concatMapStringsSep "\n" - (file: "ln -s ${file.archive} util/crossgcc/tarballs/${file.name}") - (callPackage dependencies { })} - NIX_HARDENING_ENABLE="$\{NIX_HARDENING_ENABLE/ format/\}" make crossgcc-i386 CPUS=$(nproc) - ''; - - installPhase = '' - runHook preInstall - cp -r util/crossgcc $out - runHook postInstall - ''; - }; - -in mkShell { - - name = "coreboot"; - - buildInputs = [ git coreboot-utils flashrom me_cleaner ncurses qemu m4 flex bison zlib gnat ]; - - shellHook = '' - export PS1='\h (coreboot) \W \$ ' - - mkdir -p '${project}' - git clone '${url}' '${project}' || true - cd '${project}' || exit 1 - - [ ! -L util/crossgcc ] && rm -rf util/crossgcc - ln -sf ${toolchain} util/crossgcc - - printf " - **** COMMANDS **** - - # view toolchain help - make help_toolchain - - # clear old configuration - make distclean - - # build i386, Aarch64, and RISC-V toolchain - make crossgcc-i386 CPUS=$(nproc) - make crossgcc-aarch64 CPUS=$(nproc) - make crossgcc-riscv CPUS=$(nproc) - - # build coreinfo payload - make -C payloads/coreinfo olddefconfig - make -C payloads/coreinfo - - # setup configurtion - make nconfig - select 'Mainboard' menu - Beside 'Mainboard vendor' should be '(Emulation)' - Beside 'Mainboard model' should be 'QEMU x86 i440fx/piix4' - select < Exit > - - select 'Payload' menu - select 'Add a Payload' - choose 'An Elf executable payload' - select 'Payload path and filename' - enter 'payloads/coreinfo/build/coreinfo.elf' - select < Exit > - select < Exit > - select < Yes > - - # check configuration - make savedefconfig - cat defconfig - - # build coreboot - make - - # test image in qemu - qemu-system-x86_64 -bios build/coreboot.rom -serial stdio - " - ''; -} diff --git a/.config/nixpkgs/shells/coreboot/shell.nix b/.config/nixpkgs/shells/coreboot/shell.nix new file mode 100644 index 0000000..242c621 --- /dev/null +++ b/.config/nixpkgs/shells/coreboot/shell.nix @@ -0,0 +1,108 @@ +let + + # Shell derivation condensed from https://git.petabyte.dev/petabyteboy/corenix + + # nix-shell -E 'import (builtins.fetchurl "$url")' + + name = "nix-shell.coreboot"; + architecture = "i386"; + url = "https://review.coreboot.org/coreboot"; + project = "${builtins.getEnv "HOME"}/Shares/Projects/coreboot"; + + pkgs = import (builtins.fetchTarball { + url = "https://releases.nixos.org/nixos/20.09/nixos-20.09.3824.dec334fa196/nixexprs.tar.xz"; + sha256 = "1i38d1z672gzn73k6gsas2zjbbradg06w7dw3zs9f64l0hr3qd94"; }) {}; + + dependencies = { fetchurl }: [ + rec { name = "llvm-${version}.src.tar.xz"; version = "11.0.0"; archive = fetchurl { sha256 = "0s94lwil98w7zb7cjrbnxli0z7gklb312pkw74xs1d6zk346hgwi"; url = "https://github.com/llvm/llvm-project/releases/download/llvmorg-${version}/${name}"; }; } + rec { name = "clang-${version}.src.tar.xz"; version = "11.0.0"; archive = fetchurl { sha256 = "091bvcny2lh32zy8f3m9viayyhb2zannrndni7325rl85cwgr6pr"; url = "https://github.com/llvm/llvm-project/releases/download/llvmorg-${version}/${name}"; }; } + rec { name = "clang-tools-extra-${version}.src.tar.xz"; version = "11.0.0"; archive = fetchurl { sha256 = "02bcwwn54661madhq4nxc069s7p7pj5gpqi8ww50w3anbpviilzy"; url = "https://github.com/llvm/llvm-project/releases/download/llvmorg-${version}/${name}"; }; } + rec { name = "compiler-rt-${version}.src.tar.xz"; version = "11.0.0"; archive = fetchurl { sha256 = "1yjqjri753w0fzmxcyz687nvd97sbc9rsqrxzpq720na47hwh3fr"; url = "https://github.com/llvm/llvm-project/releases/download/llvmorg-${version}/${name}"; }; } + rec { name = "Python-${version}.tar.xz"; version = "3.8.5"; archive = fetchurl { sha256 = "1c43dbv9lvlp3ynqmgdi4rh8q94swanhqarqrdx62zmigpakw073"; url = "https://www.python.org/ftp/python/${version}/${name}"; }; } + rec { name = "acpica-unix2-${version}.tar.gz"; version = "20200925"; archive = fetchurl { sha256 = "18n6129fkgj85piid7v4zxxksv3h0amqp4p977vcl9xg3bq0zd2w"; url = "https://acpica.org/sites/acpica/files/${name}"; }; } + rec { name = "binutils-${version}.tar.xz"; version = "2.35.1"; archive = fetchurl { sha256 = "01w6xvfy7sjpw8j08k111bnkl27j760bdsi0wjvq44ghkgdr3v9w"; url = "https://ftpmirror.gnu.org/binutils/${name}"; }; } + rec { name = "cmake-${version}.1.tar.gz"; version = "3.18"; archive = fetchurl { sha256 = "0215srmc9l7ygwdpfms8yx0wbd96qgz2d58ykmdiarvysf5k7qy0"; url = "https://cmake.org/files/v${version}/${name}"; }; } + rec { name = "expat-${version}.tar.bz2"; version = "2.2.9"; archive = fetchurl { sha256 = "0dx2m58gkj7cadk51lmp54ma7cqjhff4kjmwv8ks80j3vj2301pi"; url = "https://distfiles.macports.org/expat/${name}"; }; } + rec { name = "gcc-${version}.tar.xz"; version = "8.3.0"; archive = fetchurl { sha256 = "0b3xv411xhlnjmin2979nxcbnidgvzqdf4nbhix99x60dkzavfk4"; url = "https://ftpmirror.gnu.org/gcc/gcc-${version}/${name}"; }; } + rec { name = "gdb-${version}.tar.xz"; version = "9.2"; archive = fetchurl { sha256 = "0mf5fn8v937qwnal4ykn3ji1y2sxk0fa1yfqi679hxmpg6pdf31n"; url = "https://ftpmirror.gnu.org/gdb/${name}"; }; } + rec { name = "gmp-${version}.tar.xz"; version = "6.2.0"; archive = fetchurl { sha256 = "09hmg8k63mbfrx1x3yy6y1yzbbq85kw5avbibhcgrg9z3ganr3i5"; url = "https://ftpmirror.gnu.org/gmp/${name}"; }; } + rec { name = "mpc-${version}.tar.gz"; version = "1.2.0"; archive = fetchurl { sha256 = "19pxx3gwhwl588v496g3aylhcw91z1dk1d5x3a8ik71sancjs3z9"; url = "https://ftpmirror.gnu.org/mpc/${name}"; }; } + rec { name = "mpfr-${version}.tar.xz"; version = "4.1.0"; archive = fetchurl { sha256 = "0zwaanakrqjf84lfr5hfsdr7hncwv9wj0mchlr7cmxigfgqs760c"; url = "https://ftpmirror.gnu.org/mpfr/${name}"; }; } + rec { name = "nasm-${version}.tar.bz2"; version = "2.15.05"; archive = fetchurl { sha256 = "1l1gxs5ncdbgz91lsl4y7w5aapask3w02q9inayb2m5bwlwq6jrw"; url = "https://www.nasm.us/pub/nasm/releasebuilds/${version}/${name}"; }; } + ]; + + toolchain = pkgs.stdenv.mkDerivation rec { + pname = "crossgcc-${architecture}"; + version = "4.14"; + src = pkgs.fetchgit { + inherit url; + rev = version; + fetchSubmodules = true; + sha256 = "00xr74yc0kj9rrqa1a8b7bih865qlp9i4zs67ysavkfrjrwwssxm"; + }; + + hardeningDisable = [ "format" ]; + nativeBuildInputs = builtins.attrValues { inherit (pkgs) curl m4 flex bison zlib gnat; }; + + buildPhase = '' + mkdir --parents util/crossgcc/tarballs + ${pkgs.lib.concatMapStringsSep "\n" (file: "ln -s ${file.archive} util/crossgcc/tarballs/${file.name}") (pkgs.callPackage dependencies { })} + sed "s/SOURCE_DATE_EPOCH := .*/SOURCE_DATE_EPOCH := $SOURCE_DATE_EPOCH/" --in-place Makefile + make crossgcc-${architecture} CPUS=$(nproc) + ''; + + installPhase = '' + runHook preInstall + cp -r util/crossgcc $out + runHook postInstall + ''; + }; + +in pkgs.mkShell { + + inherit name; + + buildInputs = builtins.attrValues { inherit (pkgs) git coreboot-utils flashrom me_cleaner ncurses qemu m4 flex bison zlib gnat; }; + + shellHook = '' + export PS1='\h (${name}) \W \$ ' + mkdir -p '${project}' + git clone '${url}' '${project}' || true + cd '${project}' || exit 1 + rm -rf util/crossgcc + git fetch --all + git reset --hard origin/master + git checkout ${toolchain.version} + rm -rf util/crossgcc + ln -sf ${toolchain} util/crossgcc + sed -i 's|$(OBJCOPY) --strip-$(STRIP) $< $@|$(OBJCOPY) --strip-debug $< $@|g' payloads/libpayload/Makefile.payload + + printf ' + flashrom --programmer internal # read BIOS chipset internally if possible + flashrom --programmer internal --read backup.rom --chip $chipset # read BIOS internally if possible with selected chipset + flashrom --programmer internal --read backup1.rom --chip $chipset + flashrom --programmer internal --read backup2.rom --chip $chipset + flashrom --programmer internal --read backup3.rom --chip $chipset + flashrom --programmer ch341a_spi --read backup.rom --chip $chipset # use an external programmer if internal does not work + sha256sum *.rom # check BIOS hashes for exactness + me_cleaner.py --soft-disable backup.rom # clean management engine and overwrite bios inplace + ifdtool --extract backup.rom # split regions of cleaned bios + + # Rename and move descriptor.bin, gbe.bin, me.bin into 3rdparty/blobs/mainboard/$vendor/$model where + # $vendor and $model are variable (for example lenovo/t420). Create folders if they do not exist. + # To test in qemu select model/vendor Emulation/QEMU x86 i440fx/piix4 in nconfig. + # In real world situations, one might only read and write internally to the bios region. + + flashrom --programmer internal --read bios.rom --chip $chipset --ifd --image bios + flashrom --programmer internal --write bios.rom --chip $chipset --ifd --image bios + + make distclean # clear old configuration + make clean # clear old compilation and keep configuration + make nconfig # setup configurtion + cat .config # check configuration + make # build coreboot + qemu-system-x86_64 -bios build/coreboot.rom -serial stdio # test image in qemu + + ' + ''; +} diff --git a/.config/nixpkgs/shells/falcon.nix b/.config/nixpkgs/shells/falcon/shell.nix index 0d1a76e..7bd0b54 100644 --- a/.config/nixpkgs/shells/falcon.nix +++ b/.config/nixpkgs/shells/falcon/shell.nix @@ -1,19 +1,24 @@ -with import (builtins.fetchTarball { - url = "https://github.com/NixOS/nixpkgs/archive/360e2af4f87.tar.gz"; - sha256 = "1i3i9cpn6m3r07pgw4w3xinbqmxkm7pmnqjlz96x424ngbc21sg2"; }) {}; - let + + # nix-shell -E 'import (builtins.fetchurl "$url")' + + name = "nix-shell.falcon-kernel"; + + pkgs = import (builtins.fetchTarball { + url = "https://github.com/NixOS/nixpkgs/archive/360e2af4f87.tar.gz"; + sha256 = "1i3i9cpn6m3r07pgw4w3xinbqmxkm7pmnqjlz96x424ngbc21sg2"; }) {}; + project = "${builtins.getEnv "HOME"}/Desktop/moto-falcon/lineageos-kernel/lineageos-motorala-msm8226"; - toolchain = stdenv.mkDerivation rec { + toolchain = pkgs.stdenv.mkDerivation rec { name = "gcc-linaro-4.9.4"; src = builtins.fetchTarball { url = "https://releases.linaro.org/components/toolchain/binaries/4.9-2017.01/arm-linux-gnueabihf/gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabihf.tar.xz"; sha256 = "11zznrx0hkq34bn7x7kxn5q9icrf22vqgmd1ifxmdskm2g14x3l8"; }; dontBuild = true; - buildInputs = [ python2 zlib ncurses5 expat lzma ]; - nativeBuildInputs = [ autoPatchelfHook ]; + buildInputs = builtins.attrValues { inherit (pkgs) python2 zlib ncurses5 expat lzma; }; + nativeBuildInputs = builtins.attrValues { inherit (pkgs) autoPatchelfHook; }; installPhase = '' runHook preInstall mkdir $out @@ -22,18 +27,16 @@ let ''; }; -in - -mkShell { +in pkgs.mkShell { - name = "falcon-kernel"; + inherit name; - buildInputs = [ gnumake ncurses ]; + buildInputs = builtins.attrValues { inherit (pkgs) gnumake ncurses; }; shellHook = '' export CROSS_COMPILE=${toolchain}/bin/arm-linux-gnueabihf- export ARCH=arm - export PS1='\h (falcon kernel) \W \$ ' + export PS1='\h (${name}) \W \$ ' cd '${project}' || exit 1 ''; } diff --git a/.config/nixpkgs/shells/firejail/shell.nix b/.config/nixpkgs/shells/firejail/shell.nix new file mode 100644 index 0000000..4f5e5e1 --- /dev/null +++ b/.config/nixpkgs/shells/firejail/shell.nix @@ -0,0 +1,48 @@ +let + + # nix-shell -E 'import (builtins.fetchurl "$url")' + # https://www.man7.org/linux/man-pages/man1/Firejail.1.html + + name = "nix-shell.firejail"; + + pkgs = import (builtins.fetchTarball { + url = "https://releases.nixos.org/nixos/22.11/nixos-22.11.466.596a8e828c5/nixexprs.tar.xz"; + sha256 = "1367bad5zz0mfm4czb6p0s0ni38f0x1ffh02z76rx4nranipqbgg"; + }) { }; + + firejail = { + rootfs ? "rootfs", + options ? [ ], + path ? [ pkgs.busybox ], + entrypoint ? "/bin/sh" + }: + pkgs.writeShellApplication { + inherit name; + text = '' + set -euxo pipefail + PATH=${pkgs.lib.strings.makeBinPath [ pkgs.firejail pkgs.coreutils ]} + mkdir --parents '${rootfs}' + firejail \ + --chroot '${rootfs}' \ + ${pkgs.lib.strings.concatMapStringsSep " " (value: value) options} \ + -- /usr/bin/env --ignore-environment ${ + pkgs.writeScript "entrypoint-${name}" '' + set -eu + export PATH=${pkgs.lib.strings.makeBinPath path} + ${entrypoint} + '' + }; + ''; + }; + + jail = firejail { + options = [ ]; + }; + +in pkgs.mkShell { + inherit name; + shellHook = '' + printf '%s\n' "${jail}/bin/${jail.name}" + exec "${jail}/bin/${jail.name}" + ''; +} diff --git a/.config/nixpkgs/shells/larynx-server/shell.nix b/.config/nixpkgs/shells/larynx-server/shell.nix new file mode 100644 index 0000000..9021e47 --- /dev/null +++ b/.config/nixpkgs/shells/larynx-server/shell.nix @@ -0,0 +1,54 @@ +let + + name = "nix-shell.larynx-server"; + + nixpkgs = import <nixpkgs> { }; + + pkgs = import (builtins.fetchTarball { + url = "https://releases.nixos.org/nixos/22.11/nixos-22.11.466.596a8e828c5/nixexprs.tar.xz"; + sha256 = "1367bad5zz0mfm4czb6p0s0ni38f0x1ffh02z76rx4nranipqbgg"; + }) { }; + + larynx = pkgs.stdenvNoCC.mkDerivation rec { + name = "larynx"; + version = "1.1.0"; + sourceRoot = "."; + + src = pkgs.dockerTools.exportImage { + fromImage = pkgs.dockerTools.pullImage rec { + imageName = "rhasspy/larynx"; + imageDigest = "sha256:ada5b443e2446b38ba61d764ec37c0ed78d46e659a011243967e7cc8e52311e3"; + sha256 = "sha256-TbaHNNMRGp4SWYC06WSmNr3igpiJagDKoD3TEnttYt8="; + finalImageName = imageName; + finalImageTag = version; + }; + diskSize = "3072"; + }; + + phases = [ "unpackPhase" "installPhase" ]; + + installPhase = '' + mkdir --parents $out/bin/larynx/app + cp --recursive home/larynx/app/.venv $out/bin/larynx/app + cp --recursive home/larynx/app/larynx $out/bin/larynx/app + ''; + }; + + fhs = pkgs.buildFHSUserEnv { + name = "larynx-server"; + runScript = "${pkgs.writeScriptBin name '' + export PYTHONPATH=/bin/larynx/app + /bin/larynx/app/.venv/bin/python3 -m larynx.server + ''}/bin/${name}"; + targetPkgs = pkgs: [ + larynx + pkgs.python39 + ]; + profile = "export FHS=1"; + }; + +in pkgs.mkShell { + inherit fhs; + inherit name; + shellHook = "exec ${fhs}/bin/${fhs.name}"; +} diff --git a/.config/nixpkgs/shells/larynx/shell.nix b/.config/nixpkgs/shells/larynx/shell.nix new file mode 100644 index 0000000..ac2e940 --- /dev/null +++ b/.config/nixpkgs/shells/larynx/shell.nix @@ -0,0 +1,54 @@ +let + + name = "nix-shell.larynx"; + + nixpkgs = import <nixpkgs> { }; + + pkgs = import (builtins.fetchTarball { + url = "https://releases.nixos.org/nixos/22.11/nixos-22.11.466.596a8e828c5/nixexprs.tar.xz"; + sha256 = "1367bad5zz0mfm4czb6p0s0ni38f0x1ffh02z76rx4nranipqbgg"; + }) { }; + + larynx = pkgs.stdenvNoCC.mkDerivation rec { + name = "larynx"; + version = "1.1.0"; + sourceRoot = "."; + + src = pkgs.dockerTools.exportImage { + fromImage = pkgs.dockerTools.pullImage rec { + imageName = "rhasspy/larynx"; + imageDigest = "sha256:ada5b443e2446b38ba61d764ec37c0ed78d46e659a011243967e7cc8e52311e3"; + sha256 = "sha256-TbaHNNMRGp4SWYC06WSmNr3igpiJagDKoD3TEnttYt8="; + finalImageName = imageName; + finalImageTag = version; + }; + diskSize = "3072"; + }; + + phases = [ "unpackPhase" "installPhase" ]; + + installPhase = '' + mkdir --parents $out/bin/larynx/app + cp --recursive home/larynx/app/.venv $out/bin/larynx/app + cp --recursive home/larynx/app/larynx $out/bin/larynx/app + ''; + }; + + fhs = pkgs.buildFHSUserEnv { + name = "larynx"; + runScript = "${pkgs.writeScriptBin name '' + export PYTHONPATH=/bin/larynx/app + /bin/larynx/app/.venv/bin/python3 -m larynx "$@" + ''}/bin/${name}"; + targetPkgs = pkgs: [ + larynx + pkgs.python39 + ]; + profile = "export FHS=1"; + }; + +in pkgs.mkShell { + inherit fhs; + inherit name; + shellHook = "exec ${fhs}/bin/${fhs.name}"; +} diff --git a/.config/nixpkgs/shells/mermaid-live-editor/shell.nix b/.config/nixpkgs/shells/mermaid-live-editor/shell.nix new file mode 100644 index 0000000..db89a42 --- /dev/null +++ b/.config/nixpkgs/shells/mermaid-live-editor/shell.nix @@ -0,0 +1,74 @@ +let + + name = "nix-shell.mermaid-live-editor"; + version = "bf6c54c00e84d8c7d541920607db72f50d775ba5"; + + pkgs = import (builtins.fetchTarball { + url = "https://releases.nixos.org/nixos/22.11/nixos-22.11.466.596a8e828c5/nixexprs.tar.xz"; + sha256 = "1367bad5zz0mfm4czb6p0s0ni38f0x1ffh02z76rx4nranipqbgg"; + }) { }; + + package = pkgs.callPackage ({ lib, stdenv, fetchgit, mkYarnModules }: + + stdenv.mkDerivation rec { + inherit version; + pname = "mermaid-live-editor-node-modules"; + + src = fetchgit { + rev = version; + url = "https://github.com/mermaid-js/mermaid-live-editor.git"; + sha256 = "sha256-SadZzBruGKh4LCR9vr87vl/HBEgVN8Qczi9+thGmNCE="; + }; + + node_modules = mkYarnModules { + inherit pname version; + yarnLock = "${src}/yarn.lock"; + packageJSON = "${src}/package.json"; + }; + + installPhase = '' + runHook preInstall + mkdir $out + cp --recursive --no-target-directory ${node_modules} $out + cd $out/node_modules + chmod +w . + ln --symbolic mermaid-live-editor/node_modules/svelte-preprocess . + runHook postInstall + ''; + + meta = with lib; { + homepage = url; + license = licenses.mit; + description = "Edit, preview and share mermaid charts/diagrams. New implementation of the live editor."; + }; + }) { }; + + shell = pkgs.writeShellApplication { + inherit name; + text = '' + /usr/bin/env --ignore-environment /bin/sh -c ${ + pkgs.writeScript name '' + export PS1='\h (${name}) \W \$ ' + export PATH=${ + pkgs.lib.strings.makeBinPath [ + package + pkgs.busybox + pkgs.git + pkgs.yarn + ] + } + git clone https://github.com/mermaid-js/mermaid-live-editor.git + cd mermaid-live-editor + git checkout '${version}' + ln -sf '${package}/node_modules' + stat .svelte-kit || yarn build + yarn preview + '' + }; + ''; + }; + +in pkgs.mkShell { + inherit name; + shellHook = "exec ${shell}/bin/${shell.name}"; +} diff --git a/.config/nixpkgs/shells/nixops.nix b/.config/nixpkgs/shells/nixops.nix deleted file mode 100644 index 03756cd..0000000 --- a/.config/nixpkgs/shells/nixops.nix +++ /dev/null @@ -1,19 +0,0 @@ -with import <nixpkgs> { }; - -let - - version = "20.09"; - project = "${builtins.getEnv "HOME"}/Shares/Projects/infrastructure"; - channel = (import "${project}/nixos/versions.nix")."${version}".channel; - -in mkShell { - name = "nixops-${version}"; - shellHook = '' - export VAULT_ADDR='http://vault.test' - export NIX_PATH=${channel}/nixexprs.tar.xz - export _NIX_CHANNEL=${channel} - export PS1='\h (nixos ${version} ''${_NIX_CHANNEL##*.}) \W \$ ' - cd '${project}' || exit 1 - ssh -T git@github.com - ''; -} diff --git a/.config/nixpkgs/shells/nsjail/shell.nix b/.config/nixpkgs/shells/nsjail/shell.nix new file mode 100644 index 0000000..d954588 --- /dev/null +++ b/.config/nixpkgs/shells/nsjail/shell.nix @@ -0,0 +1,52 @@ +let + + # nix-shell -E 'import (builtins.fetchurl "$url")' + # https://nsjail.dev/ + + name = "nix-shell.nsjail"; + + pkgs = import (builtins.fetchTarball { + url = "https://releases.nixos.org/nixos/22.11/nixos-22.11.466.596a8e828c5/nixexprs.tar.xz"; + sha256 = "1367bad5zz0mfm4czb6p0s0ni38f0x1ffh02z76rx4nranipqbgg"; + }) { }; + + nsjail = { + rootfs ? "rootfs", + options ? [ ], + path ? [ pkgs.busybox ], + entrypoint ? "/bin/sh" + }: + pkgs.writeShellApplication { + inherit name; + text = '' + set -euxo pipefail + PATH=${pkgs.lib.strings.makeBinPath [ pkgs.nsjail pkgs.coreutils ]} + mkdir --parents '${rootfs}' + nsjail \ + --chroot "$(pwd)"/'${rootfs}' \ + ${pkgs.lib.strings.concatMapStringsSep " " (value: value) options} \ + -- /usr/bin/env --ignore-environment ${ + pkgs.writeScript "entrypoint-${name}" '' + set -eu + export PATH=${pkgs.lib.strings.makeBinPath path} + ${entrypoint} + '' + }; + ''; + }; + + jail = nsjail { + options = [ + "--bindmount_ro /nix" + "--bindmount_ro /usr" + "--bindmount_ro /bin" + ]; + }; + +in pkgs.mkShell { + inherit name; + shellHook = '' + printf '%s\n' "${jail}/bin/${jail.name}" + exec "${jail}/bin/${jail.name}" + ''; +} diff --git a/.config/nixpkgs/shells/planner/shell.nix b/.config/nixpkgs/shells/planner/shell.nix new file mode 100644 index 0000000..079beda --- /dev/null +++ b/.config/nixpkgs/shells/planner/shell.nix @@ -0,0 +1,68 @@ +let + + name = "nix-shell.planner"; + + pkgs = (import (builtins.fetchTarball { + url = "https://releases.nixos.org/nixos/21.11/nixos-21.11.336020.2128d0aa28e/nixexprs.tar.xz"; + sha256 = "0w8plbxms0di6gnh0k2yhj0pgxzxas7g5x0m01zjzixf16i2bapj"; + }) { }); + + package = pkgs.callPackage ({ lib, stdenvNoCC, fetchgit, pkgconfig, intltool + , automake111x, autoconf, libtool, gnome2, libxslt, python2, gcc48 }: + stdenvNoCC.mkDerivation rec { + pname = "planner"; + version = "de43d655f9f8103993129cde9de3d0e080d0546c"; + src = fetchgit { + url = "https://gitlab.gnome.org/World/planner.git"; + sha256 = "1zpcswdpcjhllk7phy3z1zyxcgqr4pp0vf5fgpg5f3gqpk4xvwyg"; + rev = version; + }; + nativeBuildInputs = [ + autoconf + automake111x + gnome2.gnome-common + gnome2.gtk-doc + gnome2.scrollkeeper + intltool + libtool + pkgconfig + ]; + buildInputs = [ + gcc48 + gnome2.GConf + gnome2.gtk + gnome2.libglade + gnome2.libgnomecanvas + gnome2.libgnomeui + libxslt + python2.pkgs.pygtk + ]; + enableParallelBuilding = true; + preConfigure = "./autogen.sh"; + makeFlags = [ "CFLAGS=-DGLIB_DISABLE_DEPRECATION_WARNINGS" ]; + configureFlags = [ "--enable-python" "--enable-python-plugin" ]; + meta = with lib; { + description = "Project management application for GNOME"; + homepage = "https://wiki.gnome.org/Apps/Planner"; + license = licenses.gpl2Plus; + platforms = platforms.all; + }; + }) { }; + + shell = pkgs.writeShellApplication { + inherit name; + text = '' + /usr/bin/env --ignore-environment /bin/sh -c ${ + pkgs.writeScript name '' + export PS1='\h (${name}) \W \$ ' + export PATH=${pkgs.lib.strings.makeBinPath [ package pkgs.busybox ]} + /bin/sh + '' + }; + ''; + }; + +in pkgs.mkShell { + inherit name package; + shellHook = "exec ${shell}/bin/${shell.name}"; +} diff --git a/.config/nixpkgs/shells/proot/shell.nix b/.config/nixpkgs/shells/proot/shell.nix new file mode 100644 index 0000000..46ed76f --- /dev/null +++ b/.config/nixpkgs/shells/proot/shell.nix @@ -0,0 +1,52 @@ +let + + # nix-shell -E 'import (builtins.fetchurl "$url")' + # https://manpages.ubuntu.com/manpages/trusty/man1/proot.1.html + + name = "nix-shell.proot"; + + pkgs = import (builtins.fetchTarball { + url = "https://releases.nixos.org/nixos/22.11/nixos-22.11.466.596a8e828c5/nixexprs.tar.xz"; + sha256 = "1367bad5zz0mfm4czb6p0s0ni38f0x1ffh02z76rx4nranipqbgg"; + }) { }; + + proot = { + rootfs ? "rootfs", + binds ? [ ], + options ? [ ], + path ? [ pkgs.busybox ], + entrypoint ? "/bin/sh" + }: + pkgs.writeShellApplication { + inherit name; + text = '' + set -euxo pipefail + PATH=${pkgs.lib.strings.makeBinPath [ pkgs.proot pkgs.coreutils ]} + mkdir --parents '${rootfs}' + proot \ + --rootfs='${rootfs}' \ + ${pkgs.lib.strings.concatMapStringsSep " " (option: "--bind=${option}") binds} \ + ${pkgs.lib.strings.concatMapStringsSep " " (value: value) options} \ + /usr/bin/env --ignore-environment ${ + pkgs.writeScript "entrypoint-${name}" '' + set -eu + export HISTFILE=/dev/null + export PATH=${pkgs.lib.strings.makeBinPath path} + ${entrypoint} + '' + }; + ''; + }; + + jail = proot { + binds = [ "/nix" "/usr" "/bin" ]; + options = [ "--cwd=/" "--verbose=0" ]; + }; + +in pkgs.mkShell { + inherit name; + shellHook = '' + printf '%s\n' "${jail}/bin/${jail.name}" + exec "${jail}/bin/${jail.name}" + ''; +} diff --git a/.config/nixpkgs/shells/pure/shell.nix b/.config/nixpkgs/shells/pure/shell.nix new file mode 100644 index 0000000..2e58365 --- /dev/null +++ b/.config/nixpkgs/shells/pure/shell.nix @@ -0,0 +1,22 @@ +let + + name = "nix-shell.pure"; + pkgs = import <nixpkgs> { }; + + shell = pkgs.writeShellApplication { + inherit name; + text = '' + /usr/bin/env --ignore-environment /bin/sh -c ${ + pkgs.writeScript name '' + export PS1='\h (${name}) \W \$ ' + export PATH=${pkgs.lib.strings.makeBinPath [ pkgs.busybox ]} + /bin/sh + '' + }; + ''; + }; + +in pkgs.mkShell { + inherit name; + shellHook = "exec ${shell}/bin/${shell.name}"; +} diff --git a/.config/nixpkgs/shells/scribus/shell.nix b/.config/nixpkgs/shells/scribus/shell.nix new file mode 100644 index 0000000..9658c0a --- /dev/null +++ b/.config/nixpkgs/shells/scribus/shell.nix @@ -0,0 +1,96 @@ +let + + name = "nix-shell.scribus"; + + pkgs = (import (builtins.fetchTarball { + url = "https://releases.nixos.org/nixos/21.11/nixos-21.11.336020.2128d0aa28e/nixexprs.tar.xz"; + sha256 = "0w8plbxms0di6gnh0k2yhj0pgxzxas7g5x0m01zjzixf16i2bapj"; + }) { }); + + package = pkgs.callPackage ({ lib, stdenv, fetchurl, pkg-config, freetype, lcms, libtiff + , libxml2, gnome2, qt4, python2, cups, fontconfig, libjpeg, zlib, libpng + , xorg, cairo, podofo, hunspell, boost, cmake, imagemagick, ghostscript }: + + let + icon = fetchurl { + url = "https://gist.githubusercontent.com/ejpcmac/a74b762026c9bc4000be624c3d085517/raw/18edc497c5cb6fdeef1c8aede37a0ee68413f9d3/scribus-icon-centered.svg"; + sha256 = "0hq3i7c2l50445an9glhhg47kj26y16svfajc6naqn307ph9vzc3"; + }; + pythonEnv = python2.withPackages (ps: [ ps.tkinter ps.pillow ]); + in stdenv.mkDerivation rec { + pname = "scribus"; + version = "1.4.8"; + + src = fetchurl { + url = "mirror://sourceforge/${pname}/${pname}/${pname}-${version}.tar.xz"; + sha256 = "0bq433myw6h1siqlsakxv6ghb002rp3mfz5k12bg68s0k6skn992"; + }; + + nativeBuildInputs = [ pkg-config cmake ]; + buildInputs = with xorg; [ + boost + cairo + cups + fontconfig + freetype + gnome2.libart_lgpl + hunspell + imagemagick + lcms + libX11 + libXau + libXaw + libXdmcp + libXext + libXi + libXinerama + libXtst + libjpeg + libpng + libpthreadstubs + libtiff + libxml2 + podofo + pythonEnv + qt4 + zlib + ]; + + postPatch = '' + substituteInPlace scribus/util_ghostscript.cpp \ + --replace 'QString gsName("gs");' \ + 'QString gsName("${ghostscript}/bin/gs");' + ''; + + postInstall = '' + for i in 16 24 48 64 96 128 256 512; do + mkdir -p $out/share/icons/hicolor/''${i}x''${i}/apps + convert -background none -resize ''${i}x''${i} ${icon} $out/share/icons/hicolor/''${i}x''${i}/apps/scribus.png + done + ''; + + meta = { + platforms = lib.platforms.linux; + description = "Desktop Publishing (DTP) and Layout program for Linux"; + homepage = "https://www.scribus.net"; + license = lib.licenses.gpl2; + }; + }) { }; + + shell = pkgs.writeShellApplication { + inherit name; + text = '' + /usr/bin/env --ignore-environment /bin/sh -c ${ + pkgs.writeScript name '' + export PS1='\h (${name}) \W \$ ' + export PATH=${pkgs.lib.strings.makeBinPath [ package pkgs.busybox ]} + /bin/sh + '' + }; + ''; + }; + +in pkgs.mkShell { + inherit name package; + shellHook = "exec ${shell}/bin/${shell.name}"; +} diff --git a/.config/nixpkgs/shells/tilp2/shell.nix b/.config/nixpkgs/shells/tilp2/shell.nix new file mode 100644 index 0000000..f57bc3b --- /dev/null +++ b/.config/nixpkgs/shells/tilp2/shell.nix @@ -0,0 +1,66 @@ +let + + name = "nix-shell.tilp2"; + + pkgs = (import (builtins.fetchTarball { + url = "https://releases.nixos.org/nixos/21.11/nixos-21.11.336020.2128d0aa28e/nixexprs.tar.xz"; + sha256 = "0w8plbxms0di6gnh0k2yhj0pgxzxas7g5x0m01zjzixf16i2bapj"; + }) { }); + + package = pkgs.callPackage ({ stdenv, lib, fetchurl, fetchpatch + , autoreconfHook, pkg-config, intltool, glib, gnome2, gtk2, gfm + , libticables2, libticalcs2, libticonv, libtifiles2 }: + + stdenv.mkDerivation rec { + pname = "tilp2"; + version = "1.18"; + src = fetchurl { + url = "mirror://sourceforge/tilp/${pname}-${version}.tar.bz2"; + sha256 = "0isf73bjwk06baz2gm3vpdh600gqck9ca4aqxzb089dmxriv6fkv"; + }; + + patches = fetchpatch { + name = "remove-broken-kde-support.patch"; + url = "https://aur.archlinux.org/cgit/aur.git/plain/remove-broken-kde-support.patch?h=tilp"; + sha256 = "1fn6vh7r45spkwpmkvffkbn7zrcsdrs5mjmspd5rwi3jc12cy3ny"; + }; + + nativeBuildInputs = [ autoreconfHook pkg-config intltool ]; + + buildInputs = [ + glib + gtk2 + gnome2.libglade + gfm + libticables2 + libticalcs2 + libticonv + libtifiles2 + ]; + + meta = with lib; { + changelog = "http://lpg.ticalc.org/prj_tilp/news.html"; + description = "Transfer data between Texas Instruments graphing calculators and a computer"; + homepage = "http://lpg.ticalc.org/prj_tilp/"; + license = licenses.gpl2Plus; + platforms = with platforms; linux ++ darwin; + }; + }) { }; + + shell = pkgs.writeShellApplication { + inherit name; + text = '' + /usr/bin/env --ignore-environment /bin/sh -c ${ + pkgs.writeScript name '' + export PS1='\h (${name}) \W \$ ' + export PATH=${pkgs.lib.strings.makeBinPath [ package pkgs.busybox ]} + /bin/sh + '' + }; + ''; + }; + +in pkgs.mkShell { + inherit name package; + shellHook = "exec ${shell}/bin/${shell.name}"; +} diff --git a/.config/npmrc b/.config/npmrc index 813f01a..bf1ad15 100644 --- a/.config/npmrc +++ b/.config/npmrc @@ -1 +1,4 @@ -cache=~/.cache/npm +prefix=${XDG_DATA_HOME}/npm +cache=${XDG_CACHE_HOME}/npm +init-module=${XDG_CONFIG_HOME}/npm/config/npm-init.js +update-notifier=false diff --git a/.config/prettier/config.yaml b/.config/prettier/config.yaml new file mode 100644 index 0000000..cdfba32 --- /dev/null +++ b/.config/prettier/config.yaml @@ -0,0 +1,11 @@ +--- +arrowParens: always # Include parentheses around a sole arrow function parameter. +bracketSpacing: true # Print spaces between brackets in object literals. +embeddedLanguageFormatting: off # Never automatically format embedded in markdown code. +printWidth: 80 # Try to limit the line length to 80. +proseWrap: always # Always wrap prose in markdown. +semi: true # Print semicolons at the ends of statements. +singleQuote: false # Use double quotes instead of single quotes. +tabWidth: 2 # Specify the number of spaces per indentation-level. +trailingComma: es5 # Print trailing commas +useTabs: false # Indent lines with tabs instead of spaces. diff --git a/.config/ranger/rc.conf b/.config/ranger/rc.conf index 763df21..0270531 100644 --- a/.config/ranger/rc.conf +++ b/.config/ranger/rc.conf @@ -13,7 +13,7 @@ map cw eval fm.execute_console("bulkrename") if fm.thisdir.marked_items else fm. map / console scout -ftsea%space # Open with dmenu -map ru shell compgen -c | dmenu -f -i -b -p 'Open With' | xargs -I{} -r bash -c "{} %s &> /dev/null" & +map ru shell compgen -c | dmenu -f -i -b -p ⠀:::⠀open⠀::: | xargs -I{} -r /bin/sh -c "{} %s > /dev/null 2>&1" & # Sort by last modified set sort=ctime diff --git a/.config/recoll/mimeview b/.config/recoll/mimeview new file mode 100644 index 0000000..66c1871 --- /dev/null +++ b/.config/recoll/mimeview @@ -0,0 +1,17 @@ +# The system-wide configuration files for recoll are located in: +# /usr/share/recoll/examples +# The default configuration files are commented, you should take a look +# at them for an explanation of what can be set (you could also take a look +# at the manual instead). +# Values set in this file will override the system-wide values for the file +# with the same name in the central directory. The syntax for setting +# values is identical. + +xallexcepts+ = text/html +xallexcepts- = +[view] +inode/directory = spacefm %f +inode/directory|parentopen = spacefm %f +application/x-fsdirectory = spacefm %f +application/pdf = zathura --page %p --find %s %f +text/html = chromium --new-window --app=file://%f#:~:text=%s diff --git a/.config/rncbc.org/QjackCtl.conf b/.config/rncbc.org/QjackCtl.conf new file mode 100644 index 0000000..c257138 --- /dev/null +++ b/.config/rncbc.org/QjackCtl.conf @@ -0,0 +1,107 @@ +[Defaults] +ConnectionsTabPage=0 +MessagesStatusTabPage=0 +PatchbayPath= +SessionSaveVersion=true + +[GraphView] +Menubar=true +SortOrder=0 +SortType=0 +Statusbar=false +TextBesideIcons=true +Toolbar=false +ZoomRange=false + +[Options] +ActivePatchbay=false +ActivePatchbayPath= +ActivePatchbayReset=false +AliasesEditing=false +AliasesEnabled=false +AlsaSeqEnabled=true +BaseFontSize=0 +ConnectionsFont="Ubuntu Semi-Bold,8,-1,5,50,0,0,0,0,0" +ConnectionsIconSize=0 +CustomColorTheme= +CustomStyleTheme= +DBusEnabled=false +DisplayBlink=true +DisplayEffect=true +DisplayFont1="Monospace,14,-1,5,50,0,0,0,0,0" +DisplayFont2="Monospace,8,-1,5,50,0,0,0,0,0" +GraphButton=true +JackClientPortAlias=0 +JackClientPortMetadata=false +JackDBusEnabled=false +KeepOnTop=false +LeftButtons=true +MessagesFont="Ubuntu Semi-Bold,8,-1,5,50,0,0,0,0,0" +MessagesLimit=true +MessagesLimitLines=1000 +MessagesLog=false +MessagesLogPath=qjackctl.log +PostShutdownScript=false +PostShutdownScriptShell= +PostStartupScript=false +PostStartupScriptShell= +QueryClose=true +QueryDisconnect=true +QueryRestart=false +QueryShutdown=true +RightButtons=true +ServerConfig=false +ServerConfigName=.jackdrc +ShutdownScript=false +ShutdownScriptShell= +Singleton=true +StartJack=false +StartMinimized=false +StartupScript=false +StartupScriptShell= +StdoutCapture=true +StopJack=true +SystemTray=false +SystemTrayQueryClose=false +TextLabels=true +TimeDisplay=0 +TransportButtons=true +XrunRegex=xrun of at least ([0-9|\\.]+) msecs + +[Settings] +Audio=0 +Chan=0 +ClockSource=0 +Dither=0 +Driver=alsa +Frames=1024 +HWMeter=false +IgnoreHW=false +InChannels=0 +InDevice= +InLatency=0 +Interface= +MidiDriver=none +Monitor=false +NoMemLock=false +OutChannels=0 +OutDevice= +OutLatency=0 +Periods=2 +PortMax=256 +Priority=5 +Realtime=true +SampleRate=48000 +SelfConnectMode=32 +Server=jackd +ServerName= +ServerSuffix= +Shorts=false +SoftMode=false +StartDelay=2 +Sync=false +Timeout=500 +UnlockMem=false +Verbose=false +Wait=21333 +WordLength=16 diff --git a/.config/rofi/config.rasi b/.config/rofi/config.rasi new file mode 100644 index 0000000..af15d51 --- /dev/null +++ b/.config/rofi/config.rasi @@ -0,0 +1,9 @@ +configuration { + kb-remove-to-eol: ""; + disable-history: false; + kb-row-up: "Up,Control+k"; + kb-row-down: "Down,Control+j"; + kb-accept-entry: "Control+m,Return,KP_Enter"; +} + +@theme "theme" diff --git a/.config/rofi/theme.rasi b/.config/rofi/theme.rasi new file mode 100644 index 0000000..8869f36 --- /dev/null +++ b/.config/rofi/theme.rasi @@ -0,0 +1,168 @@ +* { + red: rgba (220, 50, 47, 100 %); + selected-active-foreground: rgba (27, 43, 52, 100 %); + lightfg: rgba (88, 104, 117, 100 %); + separatorcolor: rgba (250, 200, 99, 100 %); + urgent-foreground: rgba (249, 145, 87, 100 %); + alternate-urgent-background: rgba (0, 0, 0, 0 %); + lightbg: rgba (238, 232, 213, 100 %); + background-color: rgba (0, 0, 0, 0 %); + border-color: rgba (250, 200, 99, 100 %); + normal-background: rgba (0, 0, 0, 0 %); + selected-urgent-background: rgba (249, 145, 87, 100 %); + alternate-active-background: rgba (0, 0, 0, 0 %); + spacing: 2; + blue: rgba (38, 139, 210, 100 %); + alternate-normal-foreground: var(foreground); + urgent-background: rgba (0, 0, 0, 0 %); + selected-normal-foreground: rgba (27, 43, 52, 100 %); + active-foreground: rgba (255, 255, 255, 100 %); + background: rgba (34, 34, 34, 80 %); + selected-active-background: rgba (102, 153, 204, 100 %); + active-background: rgba (0, 0, 0, 0 %); + selected-normal-background: rgba (250, 200, 99, 100 %); + alternate-normal-background: rgba (0, 0, 0, 0 %); + foreground: rgba (255, 255, 255, 100 %); + selected-urgent-foreground: rgba (27, 43, 52, 100 %); + normal-foreground: var(foreground); + alternate-urgent-foreground: var(urgent-foreground); + alternate-active-foreground: var(active-foreground); +} +element { + padding: 1px; + spacing: 5px; + border: 0; +} +element normal.normal { + background-color: var(normal-background); + text-color: var(normal-foreground); +} +element normal.urgent { + background-color: var(urgent-background); + text-color: var(urgent-foreground); +} +element normal.active { + background-color: var(active-background); + text-color: var(active-foreground); +} +element selected.normal { + background-color: var(selected-normal-background); + text-color: var(selected-normal-foreground); +} +element selected.urgent { + background-color: var(selected-urgent-background); + text-color: var(selected-urgent-foreground); +} +element selected.active { + background-color: var(selected-active-background); + text-color: var(selected-active-foreground); +} +element alternate.normal { + background-color: var(alternate-normal-background); + text-color: var(alternate-normal-foreground); +} +element alternate.urgent { + background-color: var(alternate-urgent-background); + text-color: var(alternate-urgent-foreground); +} +element alternate.active { + background-color: var(alternate-active-background); + text-color: var(alternate-active-foreground); +} +element-text { + background-color: rgba (0, 0, 0, 0 %); + highlight: inherit; + text-color: inherit; +} +element-icon { + background-color: rgba (0, 0, 0, 0 %); + size: 1em; + text-color: inherit; +} +window { + padding: 15; + background-color: var(background); + border: 1px; +} +mainbox { + padding: 0; + border: 0; +} +message { + padding: 1px; + border-color: var(separatorcolor); + border: 0; +} +textbox { + text-color: var(foreground); +} +listview { + padding: 2px 0 0; + scrollbar: false; + border-color: var(separatorcolor); + spacing: 2px; + fixed-height: 0; + border: 0; +} +scrollbar { + width: 4px; + padding: 0; + handle-width: 8px; + border: 0; + handle-color: var(normal-foreground); +} +sidebar { + border-color: var(separatorcolor); + border: 2px dash 0 0; +} +button { + spacing: 0; + text-color: var(normal-foreground); +} +button selected { + background-color: var(selected-normal-background); + text-color: var(selected-normal-foreground); +} +num-filtered-rows { + expand: false; + text-color: rgba (128, 128, 128, 100 %); +} +num-rows { + expand: false; + text-color: rgba (128, 128, 128, 100 %); +} +textbox-num-sep { + expand: false; + str: "/"; + text-color: rgba (128, 128, 128, 100 %); +} +inputbar { + padding: 1px; + spacing: 0; + text-color: var(normal-foreground); + children: [ prompt, textbox-prompt-colon, entry, num-filtered-rows, + textbox-num-sep, num-rows, case-indicator ]; +} +case-indicator { + spacing: 0; + text-color: var(normal-foreground); +} +entry { + text-color: var(normal-foreground); + spacing: 0; + placeholder-color: rgba (128, 128, 128, 100 %); + placeholder: "Type to filter"; +} +prompt { + spacing: 0; + text-color: var(normal-foreground); +} +textbox-prompt-colon { + margin: 0 0.3em 0em 0em; + expand: false; + str: ":"; + text-color: inherit; +} +mode-switcher { + border: 0; +} diff --git a/.config/screenkey.json b/.config/screenkey.json new file mode 100644 index 0000000..0665358 --- /dev/null +++ b/.config/screenkey.json @@ -0,0 +1,26 @@ +{ + "no_systray": false, + "timeout": 2.5, + "recent_thr": 0.1, + "compr_cnt": 3, + "ignore": [], + "position": "bottom", + "persist": false, + "font_desc": "Sans Bold", + "font_size": "small", + "font_color": "#000000", + "bg_color": "#000000", + "opacity": 0, + "key_mode": "composed", + "bak_mode": "baked", + "mods_mode": "normal", + "mods_only": false, + "multiline": false, + "vis_shift": true, + "vis_space": true, + "geometry": null, + "screen": 0, + "start_disabled": false, + "mouse": false, + "button_hide_duration": 1 +} diff --git a/.config/seance/spirits b/.config/seance/spirits new file mode 100644 index 0000000..09d7282 --- /dev/null +++ b/.config/seance/spirits @@ -0,0 +1,12 @@ +anki +chromium +claws-mail +firefox +google-chrome +keepassxc +mupdf +recoll +spacefm +stalonetray +vim +zathura diff --git a/.config/skippy-xd/skippy-xd.rc b/.config/skippy-xd/skippy-xd.rc index b2d867f..5fac657 100644 --- a/.config/skippy-xd/skippy-xd.rc +++ b/.config/skippy-xd/skippy-xd.rc @@ -20,6 +20,7 @@ clientDisplayModes = thumbnail icon filled none iconFillSpec = orig mid mid #00FFFF fillSpec = orig mid mid #FFFFFF background = +animationDuration = 0 [xinerama] showAll = true diff --git a/.config/spacefm/session b/.config/spacefm/session index 07cec65..f99e196 100644 --- a/.config/spacefm/session +++ b/.config/spacefm/session @@ -569,7 +569,7 @@ cstm_298bc815-key=111 cstm_298bc815-keymod=4 cstm_298bc815-label=Open with... cstm_298bc815-prev=con_open -cstm_298bc815-line=bash -c 'compgen -c' | dmenu -f -i -b -p 'Open With' | xargs -I{} -r bash -c "{} '${fm_files[@]}'" +cstm_298bc815-line=bash -c 'compgen -c' | dmenu -f -i -b -p '⠀:::⠀open⠀:::' | xargs -I{} -r bash -c "{} '${fm_files[@]}'" cstm_298bc815-task_err=1 cstm_298bc815-task_out=1 cstm_36fddd7b-y= diff --git a/.config/stylelint/config.js b/.config/stylelint/config.js new file mode 100644 index 0000000..77db00b --- /dev/null +++ b/.config/stylelint/config.js @@ -0,0 +1,45 @@ +'use strict'; + +module.exports = { + rules: { + 'at-rule-no-unknown': true, + 'block-no-empty': true, + 'color-no-invalid-hex': true, + 'comment-no-empty': true, + 'declaration-block-no-duplicate-custom-properties': true, + 'declaration-block-no-duplicate-properties': [ + true, + { + ignore: ['consecutive-duplicates-with-different-values'], + }, + ], + 'declaration-block-no-shorthand-property-overrides': true, + 'font-family-no-duplicate-names': true, + 'font-family-no-missing-generic-family-keyword': true, + 'function-calc-no-invalid': true, + 'function-calc-no-unspaced-operator': true, + 'function-linear-gradient-no-nonstandard-direction': true, + 'keyframe-declaration-no-important': true, + 'media-feature-name-no-unknown': true, + 'named-grid-areas-no-invalid': true, + 'no-descending-specificity': true, + 'no-duplicate-at-import-rules': true, + 'no-duplicate-selectors': true, + 'no-empty-source': true, + 'no-extra-semicolons': true, + 'no-invalid-double-slash-comments': true, + 'no-invalid-position-at-import-rule': true, + 'no-irregular-whitespace': true, + 'property-no-unknown': true, + 'selector-pseudo-class-no-unknown': true, + 'selector-pseudo-element-no-unknown': true, + 'selector-type-no-unknown': [ + true, + { + ignore: ['custom-elements'], + }, + ], + 'string-no-newline': true, + 'unit-no-unknown': true, + }, +}; diff --git a/.config/swc/swc.json b/.config/swc/swc.json new file mode 100644 index 0000000..2f3bfc6 --- /dev/null +++ b/.config/swc/swc.json @@ -0,0 +1,23 @@ +{ + "jsc": { + "parser": { + "syntax": "ecmascript", + "jsx": false, + "dynamicImport": false, + "privateMethod": false, + "functionBind": false, + "exportDefaultFrom": false, + "exportNamespaceFrom": false, + "decorators": false, + "decoratorsBeforeExport": false, + "topLevelAwait": false, + "importMeta": false, + "preserveAllComments": false + }, + "target": "es3", + "loose": false, + "externalHelpers": false, + "keepClassNames": false + }, + "isModule": false +}
\ No newline at end of file diff --git a/.config/systemd/user/autocutsel.service b/.config/systemd/user/autocutsel.service new file mode 100644 index 0000000..495e703 --- /dev/null +++ b/.config/systemd/user/autocutsel.service @@ -0,0 +1,16 @@ +[Unit] +Description=Keep the X clipboard and the cutbuffer in sync +StartLimitIntervalSec=0 + +[Service] +Type=forking +RestartSec=3 +Restart=always +SyslogIdentifier=autocutsel +ExecStartPre=/usr/bin/env autocutsel -fork -selection PRIMARY +ExecStart=/usr/bin/env autocutsel -fork -selection CLIPBOARD +MemoryHigh=3M +MemoryMax=5M + +[Install] +WantedBy=default.target diff --git a/.config/systemd/user/copyq.service b/.config/systemd/user/copyq.service index cd09ee0..4d9afab 100644 --- a/.config/systemd/user/copyq.service +++ b/.config/systemd/user/copyq.service @@ -1,12 +1,13 @@ [Unit] Description=Copyq server +StartLimitIntervalSec=0 [Service] Type=simple -ExecStart=/usr/bin/env copyq +RestartSec=3 Restart=always -RestartSec=5s SyslogIdentifier=copyq +ExecStart=/usr/bin/env copyq [Install] WantedBy=default.target diff --git a/.config/systemd/user/events-idle.service b/.config/systemd/user/events-idle.service index 7c5cdec..62b4edd 100644 --- a/.config/systemd/user/events-idle.service +++ b/.config/systemd/user/events-idle.service @@ -1,15 +1,16 @@ [Unit] Description=Execute events on X11 idle +StartLimitIntervalSec=0 [Service] Type=simple -ExecStartPre=/usr/bin/env sh -c '%h/.local/bin/scripts/events-idle' -ExecStart=/usr/bin/env sh -c 'while true; do sleep 300 && [ "$(xprintidle)" -gt 120000 ] && %h/.local/bin/scripts/events-idle; done' +IOWeight=60 +CPUQuota=60% +RestartSec=5 Restart=always -RestartSec=5s SyslogIdentifier=events-idle -CPUQuota=60% -IOWeight=60 +ExecStartPre=/usr/bin/env sh -c 'events-idle' +ExecStart=/usr/bin/env sh -c 'while true; do sleep 300 && [ "$(xprintidle)" -gt 120000 ] && events-idle; done' [Install] WantedBy=default.target diff --git a/.config/systemd/user/events-resume.service b/.config/systemd/user/events-resume.service index b8bce6a..a65c0a8 100644 --- a/.config/systemd/user/events-resume.service +++ b/.config/systemd/user/events-resume.service @@ -1,12 +1,13 @@ [Unit] Description=Execute events on resume event +StartLimitIntervalSec=0 [Service] Type=simple -ExecStart=/usr/bin/env sh -c 'dbus-monitor --system | while read; do grep -q 'PrepareForSleep' && %h/.local/bin/scripts/events-resume; done' +RestartSec=3 Restart=always -RestartSec=5s SyslogIdentifier=events-resume +ExecStart=/usr/bin/env sh -c 'dbus-monitor --system | while read; do grep -q 'PrepareForSleep' && events-resume; done' [Install] WantedBy=default.target diff --git a/.config/systemd/user/events-usb.service b/.config/systemd/user/events-usb.service index d2a5b63..201d171 100644 --- a/.config/systemd/user/events-usb.service +++ b/.config/systemd/user/events-usb.service @@ -1,12 +1,13 @@ [Unit] Description=Execute events on kernel usb events +StartLimitIntervalSec=0 [Service] Type=simple -ExecStart=/usr/bin/env sh -c 'udevadm monitor | while read; do grep -m1 -q "(usb)" && %h/.local/bin/scripts/events-usb; done' +RestartSec=3 Restart=always -RestartSec=5s SyslogIdentifier=events-usb +ExecStart=/usr/bin/env sh -c 'udevadm monitor | while read; do grep -m1 -q "(usb)" && events-usb; done' [Install] WantedBy=default.target diff --git a/.config/systemd/user/flameshot.service b/.config/systemd/user/flameshot.service index 431fc04..1761acd 100644 --- a/.config/systemd/user/flameshot.service +++ b/.config/systemd/user/flameshot.service @@ -1,12 +1,13 @@ [Unit] Description=Screenshot tool +StartLimitIntervalSec=0 [Service] Type=simple -ExecStart=/usr/bin/env flameshot +RestartSec=3 Restart=always -RestartSec=5s SyslogIdentifier=flameshot +ExecStart=/usr/bin/env flameshot [Install] WantedBy=default.target diff --git a/.config/systemd/user/plank.service b/.config/systemd/user/plank.service index 4f92af7..760e71b 100644 --- a/.config/systemd/user/plank.service +++ b/.config/systemd/user/plank.service @@ -4,12 +4,12 @@ StartLimitIntervalSec=0 [Service] Type=simple -Environment=XDG_SESSION_TYPE=X11 -ExecStart=/usr/bin/env plank +RestartSec=1 Restart=always -RestartSec=1s KillMode=process SyslogIdentifier=plank +ExecStart=/usr/bin/env plank +Environment=XDG_SESSION_TYPE=X11 [Install] WantedBy=default.target diff --git a/.config/systemd/user/redshift.service b/.config/systemd/user/redshift.service index e18f1e4..4392596 100644 --- a/.config/systemd/user/redshift.service +++ b/.config/systemd/user/redshift.service @@ -1,12 +1,13 @@ [Unit] Description=Redshift +StartLimitIntervalSec=0 [Service] Type=simple -ExecStart=/usr/bin/env redshift +RestartSec=3 Restart=always -RestartSec=5s SyslogIdentifier=redshift +ExecStart=/usr/bin/env redshift [Install] WantedBy=default.target diff --git a/.config/systemd/user/syncthing.service b/.config/systemd/user/syncthing.service index d1b862c..2e5ebc6 100644 --- a/.config/systemd/user/syncthing.service +++ b/.config/systemd/user/syncthing.service @@ -1,21 +1,14 @@ [Unit] Description=Syncthing - Open Source Continuous File Synchronization -After=network.target +StartLimitIntervalSec=0 [Service] -ExecStart=/usr/bin/env syncthing -no-browser -no-restart -logflags=0 +IOWeight=60 +CPUQuota=60% +RestartSec=3 Restart=always -RestartSec=5s SyslogIdentifier=syncthing -CPUQuota=60% -IOWeight=60 - -# Hardening -ProtectSystem=full -PrivateTmp=true -SystemCallArchitectures=native -MemoryDenyWriteExecute=true -NoNewPrivileges=true +ExecStart=/usr/bin/env syncthing -no-browser -no-restart -logflags=0 [Install] WantedBy=default.target diff --git a/.config/systemd/user/unclutter.service b/.config/systemd/user/unclutter.service index ac4941c..78f0c40 100644 --- a/.config/systemd/user/unclutter.service +++ b/.config/systemd/user/unclutter.service @@ -1,12 +1,13 @@ [Unit] Description=Hide mouse on idle +StartLimitIntervalSec=0 [Service] Type=simple -ExecStart=/usr/bin/env unclutter -idle 1 +RestartSec=3 Restart=always -RestartSec=5s SyslogIdentifier=unclutter +ExecStart=/usr/bin/env unclutter -idle 1 -grab [Install] WantedBy=default.target diff --git a/.config/systemd/user/workout-notify.service b/.config/systemd/user/workout-notify.service index 3ea82f4..e043f07 100644 --- a/.config/systemd/user/workout-notify.service +++ b/.config/systemd/user/workout-notify.service @@ -4,5 +4,5 @@ Description=Workout notifications [Service] Type=oneshot Environment=DISPLAY=:0 -ExecStart=%h/.local/bin/scripts/workout-notify +ExecStart=/usr/bin/env sh -c 'workout-notify' SyslogIdentifier=workout-notify diff --git a/.config/systemd/user/x0vncserver.service b/.config/systemd/user/x0vncserver.service deleted file mode 100644 index e3e1abe..0000000 --- a/.config/systemd/user/x0vncserver.service +++ /dev/null @@ -1,12 +0,0 @@ -[Unit] -Description=Remote desktop service (VNC) - -[Service] -Type=forking -ExecStart=/usr/bin/env /usr/bin/sh -c '/usr/bin/x0vncserver -rfbport 5900 -RemapKeys="0x3c->0x2c" -passwordfile %h/.vnc/passwd &' -Restart=always -RestartSec=5s -SyslogIdentifier=x0vncserver - -[Install] -WantedBy=default.target diff --git a/.config/systemd/user/x11vnc.service b/.config/systemd/user/x11vnc.service index 8e758d2..b055585 100644 --- a/.config/systemd/user/x11vnc.service +++ b/.config/systemd/user/x11vnc.service @@ -4,10 +4,10 @@ StartLimitIntervalSec=0 [Service] Type=simple -RestartSec=1s +RestartSec=3 Restart=always SyslogIdentifier=x11vnc -ExecStart=/usr/bin/env x11vnc -display :0 -rfbport 5900 -usepw -forever -nowireframe -norepeat -noxdamage -noxrecord -ncache_cr -noxfixes -auth $XAUTHORITY +ExecStart=/usr/bin/env x11vnc -display $DISPLAY -rfbport 5901 -shared -usepw -forever -nowireframe -norepeat -noxdamage -noxrecord -ncache_cr -noxfixes -cursor arrow -auth $XAUTHORITY [Install] WantedBy=default.target diff --git a/.config/systemd/user/xbindkeys.service b/.config/systemd/user/xbindkeys.service index 82eaf76..5f312b8 100644 --- a/.config/systemd/user/xbindkeys.service +++ b/.config/systemd/user/xbindkeys.service @@ -1,9 +1,10 @@ [Unit] Description=Keyboard shortcut binder +StartLimitIntervalSec=0 [Service] Type=simple -RestartSec=5s +RestartSec=3 Restart=always KillMode=process SyslogIdentifier=xbindkeys diff --git a/.config/tidy.conf b/.config/tidy.conf new file mode 100644 index 0000000..c031d89 --- /dev/null +++ b/.config/tidy.conf @@ -0,0 +1,13 @@ +accessibility-check: 0 +ascii-chars: yes +clean: yes +custom-tags: blocklevel +drop-empty-elements: no +fix-style-tags: no +indent-spaces: 2 +indent: yes +markup: no +quiet: no +show-body-only: yes +vertical-space: yes +wrap: 80 diff --git a/.config/tidy/url.conf b/.config/tidy/url.conf new file mode 100644 index 0000000..a762628 --- /dev/null +++ b/.config/tidy/url.conf @@ -0,0 +1,13 @@ +accessibility-check: 0 +ascii-chars: yes +clean: yes +custom-tags: blocklevel +drop-empty-elements: no +fix-style-tags: no +indent-spaces: 2 +indent: yes +markup: no +quiet: yes +show-body-only: yes +vertical-space: yes +wrap: 80 diff --git a/.config/tmux/tmux.conf b/.config/tmux/tmux.conf index 08fb89b..73cb180 100644 --- a/.config/tmux/tmux.conf +++ b/.config/tmux/tmux.conf @@ -7,22 +7,36 @@ bind C-a send-prefix unbind C-b # reload configuration -bind r source-file ~/.config/tmux/tmux.conf \; run "printf ' # Reload tmux configuration\n' | tmux load-buffer - && tmux paste-buffer" +bind r source-file ~/.config/tmux/tmux.conf \; run "printf '# Reload tmux configuration\n' | tmux load-buffer - && tmux paste-buffer" # settings -set -g mouse on -set -g status off set -g base-index 1 +set -g history-limit 10000 set -g mode-keys vi +set -g monitor-activity on +set -g mouse on +set -g pane-base-index 1 +set -g pane-border-format "" +set -g pane-border-status top +set -g status on +set -g status-left '' +set -g status-position top +set -g status-right '' +set -g visual-activity off set -sg escape-time 1 -set -g visual-activity on -setw -g pane-base-index 1 -set -g history-limit 10000 -setw -g monitor-activity on +setw -g window-status-current-format " #I " +setw -g window-status-format " #I " -# border colours -set -g pane-border-style fg=colour0 -set -g pane-active-border-style fg=colour0 +# colours +set -g status-bg color0 +set -g pane-border-style fg=colour9 +set -g pane-active-border-style fg=colour9 +setw -g window-status-style fg=colour3 +setw -ga window-status-current-style bg=color9 + +# cycle windows +bind -n S-Right next-window # shift + --> +bind -n S-Left previous-window # shift + <-- # y and p as in vim unbind p @@ -36,6 +50,22 @@ bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel \; run "tmux bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xsel -i" bind -T root MouseDown2Pane run -b "xsel -o | tmux load-buffer - && tmux paste-buffer -s ' '" +# double click select +bind-key -n DoubleClick1Pane \ + select-pane \; \ + copy-mode -M \; \ + send-keys -X select-word \; \ + run-shell "sleep .25s" \; \ + send-keys -X copy-pipe-and-cancel "xsel -i" + +# triple click select +bind-key -n TripleClick1Pane \ + select-pane \; \ + copy-mode -M \; \ + send-keys -X select-line \; \ + run-shell "sleep .25s" \; \ + send-keys -X copy-pipe-and-cancel "xsel -i" + # split pane commands bind | split-window -h bind - split-window -v @@ -57,3 +87,7 @@ bind -n M-H resize-pane -L 5 bind -n M-J resize-pane -D 5 bind -n M-K resize-pane -U 5 bind -n M-L resize-pane -R 5 + +# session saving +set -g @resurrect-processes 'make hugo dmesg journalctl' +run-shell ~/.config/tmux/plugins/tmux-resurrect/resurrect.tmux diff --git a/.config/urxvt/ext/keyboard-select b/.config/urxvt/ext/keyboard-select new file mode 100644 index 0000000..14405d4 --- /dev/null +++ b/.config/urxvt/ext/keyboard-select @@ -0,0 +1,606 @@ +#! perl -w +# Author: Bert Muennich +# Website: http://www.github.com/muennich/urxvt-perls +# License: GPLv2 + +# Use keyboard shortcuts to select and copy text. + +# Usage: put the following lines in your .Xdefaults/.Xresources: +# URxvt.perl-ext-common: ...,keyboard-select +# URxvt.keysym.M-Escape: perl:keyboard-select:activate +# The following line overwrites the default Meta-s binding and allows to +# activate keyboard-select directly in backward search mode: +# URxvt.keysym.M-s: perl:keyboard-select:search + +# Use Meta-Escape to activate selection mode, then use the following keys: +# h/j/k/l: Move cursor left/down/up/right (also with arrow keys) +# g/G/0/^/$/H/M/L/f/F/;/,/w/W/b/B/e/E: More vi-like cursor movement keys +# '/'/?: Start forward/backward search +# n/N: Repeat last search, N: in reverse direction +# Ctrl-f/b: Scroll down/up one screen +# Ctrl-d/u: Scroll down/up half a screen +# v/V/Ctrl-v: Toggle normal/linewise/blockwise selection +# y/Return: Copy selection to primary buffer, Return: quit afterwards +# Y: Copy selected lines to primary buffer or cursor line and quit +# q/Escape: Quit keyboard selection mode + +# Options: +# URxvt.keyboard-select.clipboard: If true, copy to clipboard too + + +use strict; + +sub on_start{ + my ($self) = @_; + + $self->{clipboard} = $self->x_resource_boolean('keyboard-select.clipboard'); + + $self->{patterns}{'w'} = qr/\w[^\w\s]|\W\w|\s\S/; + $self->{patterns}{'W'} = qr/\s\S/; + $self->{patterns}{'b'} = qr/.*(?:\w[^\w\s]|\W\w|\s\S)/; + $self->{patterns}{'B'} = qr/.*\s\S/; + $self->{patterns}{'e'} = qr/[^\w\s](?=\w)|\w(?=\W)|\S(?=\s|$)/; + $self->{patterns}{'E'} = qr/\S(?=\s|$)/; + + () +} + + +sub on_action { + my ($self, $action) = @_; + + on_user_command($self, "keyboard-select:" . $action); +} + + +sub on_user_command { + my ($self, $cmd) = @_; + + if (not $self->{active}) { + if ($cmd eq 'keyboard-select:activate') { + activate($self); + } elsif ($cmd eq 'keyboard-select:search') { + activate($self, 1); + } + } + + () +} + + +sub key_press { + my ($self, $event, $keysym, $char) = @_; + my $key = chr($keysym); + + if (lc($key) eq 'c' && $event->{state} & urxvt::ControlMask) { + deactivate($self); + } elsif ($self->{search}) { + if ($keysym == 0xff1b) { + if ($self->{search_mode}) { + deactivate($self); + } else { + $self->{search} = ''; + status_area($self); + } + } elsif ($keysym == 0xff08) { + $self->{search} = substr($self->{search}, 0, -1); + if (not $self->{search} and $self->{search_mode}) { + deactivate($self); + } else { + status_area($self); + } + } elsif ($keysym == 0xff0d || + (lc($key) eq 'm' && $event->{state} & urxvt::ControlMask)) { + my $txt = substr($self->{search}, 1); + if ($txt) { + $self->{pattern} = ($txt =~ m/[[:upper:]]/) ? qr/\Q$txt\E/ : + qr/\Q$txt\E/i; + } elsif ($self->{pattern}) { + delete $self->{pattern}; + } + $self->{search} = ''; + $self->screen_cur($self->{srhcr}, $self->{srhcc}); + if (not find_next($self)) { + if ($self->{search_mode}) { + deactivate($self); + } else { + status_area($self); + } + } + } elsif (length($char) > 0) { + $self->{search} .= $self->locale_decode($char); + my $txt = substr($self->{search}, 1); + if ($txt) { + $self->{pattern} = ($txt =~ m/[[:upper:]]/) ? qr/\Q$txt\E/ : + qr/\Q$txt\E/i; + } elsif ($self->{pattern}) { + delete $self->{pattern}; + } + $self->screen_cur($self->{srhcr}, $self->{srhcc}); + find_next($self); + status_area($self); + } + } elsif ($self->{move_to}) { + if ($keysym == 0xff1b) { + $self->{move_to} = 0; + status_area($self); + } elsif (length($char) > 0) { + $self->{move_to} = 0; + $self->{patterns}{'f-1'} = qr/^.*\Q$key\E/; + $self->{patterns}{'f+1'} = qr/^.+?\Q$key\E/; + move_to($self, ';'); + status_area($self); + } + } elsif ($keysym == 0xff1b || lc($key) eq 'q') { + deactivate($self); + } elsif (lc($key) eq 'y' || $keysym == 0xff0d || + (lc($key) eq 'm' && $event->{state} & urxvt::ControlMask)) { + my $quit = 0; + if ($key eq 'Y' && $self->{select} ne 'l') { + $quit = !$self->{select}; + toggle_select($self, 'l'); + } + if ($self->{select}) { + my ($br, $bc, $er, $ec) = calc_span($self); + $ec = $self->line($er)->l if $self->{select} eq 'l'; + $self->selection_beg($br, $bc); + $self->selection_end($er, $ec); + $self->selection_make($event->{time}, $self->{select} eq 'b'); + if ($self->{clipboard}) { + $self->selection($self->selection(), 1); + $self->selection_grab($event->{time}, 1); + } + if (lc($key) eq 'y') { + $self->selection_beg(1, 0); + $self->selection_end(1, 0); + $self->{select} = ''; + status_area($self); + $self->want_refresh(); + } else { + $quit = 1; + } + } + if ($quit) { + deactivate($self); + } + } elsif ($key eq 'V') { + toggle_select($self, 'l'); + } elsif ($key eq 'v') { + if ($event->{state} & urxvt::ControlMask) { + toggle_select($self, 'b'); + } else { + toggle_select($self, 'n'); + } + } elsif ($key eq 'k' || $keysym == 0xff52) { + move_cursor($self, 'k'); + } elsif ($key eq 'j' || $keysym == 0xff54) { + move_cursor($self, 'j'); + } elsif ($key eq 'h' || $keysym == 0xff51) { + move_cursor($self, 'h'); + } elsif ($key eq 'l' || $keysym == 0xff53) { + move_cursor($self, 'l'); + } elsif ($keysym == 0xff57) { + move_cursor($self, '$'); + } elsif ($keysym == 0xff50) { + move_cursor($self, '^'); + } elsif ('gG0^$HML' =~ m/\Q$key\E/ || + ('fbdu' =~ m/\Q$key\E/ && $event->{state} & urxvt::ControlMask)) { + move_cursor($self, $key); + } elsif (lc($key) eq 'f') { + $self->{move_to} = 1; + $self->{move_dir} = $key eq 'F' ? -1 : 1; + status_area($self, $key); + } elsif (';,wWbBeE' =~ m/\Q$key\E/) { + move_to($self, $key); + } elsif ($key eq '/' || $key eq '?') { + $self->{search} = $key; + $self->{search_dir} = $key eq '?' ? -1 : 1; + ($self->{srhcr}, $self->{srhcc}) = $self->screen_cur(); + status_area($self); + } elsif (lc($key) eq 'n') { + find_next($self, $self->{search_dir} * ($key eq 'N' ? -1 : 1)); + } + + return 1; +} + + +sub move_cursor { + my ($self, $key) = @_; + my ($cr, $cc) = $self->screen_cur(); + my $line = $self->line($cr); + + if ($key eq 'k' && $line->beg > $self->top_row) { + $cr = $line->beg - 1; + } elsif ($key eq 'j' && $line->end < $self->nrow - 1) { + $cr = $line->end + 1; + } elsif ($key eq 'h' && $self->{offset} > 0) { + $self->{offset} = $line->offset_of($cr, $cc) - 1; + $self->{dollar} = 0; + } elsif ($key eq 'l' && $self->{offset} < $line->l - 1) { + ++$self->{offset}; + } elsif ($key eq 'f' || $key eq 'd') { + my $vs = $self->view_start() + + ($key eq 'd' ? $self->nrow / 2 : $self->nrow - 1); + $vs = 0 if $vs > 0; + $cr += $vs - $self->view_start($vs); + } elsif ($key eq 'b' || $key eq 'u') { + my $vs = $self->view_start() - + ($key eq 'u' ? $self->nrow / 2 : $self->nrow - 1); + $vs = $self->top_row if $vs < $self->top_row; + $cr += $vs - $self->view_start($vs); + } elsif ($key eq 'g') { + ($cr, $self->{offset}) = ($self->top_row, 0); + $self->{dollar} = 0; + } elsif ($key eq 'G') { + ($cr, $self->{offset}) = ($self->nrow - 1, 0); + $self->{dollar} = 0; + } elsif ($key eq '0') { + $self->{offset} = 0; + $self->{dollar} = 0; + } elsif ($key eq '^') { + my $ltxt = $self->special_decode($line->t); + while ($ltxt =~ s/^( *)\t/$1 . " " x (8 - length($1) % 8)/e) {} + $self->{offset} = $ltxt =~ m/^ +/ ? $+[0] : 0; + $self->{dollar} = 0; + } elsif ($key eq '$') { + my $co = $line->offset_of($cr, $cc); + $self->{dollar} = $co + 1; + $self->{offset} = $line->l - 1; + } elsif ($key eq 'H') { + $cr = $self->view_start(); + } elsif ($key eq 'M') { + $cr = $self->view_start() + $self->nrow / 2; + } elsif ($key eq 'L') { + $cr = $self->view_start() + $self->nrow - 1; + } + + $line = $self->line($cr); + $cc = $self->{dollar} || $self->{offset} >= $line->l ? $line->l - 1 : + $self->{offset}; + $self->screen_cur($line->coord_of($cc)); + + status_area($self); + $self->want_refresh(); + + () +} + + +sub move_to { + my ($self, $key) = @_; + my ($cr, $cc) = $self->screen_cur(); + my $line = $self->line($cr); + my $offset = $self->{offset}; + my ($dir, $pattern); + my ($wrap, $found) = (0, 0); + + if ($key eq ';' || $key eq ',') { + $dir = $self->{move_dir} * ($key eq ',' ? -1 : 1); + $pattern = $self->{patterns}{sprintf('f%+d', $dir)}; + return if not $pattern; + } else { + if (lc($key) eq 'b') { + $dir = -1; + } else { + $dir = 1; + ++$offset if lc($key) eq 'e'; + } + $pattern = $self->{patterns}{$key}; + $wrap = 1; + } + + if ($dir > 0) { + NEXTDOWN: my $text = substr($line->t, $offset); + if ($text =~ m/$pattern/) { + $offset += $+[0] - 1; + $found = 1; + } elsif ($wrap && $line->end + 1 < $self->nrow) { + $cr = $line->end + 1; + $line = $self->line($cr); + $offset = 0; + if (lc($key) eq 'e') { + goto NEXTDOWN; + } else { + $found = 1; + } + } + } elsif ($dir < 0) { + NEXTUP: my $text = substr($line->t, 0, $offset); + if ($text =~ m/$pattern/) { + $offset += $+[0] - length($text) - 1; + $found = 1; + } elsif ($wrap) { + if ($offset > 0) { + $offset = 0; + $found = 1; + } elsif ($line->beg > $self->top_row) { + $cr = $line->beg - 1; + $line = $self->line($cr); + $offset = $line->l; + goto NEXTUP; + } + } + } + + if ($found) { + $self->{dollar} = 0; + $self->{offset} = $offset; + $self->screen_cur($line->coord_of($offset)); + $self->want_refresh(); + } + + () +} + + +sub find_next { + my ($self, $dir) = @_; + + return if not $self->{pattern}; + $dir = $self->{search_dir} if not $dir; + + my ($cr, $cc) = $self->screen_cur(); + my $line = $self->line($cr); + my $offset = $line->offset_of($cr, $cc); + my $text; + my $found = 0; + + ++$offset if $dir > 0; + + while (not $found) { + if ($dir > 0) { + $text = substr($line->t, $offset); + if ($text =~ m/$self->{pattern}/) { + $found = 1; + $offset += $-[0]; + } else { + last if $line->end >= $self->nrow; + $line = $self->line($line->end + 1); + $offset = 0; + } + } else { + $text = substr($line->t, 0, $offset); + if ($text =~ m/$self->{pattern}/) { + $found = 1; + $offset = $-[0] while $text =~ m/$self->{pattern}/g; + } else { + last if $line->beg <= $self->top_row; + $line = $self->line($line->beg - 1); + $offset = $line->l; + } + } + } + + if ($found) { + $self->{dollar} = 0; + $self->{offset} = $offset; + $self->screen_cur($line->coord_of($offset)); + status_area($self); + $self->want_refresh(); + } + + return $found; +} + + +sub tt_write { + return 1; +} + + +sub refresh { + my ($self) = @_; + my ($cr, $cc) = $self->screen_cur(); + + # scroll the current cursor position into visible area + if ($cr < $self->view_start()) { + $self->view_start($cr); + } elsif ($cr >= $self->view_start() + $self->nrow) { + $self->view_start($cr - $self->nrow + 1); + } + + if ($self->{select}) { + my ($hl, $reverse_cursor); + my ($br, $bc, $er, $ec) = calc_span($self); + + if ($self->x_resource('highlightColor')) { + $hl = urxvt::RS_Sel; + $reverse_cursor = 0; + } else { + $hl = urxvt::RS_RVid; + $reverse_cursor = $self->{select} ne 'l'; + } + if ($self->{select} eq 'b') { + my $co = $self->line($cr)->offset_of($cr, $cc); + my $dollar = $self->{dollar} && $co >= $self->{dollar} - 1; + + my $r = $br; + while ($r <= $er) { + my $line = $self->line($r); + if ($bc < $line->l) { + $ec = $line->l if $dollar; + my ($br, $bc) = $line->coord_of($bc); + my ($er, $ec) = $line->coord_of($ec <= $line->l ? $ec : $line->l); + $self->scr_xor_span($br, $bc, $er, $ec, $hl); + } elsif ($r == $cr) { + $reverse_cursor = 0; + } + $r = $line->end + 1; + } + } else { + $self->scr_xor_span($br, $bc, $er, $ec, $hl); + } + + if ($reverse_cursor) { + # make the cursor visible again + $self->scr_xor_span($cr, $cc, $cr, $cc + 1, $hl); + } + } + + () +} + + +sub activate { + my ($self, $search) = @_; + + $self->{active} = 1; + + $self->{select} = ''; + $self->{dollar} = 0; + $self->{move_to} = 0; + + if ($search) { + $self->{search} = '?'; + $self->{search_dir} = -1; + $self->{search_mode} = 1; + } else { + $self->{search} = ''; + $self->{search_mode} = 0; + } + + ($self->{oldcr}, $self->{oldcc}) = $self->screen_cur(); + ($self->{srhcr}, $self->{srhcc}) = $self->screen_cur(); + $self->{old_view_start} = $self->view_start(); + $self->{old_pty_ev_events} = $self->pty_ev_events(urxvt::EV_NONE); + + my $line = $self->line($self->{oldcr}); + $self->{offset} = $line->offset_of($self->{oldcr}, $self->{oldcc}); + + $self->selection_beg(1, 0); + $self->selection_end(1, 0); + + $self->enable( + key_press => \&key_press, + refresh_begin => \&refresh, + refresh_end => \&refresh, + tt_write => \&tt_write, + ); + + if ($self->{offset} >= $line->l) { + $self->{offset} = $line->l > 0 ? $line->l - 1 : 0; + $self->screen_cur($line->coord_of($self->{offset})); + $self->want_refresh(); + } + + $self->{overlay_len} = 0; + status_area($self); + + () +} + + +sub deactivate { + my ($self) = @_; + + $self->selection_beg(1, 0); + $self->selection_end(1, 0); + + delete $self->{overlay} if $self->{overlay}; + + $self->disable("key_press", "refresh_begin", "refresh_end", "tt_write"); + $self->screen_cur($self->{oldcr}, $self->{oldcc}); + $self->view_start($self->{old_view_start}); + $self->pty_ev_events($self->{old_pty_ev_events}); + + $self->want_refresh(); + + $self->{active} = 0; + + () +} + + +sub status_area { + my ($self, $extra) = @_; + my ($stat, $stat_len); + + if ($self->{search}) { + $stat_len = $self->ncol; + $stat = $self->{search} . ' ' x ($stat_len - length($self->{search})); + } else { + if ($self->{select}) { + $stat = "-V" . ($self->{select} ne 'n' ? uc($self->{select}) : "") . "- "; + } + + if ($self->top_row == 0) { + $stat .= "All"; + } elsif ($self->view_start() == $self->top_row) { + $stat .= "Top"; + } elsif ($self->view_start() == 0) { + $stat .= "Bot"; + } else { + $stat .= sprintf("%2d%%", + ($self->top_row - $self->view_start) * 100 / $self->top_row); + } + + $stat = "$extra $stat" if $extra; + $stat_len = length($stat); + } + + if (!$self->{overlay} || $self->{overlay_len} != $stat_len) { + delete $self->{overlay} if $self->{overlay}; + $self->{overlay} = $self->overlay(-1, -1, $stat_len, 1, + urxvt::OVERLAY_RSTYLE, 0); + $self->{overlay_len} = $stat_len; + } + + $self->{overlay}->set(0, 0, $self->special_encode($stat)); + $self->{overlay}->show(); + + () +} + + +sub toggle_select { + my ($self, $mode) = @_; + + if ($self->{select} eq $mode) { + $self->{select} = ''; + } else { + if (not $self->{select}) { + ($self->{ar}, $self->{ac}) = $self->screen_cur(); + } + $self->{select} = $mode; + } + + status_area($self); + $self->want_refresh(); + + () +} + + +sub calc_span { + my ($self) = @_; + my ($cr, $cc) = $self->screen_cur(); + my ($br, $bc, $er, $ec); + + if ($self->{select} eq 'b') { + $br = $self->line($cr)->beg; + $bc = $self->line($cr)->offset_of($cr, $cc); + $er = $self->line($self->{ar})->beg; + $ec = $self->line($self->{ar})->offset_of($self->{ar}, $self->{ac}); + ($br, $er) = ($er, $br) if $br > $er; + ($bc, $ec) = ($ec, $bc) if $bc > $ec; + } else { + if ($cr < $self->{ar}) { + ($br, $bc, $er, $ec) = ($cr, $cc, $self->{ar}, $self->{ac}); + } elsif ($cr > $self->{ar}) { + ($br, $bc, $er, $ec) = ($self->{ar}, $self->{ac}, $cr, $cc); + } else { + ($br, $er) = ($cr, $cr); + ($bc, $ec) = $cc < $self->{ac} ? ($cc, $self->{ac}) : ($self->{ac}, $cc); + } + } + + if ($self->{select} eq 'l') { + ($br, $er) = ($self->line($br)->beg, $self->line($er)->end); + ($bc, $ec) = (0, $self->ncol); + } else { + ++$ec; + } + + return ($br, $bc, $er, $ec); +} diff --git a/.config/urxvt/ext/url-select b/.config/urxvt/ext/url-select new file mode 100644 index 0000000..34637bb --- /dev/null +++ b/.config/urxvt/ext/url-select @@ -0,0 +1,408 @@ +#! perl -w +# Author: Bert Muennich +# Website: http://www.github.com/muennich/urxvt-perls +# Based on: http://www.jukie.net/~bart/blog/urxvt-url-yank +# License: GPLv2 + +# Use keyboard shortcuts to select URLs. +# This should be used as a replacement for the default matcher extension, +# it also makes URLs clickable with the middle mouse button. + +# Usage: put the following lines in your .Xdefaults/.Xresources: +# URxvt.perl-ext-common: ...,url-select +# URxvt.keysym.M-u: perl:url-select:select_next + +# Use Meta-u to activate URL selection mode, then use the following keys: +# j/k: Select next downward/upward URL (also with arrow keys) +# g/G: Select first/last URL (also with home/end key) +# o/Return: Open selected URL in browser, Return: deactivate afterwards +# y: Copy (yank) selected URL and deactivate selection mode +# q/Escape: Deactivate URL selection mode + +# Options: +# URxvt.url-select.autocopy: If true, selected URLs are copied to PRIMARY +# URvxt.url-select.button: Mouse button to click-open URLs (default: 2) +# URxvt.url-select.launcher: Browser/command to open selected URL with +# URxvt.url-select.underline: If set to true, all URLs get underlined + +use strict; + +# The custom rendition bit to use for marking the cell as being underlined +# by us so we can unset it again after a line has changed. +use constant UNDERLINED => 1<<3; # arbitrarily chosen in hope of no collision + +sub on_start { + my ($self) = @_; + + # read resource settings + if ($self->x_resource('url-select.launcher')) { + @{$self->{browser}} = split /\s+/, $self->x_resource('url-select.launcher'); + } else { + @{$self->{browser}} = ('x-www-browser'); + } + if ($self->x_resource('url-select.underline') eq 'true') { + $self->enable(line_update => \&line_update); + } + if ($self->x_resource('url-select.autocopy') eq 'true') { + $self->{autocopy} = 1; + } + + $self->{state} = 0; + + for my $mod (split '', $self->x_resource("url-select.button") || + $self->x_resource("matcher.button") || 2) { + if ($mod =~ /^\d+$/) { + $self->{button} = $mod; + } elsif ($mod eq "C") { + $self->{state} |= urxvt::ControlMask; + } elsif ($mod eq "S") { + $self->{state} |= urxvt::ShiftMask; + } elsif ($mod eq "M") { + $self->{state} |= $self->ModMetaMask; + } elsif ($mod ne "-" && $mod ne " ") { + warn("invalid button/modifier in $self->{_name}<$self->{argv}[0]>: $mod\n"); + } + } + + if ($self->x_resource('matcher.pattern')) { + @{$self->{pattern}} = ($self->x_resource('matcher.pattern')); + } elsif ($self->x_resource('matcher.pattern.0')) { + my $current = 0; + + while (defined (my $res = $self->x_resource("matcher.pattern.$current"))) { + $res = $self->locale_decode($res); + utf8::encode $res; + push @{$self->{pattern}}, qr($res)x; + $current++; + } + } else { + @{$self->{pattern}} = qr{ + (?:https?://|ftp://|news://|mailto:|file://|\bwww\.) + [\w\-\@;\/?:&=%\$.+!*\x27,~#]* + ( + \([\w\-\@;\/?:&=%\$.+!*\x27,~#]*\) # Allow a pair of matched parentheses + | # + [\w\-\@;\/?:&=%\$+*~] # exclude some trailing characters (heuristic) + )+ + }x; + } + + () +} + + +sub line_update { + my ($self, $row) = @_; + + my $line = $self->line($row); + my $text = $line->t; + my $rend = $line->r; + + # clear all underlines that were set by us + for (@$rend) { + if (urxvt::GET_CUSTOM($_) & UNDERLINED) { + $_ = urxvt::SET_CUSTOM($_, urxvt::GET_CUSTOM($_) & ~UNDERLINED) & + ~urxvt::RS_Uline; + } + } + + for my $pattern (@{$self->{pattern}}) { + while ($text =~ /$pattern/g) { + my $url = $&; + my ($beg, $end) = ($-[0], $+[0] - 1); + + for (@{$rend}[$beg .. $end]) { + unless ($_ & urxvt::RS_Uline) { + $_ = urxvt::SET_CUSTOM($_, urxvt::GET_CUSTOM($_) | UNDERLINED); + $_ |= urxvt::RS_Uline; + } + } + } + } + + $line->r($rend); + + () +} + +sub on_action { + my ($self, $action) = @_; + + on_user_command($self, "url-select:" . $action); +} + + +sub on_user_command { + my ($self, $cmd) = @_; + + if ($cmd eq 'url-select:select_next') { + if (not $self->{active}) { + activate($self); + } + select_next($self, -1); + } + + () +} + + +sub key_press { + my ($self, $event, $keysym) = @_; + my $char = chr($keysym); + + if ($keysym == 0xff1b || lc($char) eq 'q' || + (lc($char) eq 'c' && $event->{state} & urxvt::ControlMask)) { + deactivate($self); + } elsif ($keysym == 0xff0d || $char eq 'o' || + (lc($char) eq 'm' && $event->{state} & urxvt::ControlMask)) { + $self->exec_async(@{$self->{browser}}, ${$self->{found}[$self->{n}]}[4]); + deactivate($self) unless $char eq 'o'; + } elsif ($char eq 'y') { + my $found = $self->{found}[$self->{n}]; + $self->selection_beg(${$found}[0], ${$found}[1]); + $self->selection_end(${$found}[2], ${$found}[3]); + $self->selection_make($event->{time}); + $self->selection_beg(1, 0); + $self->selection_end(1, 0); + deactivate($self); + } elsif ($char eq 'k' || $keysym == 0xff52 || $keysym == 0xff51) { + select_next($self, -1, $event); + } elsif ($char eq 'j' || $keysym == 0xff54 || $keysym == 0xff53) { + select_next($self, 1, $event); + } elsif ($char eq 'g' || $keysym == 0xff50) { + $self->{row} = $self->top_row - 1; + delete $self->{found}; + select_next($self, 1, $event); + } elsif ($char eq 'G' || $keysym == 0xff57) { + $self->{row} = $self->nrow; + delete $self->{found}; + select_next($self, -1, $event); + } + + return 1; +} + + +sub on_button_press { + my ($self, $event) = @_; + + my $mask = $self->ModLevel3Mask | $self->ModMetaMask | + urxvt::ShiftMask | urxvt::ControlMask; + + if ($event->{button} == $self->{button} && ($event->{state} & $mask) == $self->{state}) { + my $col = $event->{col}; + my $row = $event->{row}; + my $line = $self->line($row); + my $text = $line->t; + + for my $pattern (@{$self->{pattern}}) { + while ($text =~ /$pattern/g) { + my ($url, $beg, $end) = ($&, $-[0], $+[0]); + --$end if $url =~ s/["')]$//; + + if ($col >= $beg && $col <= $end) { + $self->{button_pressed} = 1; + $self->{button_col} = $col; + $self->{button_row} = $row; + $self->{button_url} = $url; + return 1; + } + } + } + } + + () +} + +sub on_button_release { + my ($self, $event) = @_; + + if ($self->{button_pressed} && $event->{button} == $self->{button}) { + my $col = $event->{col}; + my $row = $event->{row}; + + $self->{button_pressed} = 0; + + if ($col == $self->{button_col} && $row == $self->{button_row}) { + $self->exec_async(@{$self->{browser}}, $self->{button_url}); + return 1; + } + } + + () +} + + +sub select_next { + # $dir < 0: up, > 0: down + my ($self, $dir, $event) = @_; + my $row = $self->{row}; + + if (($dir < 0 && $self->{n} > 0) || + ($dir > 0 && $self->{n} < $#{ $self->{found} })) { + # another url on current line + $self->{n} += $dir; + hilight($self); + if ($self->{autocopy}) { + my $found = $self->{found}[$self->{n}]; + $self->selection_beg(${$found}[0], ${$found}[1]); + $self->selection_end(${$found}[2], ${$found}[3]); + $self->selection_make($event->{time}); + $self->selection_beg(1, 0); + $self->selection_end(1, 0); + } + return; + } + + while (($dir < 0 && $row > $self->top_row) || + ($dir > 0 && $row < $self->nrow - 1)) { + my $line = $self->line($row); + $row = ($dir < 0 ? $line->beg : $line->end) + $dir; + $line = $self->line($row); + my $text = $line->t; + + for my $pattern (@{$self->{pattern}}) { + if ($text =~ /$pattern/g) { + delete $self->{found}; + + do { + my ($beg, $end) = ($-[0], $+[0]); + push @{$self->{found}}, [$line->coord_of($beg), + $line->coord_of($end), substr($text, $beg, $end - $beg)]; + } while ($text =~ /$pattern/g); + + $self->{row} = $row; + $self->{n} = $dir < 0 ? $#{$self->{found}} : 0; + hilight($self); + if ($self->{autocopy}) { + my $found = $self->{found}[$self->{n}]; + $self->selection_beg(${$found}[0], ${$found}[1]); + $self->selection_end(${$found}[2], ${$found}[3]); + $self->selection_make($event->{time}); + $self->selection_beg(1, 0); + $self->selection_end(1, 0); + } + return; + } + } + } + + deactivate($self) unless $self->{found}; + + () +} + + +sub hilight { + my ($self) = @_; + + if ($self->{found}) { + if ($self->{row} < $self->view_start() || + $self->{row} >= $self->view_start() + $self->nrow) { + # scroll selected url into visible area + my $top = $self->{row} - ($self->nrow >> 1); + $self->view_start($top < 0 ? $top : 0); + } + + status_area($self); + $self->want_refresh(); + } + + () +} + + +sub refresh { + my ($self) = @_; + + if ($self->{found}) { + if ($self->x_resource('highlightColor')) { + $self->scr_xor_span(@{$self->{found}[$self->{n}]}[0 .. 3], urxvt::RS_Sel); + } else { + $self->scr_xor_span(@{$self->{found}[$self->{n}]}[0 .. 3], urxvt::RS_RVid); + } + } + + () +} + + +sub status_area { + my ($self) = @_; + + my $row = $self->{row} < 0 ? + $self->{row} - $self->top_row : abs($self->top_row) + $self->{row}; + my $text = sprintf("%d,%d ", $row + 1, $self->{n} + 1); + + if ($self->top_row == 0) { + $text .= "All"; + } elsif ($self->view_start() == $self->top_row) { + $text .= "Top"; + } elsif ($self->view_start() == 0) { + $text .= "Bot"; + } else { + $text .= sprintf("%2d%", + ($self->top_row - $self->view_start) * 100 / $self->top_row); + } + + my $text_len = length($text); + + if ($self->{overlay_len} != $text_len) { + delete $self->{overlay} if $self->{overlay}; + $self->{overlay} = $self->overlay(-1, -1, $text_len, 1, + urxvt::OVERLAY_RSTYLE, 0); + $self->{overlay_len} = $text_len; + } + + $self->{overlay}->set(0, 0, $self->special_encode($text)); + $self->{overlay}->show(); + + () +} + + +sub tt_write { + return 1; +} + + +sub activate { + my ($self) = @_; + + $self->{active} = 1; + + $self->{row} = $self->view_start() + $self->nrow; + $self->{n} = 0; + $self->{overlay_len} = 0; + $self->{button_pressed} = 0; + + $self->{view_start} = $self->view_start(); + $self->{pty_ev_events} = $self->pty_ev_events(urxvt::EV_NONE); + + $self->enable( + key_press => \&key_press, + refresh_begin => \&refresh, + refresh_end => \&refresh, + tt_write => \&tt_write, + ); + + () +} + + +sub deactivate { + my ($self) = @_; + + $self->disable("key_press", "refresh_begin", "refresh_end", "tt_write"); + $self->view_start($self->{view_start}); + $self->pty_ev_events($self->{pty_ev_events}); + + delete $self->{overlay} if $self->{overlay}; + delete $self->{found} if $self->{found}; + + $self->want_refresh(); + + $self->{active} = 0; + + () +} diff --git a/.config/vale/vale.ini b/.config/vale/vale.ini index 2eb8def..3f52cff 100644 --- a/.config/vale/vale.ini +++ b/.config/vale/vale.ini @@ -1,9 +1,12 @@ -StylesPath = /home/thedro/.config/vale/styles MinAlertLevel = suggestion +StylesPath = /home/thedro/.config/vale/styles [*.{md,txt}] #BasedOnStyles = google +#BasedOnStyles = hemingway #BasedOnStyles = joblint #BasedOnStyles = microsoft #BasedOnStyles = proselint -BasedOnStyles = write-good +BasedOnStyles = thedro +BasedOnStyles = technical +BasedOnStyles = write-good |