From e9980dfd5464481a24ed59e93ff08acb0142f429 Mon Sep 17 00:00:00 2001 From: Lord_Devi Date: Wed, 17 Jul 2024 23:34:32 -0400 Subject: [PATCH] Added xorg config stuff. --- .Xresources | 1 + .config/gtk-3.0/settings.ini | 21 +++ .config/tridactyl/tridactylrc | 170 ++++++++++++++++++ .config/xorg/Xresources | 1 + .config/xorg/Xresources##default | 11 ++ .config/xorg/Xresources##hostname.baraddur | 12 ++ .config/xorg/Xresources##hostname.mairon | 11 ++ .config/xorg/Xresources##hostname.xenophon | 11 ++ .config/xorg/Xresources.common | 25 +++ .../xorg/colorschemes/theme-draculapro.xrdb | 34 ++++ .config/xorg/colorschemes/theme-lorddevi.xrdb | 39 ++++ .../xorg/colorschemes/theme-mgkone-green.xrdb | 42 +++++ .../xorg/colorschemes/theme-solarized.xrdb | 33 ++++ .../xorg/colorschemes/theme-sourcerer.xrdb | 32 ++++ .config/xorg/theme.xrdb | 1 + .config/xorg/xinitrc | 3 + .config/xorg/xsettingsd | 4 + .xinitrc | 1 + 18 files changed, 452 insertions(+) create mode 120000 .Xresources create mode 100644 .config/gtk-3.0/settings.ini create mode 100644 .config/tridactyl/tridactylrc create mode 120000 .config/xorg/Xresources create mode 100644 .config/xorg/Xresources##default create mode 100644 .config/xorg/Xresources##hostname.baraddur create mode 100644 .config/xorg/Xresources##hostname.mairon create mode 100644 .config/xorg/Xresources##hostname.xenophon create mode 100644 .config/xorg/Xresources.common create mode 100644 .config/xorg/colorschemes/theme-draculapro.xrdb create mode 100644 .config/xorg/colorschemes/theme-lorddevi.xrdb create mode 100644 .config/xorg/colorschemes/theme-mgkone-green.xrdb create mode 100644 .config/xorg/colorschemes/theme-solarized.xrdb create mode 100644 .config/xorg/colorschemes/theme-sourcerer.xrdb create mode 120000 .config/xorg/theme.xrdb create mode 100644 .config/xorg/xinitrc create mode 100644 .config/xorg/xsettingsd create mode 120000 .xinitrc diff --git a/.Xresources b/.Xresources new file mode 120000 index 0000000..cfbbf3e --- /dev/null +++ b/.Xresources @@ -0,0 +1 @@ +.config/xorg/Xresources##hostname.mairon \ No newline at end of file diff --git a/.config/gtk-3.0/settings.ini b/.config/gtk-3.0/settings.ini new file mode 100644 index 0000000..d197a09 --- /dev/null +++ b/.config/gtk-3.0/settings.ini @@ -0,0 +1,21 @@ +[Settings] +gtk-application-prefer-dark-theme=true +gtk-button-images=true +gtk-cursor-theme-name=breeze_cursors +gtk-cursor-theme-size=24 +gtk-decoration-layout=icon:minimize,maximize,close +gtk-enable-animations=true +gtk-enable-event-sounds=0 +gtk-enable-input-feedback-sounds=0 +gtk-font-name="JetBrainsMono Nerd Font 10" +gtk-icon-theme-name=breeze +gtk-menu-images=true +#gtk-modules=colorreload-gtk-module +gtk-primary-button-warps-slider=false +gtk-theme-name=Adwaita-dark +gtk-toolbar-icon-size=GTK_ICON_SIZE_SMALL_TOOLBAR +gtk-toolbar-style=3 +gtk-xft-antialias=1 +gtk-xft-hinting=1 +gtk-xft-hintstyle=hintslight +gtk-xft-rgba=rgb diff --git a/.config/tridactyl/tridactylrc b/.config/tridactyl/tridactylrc new file mode 100644 index 0000000..c914941 --- /dev/null +++ b/.config/tridactyl/tridactylrc @@ -0,0 +1,170 @@ +" " bovine3dom's dogfood +" +" " Every line in this file is commented out because in general they're all bad ideas. +" " If anything in here was a good idea, it would be default behaviour in Tridactyl. +" " It's just a collection of interesting ideas that happen to also be bovine3dom's +" " RC file +" +" " WARNING: This file defines and runs a command called fixamo_quiet. If you +" " also have a malicious addon that operates on `` installed this +" " will allow it to steal your firefox account credentials! +" " +" " With those credentials, an attacker can read anything in your sync account, +" " publish addons to the AMO, etc, etc. +" " +" " Without this command a malicious addon can steal credentials from any site +" " that you visit that is not in the restrictedDomains list. +" " +" " You should comment out the fixamo lines unless you are entirely sure that +" " they are what you want. +" " +" " The advantage of running the command is that you can use the tridactyl +" " interface on addons.mozilla.org and other restricted sites. +" +" " Provided only as an example. +" " Do not install/run without reading through as you may be surprised by some +" " of the settings. +" +" " May require the latest beta builds. +" +" " Uncomment the lines you want to keep then move this file to +" " $XDG_CONFIG_HOME/tridactyl/tridactylrc (that's +" " ~/.config/tridactyl/tridactylrc to mere mortals) or ~/.tridactylrc and +" " install the native messenger (:installnative in Tridactyl). Run :source to +" " get it in the browser, or just restart. +" +" " If you're bovine3dom run sed 's|^" ||' .tridactylrc > ~/.config/tridactyl/tridactylrc +" +" +" " +" " Binds +" " +" +" " Comment toggler for Reddit, Hacker News and Lobste.rs +" bind ;c hint -Jc [class*="expand"],[class*="togg"],[class="comment_folder"] +" +" " GitHub pull request checkout command to clipboard (only works if you're a collaborator or above) +" bind yp composite js document.getElementById("clone-help-step-1").textContent.replace("git checkout -b", "git checkout -B").replace("git pull ", "git fetch ") + "git reset --hard " + document.getElementById("clone-help-step-1").textContent.split(" ")[3].replace("-","/") | yank +" +" " Git{Hub,Lab} git clone via SSH yank +" bind yg composite js "git clone " + document.location.href.replace(/https?:\/\//,"git@").replace("/",":").replace(/$/,".git") | clipboard yank +" +" " As above but execute it and open terminal in folder +" bind ,g js let uri = document.location.href.replace(/https?:\/\//,"git@").replace("/",":").replace(/$/,".git"); tri.native.run("cd ~/projects; git clone " + uri + "; cd \"$(basename \"" + uri + "\" .git)\"; st") +" +" +" " make d take you to the left (I find it much less confusing) +" bind d composite tabprev; tabclose # +" bind D tabclose +" +" " make t open the selection with tabopen +" bind --mode=visual t composite js document.getSelection().toString() | fillcmdline tabopen +" +" " I like wikiwand but I don't like the way it changes URLs +" bindurl wikiwand.com yy composite js document.location.href.replace("wikiwand.com/en","wikipedia.org/wiki") | clipboard yank +" +" " Make gu take you back to subreddit from comments +" bindurl reddit.com gu urlparent 4 +" +" " Only hint search results on Google and DDG +" bindurl www.google.com f hint -Jc #search div:not(.action-menu) > a +" bindurl www.google.com F hint -Jbc #search div:not(.action-menu) > a +" +" +" bindurl ^https://duckduckgo.com f hint -Jc [data-testid="result-title-a"] +" bindurl ^https://duckduckgo.com F hint -Jbc [data-testid="result-title-a"] +" +" " Allow Ctrl-a to select all in the commandline +" unbind --mode=ex +" +" " Allow Ctrl-c to copy in the commandline +" unbind --mode=ex +" +" " Handy multiwindow/multitasking binds +" bind gd tabdetach +" bind gD composite tabduplicate; tabdetach +" +" " Stupid workaround to let hint -; be used with composite which steals semi-colons +" command hint_focus hint -; +" +" " Open right click menu on links +" bind ;C composite hint_focus; !s xdotool key Menu +" +" " Suspend / "discard" all tabs - handy for stretching out battery life +" command discardall jsb browser.tabs.query({}).then(ts => browser.tabs.discard(ts.map(t=>t.id))) +" +" " Julia docs' built in search is bad +" set searchurls.julia https://www.google.com/search?q=site:http://docs.julialang.org/en/v1%20 +" +" " +" " Misc settings +" " +" +" " set editorcmd to suckless terminal, or use the defaults on other platforms +" js tri.browserBg.runtime.getPlatformInfo().then(os=>{const editorcmd = os.os=="linux" ? "st vim" : "auto"; tri.config.set("editorcmd", editorcmd)}) +" +" " set profile dir on Windows +" jsb browser.runtime.getPlatformInfo().then(os=>{const profiledir = os.os=="win" ? "C:\\Users\\olie\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles\\gwm76nmk.default" : "auto"; tri.config.set("profiledir", profiledir)}) +" +" " Sane hinting mode +" set hintfiltermode vimperator-reflow +" set hintnames numeric +" +" " Defaults to 300ms but I'm a 'move fast and close the wrong tabs' kinda chap +" set hintdelay 100 +" +" " Add helper commands that Mozillians think make Firefox irredeemably +" " insecure. For details, read the comment at the top of this file. +" command fixamo_quiet jsb tri.excmds.setpref("privacy.resistFingerprinting.block_mozAddonManager", "true").then(tri.excmds.setpref("extensions.webextensions.restrictedDomains", '""')) +" command fixamo js tri.excmds.setpref("privacy.resistFingerprinting.block_mozAddonManager", "true").then(tri.excmds.setpref("extensions.webextensions.restrictedDomains", '""').then(tri.excmds.fillcmdline_tmp(3000, "Permissions added to user.js. Please restart Firefox to make them take affect."))) +" +" " Make Tridactyl work on more sites at the expense of some security. +" " For details, read the comment at the top of this file. +" fixamo_quiet +" +" " The following modification allows Tridactyl to function on more pages, e.g. raw GitHub pages. +" " You may not wish to run this. Mozilla strongly feels that you shouldn't. +" " Read https://wiki.mozilla.org/Security/CSP#Goals for more information. +" " +" " Equivalent to `set csp clobber` before it was removed. +" " This weakens your defences against cross-site-scripting attacks +" " and other types of code-injection by reducing the strictness +" " of Content Security Policy on all sites in a couple of ways. +" " +" " We remove the sandbox directive +" " https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/sandbox +" " which allows our iframe (and anyone else's) to run on any website. +" " +" " We weaken the style-src directive +" " https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/style-src +" " to allow us to theme our elements. +" " This exposes you to 'cross site styling' attacks +" jsb browser.webRequest.onHeadersReceived.addListener(tri.request.clobberCSP,{urls:[""],types:["main_frame"]},["blocking","responseHeaders"]) +" +" " Make quickmarks for the sane Tridactyl issue view +" quickmark t https://github.com/tridactyl/tridactyl/issues?utf8=%E2%9C%93&q=sort%3Aupdated-desc+ + +" " Quickmark for PRs by humans +" quickmark p https://github.com/tridactyl/tridactyl/pulls?q=is%3Apr+is%3Aopen+-label%3Adependencies+-author%3Abovine3dom+sort%3Aupdated-desc +" +" " Inject Google Translate +" " This (clearly) is remotely hosted code. Google will be sent the whole +" " contents of the page you are on if you run `:translate` +" " From https://github.com/jeremiahlee/page-translator +" command translate js let googleTranslateCallback = document.createElement('script'); googleTranslateCallback.innerHTML = "function googleTranslateElementInit(){ new google.translate.TranslateElement(); }"; document.body.insertBefore(googleTranslateCallback, document.body.firstChild); let googleTranslateScript = document.createElement('script'); googleTranslateScript.charset="UTF-8"; googleTranslateScript.src = "https://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit&tl=&sl=&hl="; document.body.insertBefore(googleTranslateScript, document.body.firstChild); +" +" " +" " URL redirects +" " +" +" " New reddit is bad +" autocmd DocStart ^http(s?)://www.reddit.com js tri.excmds.urlmodify("-t", "www", "old") +" " Mosquito nets won't make themselves +" autocmd DocStart ^http(s?)://www.amazon.co.uk js tri.excmds.urlmodify("-t", "www", "smile") +" +" " Isolate Facebook in its own container +" " set auconcreatecontainer true +" " autocontain facebook\.com facebook +" +" " For syntax highlighting see https://github.com/tridactyl/vim-tridactyl +" " vim: set filetype=tridactyl diff --git a/.config/xorg/Xresources b/.config/xorg/Xresources new file mode 120000 index 0000000..14fceee --- /dev/null +++ b/.config/xorg/Xresources @@ -0,0 +1 @@ +Xresources##hostname.mairon \ No newline at end of file diff --git a/.config/xorg/Xresources##default b/.config/xorg/Xresources##default new file mode 100644 index 0000000..d0219e2 --- /dev/null +++ b/.config/xorg/Xresources##default @@ -0,0 +1,11 @@ +! ~/.config/xorg/Xresources##default +! Author: Lord_Devi +! Description: This is the defualt Xresources. + +Xcursor.size: 64 +Xft.dpi: 96 + +Emacs.font: JetBrainsMono Nerd Font-16 + +! Color Theme: This gets used by terminals like xterm and urxvt. +#include ".config/xorg/Xresources.common" diff --git a/.config/xorg/Xresources##hostname.baraddur b/.config/xorg/Xresources##hostname.baraddur new file mode 100644 index 0000000..362bc78 --- /dev/null +++ b/.config/xorg/Xresources##hostname.baraddur @@ -0,0 +1,12 @@ +! ~/.config/xorg/Xresources.baraddur +! Author: Lord_Devi +! Description: This is an Xresources file for Barad-dur. + +Xcursor.size: 64 +!Xft.dpi: 192 +Xft.dpi: 96 + +Emacs.font: JetBrainsMono Nerd Font-16 + +! Color Theme: This gets used by terminals like xterm and urxvt. +#include ".config/xorg/Xresources.common" diff --git a/.config/xorg/Xresources##hostname.mairon b/.config/xorg/Xresources##hostname.mairon new file mode 100644 index 0000000..1c6de2c --- /dev/null +++ b/.config/xorg/Xresources##hostname.mairon @@ -0,0 +1,11 @@ +! ~/.config/xorg/Xresources.mairon +! Author: Lord_Devi +! Description: This is an Xresources file for Mairon. +Xcursor.size: 64 +Xft.dpi: 192 +!Xft.dpi: 96 + +!Emacs.font: JetBrainsMono Nerd Font-12 + +! Include common settings +#include "$HOME/.config/xorg/Xresources.common" diff --git a/.config/xorg/Xresources##hostname.xenophon b/.config/xorg/Xresources##hostname.xenophon new file mode 100644 index 0000000..cecf6bd --- /dev/null +++ b/.config/xorg/Xresources##hostname.xenophon @@ -0,0 +1,11 @@ +! ~/.config/xorg/Xresources.xenophon +! Author: Lord_Devi +! Description: This is an Xresources file for Xenophon. +Xcursor.size: 64 +!Xft.dpi: 192 +Xft.dpi: 96 + +Emacs.font: JetBrainsMono Nerd Font-9 + +! Include common settings +#include ".config/xorg/Xresources.common" diff --git a/.config/xorg/Xresources.common b/.config/xorg/Xresources.common new file mode 100644 index 0000000..e25c149 --- /dev/null +++ b/.config/xorg/Xresources.common @@ -0,0 +1,25 @@ +! ~/.config/xorg/Xresources +! Author: Lord_Devi +! Description: This is the common Xresources settings file. + +! Add some font config defaults for applications that dont support +! the Fontconfig server. +Xft.hinting: 1 +Xft.hintstyle: hintfull +Xft.antialias: 1 +Xft.rgba: rgb + +! Color Theme: This gets used by terminals like xterm and urxvt. +#include "theme.xrdb" + +! Escape sequence adjustment for adding custom keybindings. +!XTerm*metaSendsEscape: true +!XTerm*eightBitInput: false +! +!! Keybindings for tmux/vim pane shifting. +!XTerm*Translations: #override \ +! Ctrl ~Meta Shift h :string("\033[104;5u") \n\ +! Ctrl ~Meta Shift l :string("\033[108;5u") \n\ +! Ctrl ~Meta Shift j :string("\033[106;5u") \n\ +! Ctrl ~Meta Shift k :string("\033[107;5u") \n\ +! Ctrl ~Meta Shift \ :string("\033[92;5u") diff --git a/.config/xorg/colorschemes/theme-draculapro.xrdb b/.config/xorg/colorschemes/theme-draculapro.xrdb new file mode 100644 index 0000000..0525bed --- /dev/null +++ b/.config/xorg/colorschemes/theme-draculapro.xrdb @@ -0,0 +1,34 @@ +! ~/.config/xorg/theme-draculapro.xrdb +! Author: Lord_Devi +! Description: Xresources file for the dracula pro color scheme. + +*background: #22212c +*foreground: #f8f8f2 +*cursor: #f8f8f2 +*cursor_text_color: #454158 +*selection_background: #454158 +*selection_foreground: #f8f8f2 +! Black +*color0: #22212c +*color8: #22212c +! Red +*color1: #ff9580 +*color9: #ffaa99 +! Green +*color2: #8aff80 +*color10: #a2ff99 +! Yellow +*color3: #ffff80 +*color11: #ffff99 +! Blue +*color4: #9580ff +*color12: #aa99ff +! Magenta +*color5: #ff80bf +*color13: #ff99cc +! Cyan +*color6: #80ffea +*color14: #99ffee +! White +*color7: #f8f8f2 +*color15: #ffffff diff --git a/.config/xorg/colorschemes/theme-lorddevi.xrdb b/.config/xorg/colorschemes/theme-lorddevi.xrdb new file mode 100644 index 0000000..3ddc0c7 --- /dev/null +++ b/.config/xorg/colorschemes/theme-lorddevi.xrdb @@ -0,0 +1,39 @@ +! ~/.config/xorg/theme-lorddevi.xrdb +! Author: Lord_Devi +! Description: My first attempt at a custom color theme. +! special +*.foreground: #bfbfbf +*.background: #000000 +*.cursorColor: #990000 + +! black +*.color0: #000000 +*.color8: #666666 + +! red +*.color1: #990000 +*.color9: #e50000 + +! green +*.color2: #00a600 +*.color10: #00d900 + +! yellow +*.color3: #999900 +*.color11: #e5e500 + +! blue +*.color4: #1f08db +*.color12: #0000ff + +! magenta +*.color5: #b200b2 +*.color13: #e500e5 + +! cyan +*.color6: #00a6b2 +*.color14: #00e5e5 + +! white +*.color7: #bfbfbf +*.color15: #e5e5e5 diff --git a/.config/xorg/colorschemes/theme-mgkone-green.xrdb b/.config/xorg/colorschemes/theme-mgkone-green.xrdb new file mode 100644 index 0000000..8cd622a --- /dev/null +++ b/.config/xorg/colorschemes/theme-mgkone-green.xrdb @@ -0,0 +1,42 @@ +! ~/.config/xorg/theme-mgkone-green.xrdb +! Author: Lord_Devi +! Description: My first attempt at a custom color theme. + +! special +*foreground: #00ba67 +*background: #141a19 +*cursorColor: #ac0303 +*selection_foreground: #0e130e +*selection_background: #2abd89 + +! black +*color0: #30352e +*color8: #5d675a + +! red +*color1: #ac0303 +*color9: #fb4444 + +! green +*color2: #077506 +*color10: #00bb00 + +! yellow +*color3: #b0a30e +*color11: #def112 + +! blue +*color4: #1763be +*color12: #129ae7 + +! magenta +*color5: #946c9e +*color13: #dd73fb + +! cyan +*color6: #06989a +*color14: #34e2e2 + +! white +*color7: #1f8f67 +*color15: #2abd89 diff --git a/.config/xorg/colorschemes/theme-solarized.xrdb b/.config/xorg/colorschemes/theme-solarized.xrdb new file mode 100644 index 0000000..bed4354 --- /dev/null +++ b/.config/xorg/colorschemes/theme-solarized.xrdb @@ -0,0 +1,33 @@ +! ~/.config/xorg/theme-draculapro.xrdb +! Author: Lord_Devi +! Description: Xresources file for the dracula pro color scheme. + +*background: #001e26 +*foreground: #9bc1c2 +*cursor: #f34a00 +*selection_foreground: #001e26 +! Black +*color0: #002731 +*color8: #006388 +! Red +*color1: #d01b24 +*color9: #f4153b +! Green +*color2: #6bbe6c +*color10: #50ee84 +! Yellow +*color3: #a577053 +*color11: #b17e28 +! Blue +*color4: #2075c7 +*color12: #178dc7 +! Magenta +*color5: #c61b6e +*color13: #e14d8e +! Cyan +*color6: #259185 +*color14: #00b29e +! White +*color7: #e9e2cb +*color15: #fcf4dc + diff --git a/.config/xorg/colorschemes/theme-sourcerer.xrdb b/.config/xorg/colorschemes/theme-sourcerer.xrdb new file mode 100644 index 0000000..8bc7407 --- /dev/null +++ b/.config/xorg/colorschemes/theme-sourcerer.xrdb @@ -0,0 +1,32 @@ +! █▓▒░ scorcerer colors +*.foreground: #c2c2b0 +*.background: #222222 +*.cursorColor: #c2c2b0 +! black +*.color0: #111111 +*.color8: #181818 +! red +*.color1: #aa4450 +*.color9: #ff6a6a +! green +*.color2: #719611 +*.color10: #b1d631 +! yellow +*.color3: #ff9800 +*.color11: #87875f +! blue +*.color4: #6688aa +*.color12: #90b0d1 +! magenta +*.color5: #8f6f8f +*.color13: #8181a6 +! cyan +*.color6: #528b8b +*.color14: #87ceeb +! white +*.color7: #d3d3d3 +*.color15: #c1cdc1 +! stylized +*.colorIT: #719611 +*.colorBD: #d3d3d3 +*.colorUL: #528b8b \ No newline at end of file diff --git a/.config/xorg/theme.xrdb b/.config/xorg/theme.xrdb new file mode 120000 index 0000000..4a7c735 --- /dev/null +++ b/.config/xorg/theme.xrdb @@ -0,0 +1 @@ +colorschemes/theme-lorddevi.xrdb \ No newline at end of file diff --git a/.config/xorg/xinitrc b/.config/xorg/xinitrc new file mode 100644 index 0000000..103db16 --- /dev/null +++ b/.config/xorg/xinitrc @@ -0,0 +1,3 @@ +xrdb -merge ~/.Xresources + +exec /usr/bin/dbus-launch --exit-with-session /usr/local/bin/stumpwm diff --git a/.config/xorg/xsettingsd b/.config/xorg/xsettingsd new file mode 100644 index 0000000..be6b6d3 --- /dev/null +++ b/.config/xorg/xsettingsd @@ -0,0 +1,4 @@ +Xft/Hinting 1 +Xft/HintStyle "hintfull" +Xft/Antialias 1 +Xft/RGBA "rgb" diff --git a/.xinitrc b/.xinitrc new file mode 120000 index 0000000..f3ec5f8 --- /dev/null +++ b/.xinitrc @@ -0,0 +1 @@ +.config/xorg/xinitrc \ No newline at end of file