Last active
November 4, 2022 05:00
-
-
Save yne/4d10640be129bfa0022db21715998576 to your computer and use it in GitHub Desktop.
wget -O- git.io/yne.install | bash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -x | |
until sudo apt -y update && sudo apt -y upgrade ; do sleep 10; done | |
crontab -l | grep -q .wall || (echo '0 * * * * ID=$(curl -sL gist.githubusercontent.com/yne/729655bd0557bfde7a088e15b40b9e6d/raw/ | shuf -n 1);for t in jpg png; do curl -sfL nik.bot.nu/o$ID.$t -o "$HOME/.wall"; done') | crontab - | |
# MS-EDGE | |
REPO_EDGE='https://packages.microsoft.com/repos/edge/pool/main/m/microsoft-edge-dev/' | |
LAST_EDGE=$(wget -qO- "$REPO_EDGE" | grep -o '[.a-z_0-9-]*.deb' | tail -n1) | |
wget -O /tmp/edge_amd64 "$REPO_EDGE/$LAST_EDGE" | |
# VSCode (will add itself to apt.list) | |
wget -O /tmp/code_amd64.deb 'https://code.visualstudio.com/sha/download?build=stable&os=linux-deb-x64' | |
until sudo apt -y install /tmp/*_amd64.deb git vim curl htop tig tmux sshfs mpv inotify-tools exfat-fuse exfat-utils pulseaudio-module-bluetooth ; do sleep 10; done | |
until sudo apt -y autoremove ; do sleep 10; done | |
pactl load-module module-bluetooth-discover | |
# setup git | |
git config --global user.name yne | |
git config --global user.email yne@users.noreply.github.com | |
git config --global init.defaultBranch master | |
# setup git PS1 | |
cat << 'EOF' >> "$HOME/.bash_aliases" | |
GIT_PS1_SHOWCOLORHINTS=1; | |
GIT_PS1_SHOWDIRTYSTATE=1; | |
GIT_PS1_SHOWSTASHSTATE=1; | |
GIT_PS1_SHOWUNTRACKEDFILES=1; | |
GIT_PS1_SHOWUPSTREAM=verbose; | |
GIT_PS1_DESCRIBE_STYLE=branch | |
PS1='\[\e]2;\u@\h:\w$(__git_ps1 " (%s)")\a\]\$ ' | |
alias tiga='tig --all' | |
alias apt='sudo apt' | |
EOF | |
# Code is the new Document | |
mkdir "$HOME/Code" | |
cat << 'EOF' >> "$HOME/.config/user-dirs.dirs" | |
XDG_DOCUMENTS_DIR="$HOME/Code" | |
EOF | |
cat << 'EOF' >> "$HOME/.config/autostart/NaturalScroll.desktop" | |
[Desktop Entry] | |
Type=Application | |
Name=synclient | |
Exec=synclient HorizScrollDelta=-45 VertScrollDelta=-45 HorizHysteresis=0 VertHysteresis=0 TapButton3=2 | |
OnlyShowIn=XFCE; | |
EOF | |
exit | |
cat << 'EOF' >> "$HOME/.config/xfce4/terminal/terminalrc" | |
[Configuration] | |
ColorPalette=rgb(4,3,3);rgb(204,0,0);rgb(78,154,6);rgb(196,160,0);rgb(52,101,164);rgb(117,80,123);rgb(6,152,154);rgb(211,215,207);rgb(148,148,148);rgb(239,41,41);rgb(138,226,52);rgb(252,233,79);rgb(115,159,207);rgb(173,127,168);rgb(52,226,226);rgb(238,238,236) | |
FontName=Liberation Mono 10 | |
MiscAlwaysShowTabs=FALSE | |
MiscCursorBlinks=TRUE | |
MiscCursorShape=TERMINAL_CURSOR_SHAPE_BLOCK | |
MiscMenubarDefault=FALSE | |
MiscMouseAutohide=TRUE | |
MiscToolbarDefault=FALSE | |
MiscTabCloseButtons=FALSE | |
MiscUseShiftArrowsToScroll=TRUE | |
ScrollingBar=TERMINAL_SCROLLBAR_NONE | |
ScrollingUnlimited=TRUE | |
TitleMode=TERMINAL_TITLE_REPLACE | |
FontAllowBold=FALSE | |
BackgroundDarkness=0,760000 | |
ColorBackground=#444344434443 | |
ColorCursor=#0000aaa90000 | |
ShortcutsNoHelpkey=TRUE | |
ShortcutsNoMenukey=TRUE | |
EOF | |
#hide "config" menu from whisher (reload needed) | |
mkdir -p "$HOME/.local/share/desktop-directories" | |
cat << 'EOF' >> "$HOME/.local/share/desktop-directories/xfce-settings.directory" | |
[Desktop Entry] | |
Version=1.0 | |
Type=Directory | |
Name=Settings | |
Comment=Desktop and system settings applications | |
Icon=preferences-desktop | |
NoDisplay=true | |
Categories=X-XFCE;X-Xfce-Toplevel; | |
StartupNotify=false | |
Terminal=false | |
EOF | |
CFG="$HOME/.config/xfce4/panel/whiskermenu-1.rc" | |
sed -i 's/\(button-icon=\)[-[:alnum:]]*/\1application-menu-symbolic/' "$CFG" | |
sed -i 's/\(launcher-show-tooltip=\)[[:alnum:]]*/\1false/' "$CFG" | |
sed -i 's/\(item-icon-size=\)[[:alnum:]]*/\10/' "$CFG" | |
sed -i 's/\(hover-switch-category=\)[[:alnum:]]*/\1true/' "$CFG" | |
sed -i 's/\(category-show-name=\)[[:alnum:]]*/\1false/' "$CFG" | |
sed -i 's/\(load-hierarchy=\)[[:alnum:]]*/\1false/' "$CFG" | |
sed -i 's/\(position-commands-alternate=\)[[:alnum:]]*/\1true/' "$CFG" | |
sed -i 's/\(show-command-settings=\)[[:alnum:]]*/\1false/' "$CFG" | |
sed -i 's/\(show-command-lockscreen=\)[[:alnum:]]*/\1false/' "$CFG" | |
sed -i 's/\(menu-width=\)[[:alnum:]]*/\1220/' "$CFG" | |
sed -i 's/\(menu-height=\)[[:alnum:]]*/\1400/' "$CFG" | |
sed -i 's/\(menu-opacity=\)[[:alnum:]]*/\190/' "$CFG" | |
sed -i 's/\(recent-items-max=\)[[:alnum:]]*/\10/' "$CFG" | |
cat << 'EOF' >> "$CFG" | |
[action5] | |
name=Calculate | |
pattern=^=(.*) | |
command=bash -c "notify-send -i accessories-calculator-symbolic $((\\1))" | |
regex=true | |
EOF | |
#^=(.*) bash -c "notify-send $((\1))" | |
clockid=$(xfconf-query -c xfce4-panel -l | grep digital-format | sed 's/[^0-9]//g') | |
xfconf-query -c xfce4-keyboard-shortcuts -p / -rR | |
xfparams=" | |
xsettings/Gtk/FontName=Liberation Sans 10 | |
xsettings/Net/ThemeName=Numix | |
xsettings/Xft/Antialias=1 | |
xsettings/Xft/Hinting=1 | |
xsettings/Xft/HintStyle=hintfull | |
thunar/last-view=ThunarDetailsView | |
thunar/last-statusbar-visible=false | |
thunar/last-side-pane=void | |
thunar/last-location-bar=void | |
thunar/last-menubar-visible=false | |
thunar/misc-full-path-in-title=true | |
xfce4-panel/plugins/plugin-$clockid/digital-format=%H:%M | |
xfce4-panel/plugins/plugin-$clockid/tooltip-format=%A %d %B %Y (%V) | |
xfwm4/general/theme=Numix | |
xfwm4/general/title_alignment=left | |
xfwm4/general/title_font=Liberation Sans 9 | |
xfwm4/general/titleless_maximize=true | |
xfwm4/general/easy_click=Super | |
xfce4-keyboard-shortcuts/commands/custom/override=true | |
xfce4-keyboard-shortcuts/commands/custom/<Super>e=exo-open --launch FileManager | |
xfce4-keyboard-shortcuts/commands/custom/Print=xfce4-screenshooter -r | |
xfce4-keyboard-shortcuts/commands/custom/<Primary>Print=xfce4-screenshooter -r -c | |
xfce4-keyboard-shortcuts/commands/custom/<Super>p=xfce4-display-settings --minimal | |
xfce4-keyboard-shortcuts/commands/custom/<Primary><Alt>t=exo-open --launch TerminalEmulator | |
xfce4-keyboard-shortcuts/commands/custom/<Primary><alt>Return=exo-open --launch TerminalEmulator | |
xfce4-keyboard-shortcuts/commands/custom/<Super>Page_Up=wmctrl -r :ACTIVE: -b toggle,above | |
xfce4-keyboard-shortcuts/commands/custom/œ=xfce4-popup-whiskermenu | |
xfce4-keyboard-shortcuts/xfwm4/custom/override=true | |
xfce4-keyboard-shortcuts/xfwm4/custom/<Alt>Tab=cycle_windows_key | |
xfce4-keyboard-shortcuts/xfwm4/custom/<Alt><Shift>Tab=cycle_reverse_windows_key | |
xfce4-keyboard-shortcuts/xfwm4/custom/<Super>Up=maximize_window_key | |
xfce4-keyboard-shortcuts/xfwm4/custom/<Super>d=show_desktop_key | |
xfce4-keyboard-shortcuts/xfwm4/custom/<Super>Down=hide_window_key | |
xfce4-keyboard-shortcuts/xfwm4/custom/<Super>Left=tile_left_key | |
xfce4-keyboard-shortcuts/xfwm4/custom/<Super>Right=tile_right_key | |
xfce4-keyboard-shortcuts/xfwm4/custom/<Shift><Super>ISO_Left_Tab=prev_workspace_key | |
xfce4-keyboard-shortcuts/xfwm4/custom/<Alt><Shift>Tab=cycle_reverse_windows_key | |
xfce4-panel/panels/panel-0/background-alpha=+100 | |
xfce4-panel/panels/panel-0/size=+26 | |
xfce4-panel/panels/panel-0/background-style=+1 | |
xfce4-desktop/backdrop/screen0/monitor1/workspace0/last-image=$HOME/.wall | |
xfce4-desktop/backdrop/screen0/monitor1/workspace1/last-image=$HOME/.wall | |
" | |
IFS=$'\n'; for x in $xfparams ; do | |
c=${x%%/*};ps=${x#*/};p=/${ps%=*};s=${ps#*=} | |
t=string ; [[ "$s" =~ ^-?[0-9]+$ ]] && t=int ; [[ "$s" =~ ^\+[0-9]+$ ]] && t=uint ; [ "$s" == "true" -o "$s" == "false" ] && t=bool | |
xfconf-query -t $t -c $c -p $p -s "${s#+*}" --create &>/dev/null | |
xfconf-query -t $t -c $c -p $p -s "${s#+*}" | |
done | |
unset IFS; | |
################################## | |
######### WINE ########### | |
################################## | |
# NPP | |
NPP_REPOS=notepad-plus-plus.org/repository | |
NPP_MAJOR=$(curl -s -L "$NPP_REPOS?C=M;O=D" | sed -E 's/.*?href="(.*?)\/".*/\1/' | sed -n 10p) | |
NPP_MINOR=$(curl -s -L "$NPP_REPOS/$NPP_MAJOR?C=M;O=D" | sed -E 's/.*?href="(.*?)\/".*/\1/' | sed -n 10p) | |
curl -sL $NPP_REPOS/$NPP_MAJOR/$NPP_MINOR/npp.$NPP_MINOR.Installer.exe -o npp.exe | |
wine npp /S | |
# PSP + time trial remove #oldversion.com/windows/download/paint-shop-pro-7-04 | |
curl -sfL software.oldversion.com/download.php?f=YTo1OntzOjQ6InRpbWUiO2k6MTUxMTUzMjEyMztzOjI6ImlkIjtpOjIxMTY7czo0OiJmaWxlIjtzOjEyOiJwc3A3MDRldi5leGUiO3M6MzoidXJsIjtzOjUzOiJodHRwOi8vd3d3Lm9sZHZlcnNpb24uY29tL3dpbmRvd3MvcGFpbnQtc2hvcC1wcm8tNy0wNCI7czo0OiJwYXNzIjtzOjMyOiJjODg4YjkzZjFmOTg4MjBhY2VjMTVjMTI1YTQ2ZjA3MSI7fQ%3D%3D -o psp7.exe | |
curl -sfL oldapps.com/Paint_Shop_Pro.php?app=5811aab0e8009f3ae710fe549a679a1b -o psp7.exe | |
wine psp7 /V/passive | |
PSP_PATH=$(find ~/.wine -name psp.exe | grep -v /users/) | |
for off in 1decde-90 1decdf-e9 32d784-90 32d785-90 32d786-90 32d787-90 32d788-90 32d789-90 32d7a5-90 32d7a6-90 32d7a7-90 32d7a8-90 32d7a9-90 32d7aa-90 32d7bc-90 32d7bd-e9 56bdac-30 ; do eval "printf '\x${off#*-}' | dd of='$PSP_PATH' bs=1 count=1 conv=notrunc seek=$((0x${off%-*})) 2>/dev/null" ; done; | |
# Goldwave 5.18 + register E78KEBDCW/AUHVZCDSE | |
#curl -sfL oldapps.com/goldwave.php?app=3f93e982aefa1b34c9a560618bc1070b -o goldwave.exe | |
#cat << 'EOF' >> "$HOME/.wine/system.reg" | |
#[Software\\GoldWave\\GoldWave\\Options] 1493570553 | |
#"License"="E78KEBDCWJT6KE6M5L" | |
#EOF | |
# Goldwave 5.68 + register GN8P95AX9/RTGE3BVJ5 | |
curl -sfL software.oldversion.com/download.php?f=YTo1OntzOjQ6InRpbWUiO2k6MTUxMTUzMjk4MjtzOjI6ImlkIjtpOjkyMjA7czo0OiJmaWxlIjtzOjEyOiJnd2F2ZTU2OC5leGUiO3M6MzoidXJsIjtzOjQ3OiJodHRwOi8vd3d3Lm9sZHZlcnNpb24uY29tL3dpbmRvd3MvZ29sZHdhdmUtNS02OCI7czo0OiJwYXNzIjtzOjMyOiJiNDAyODIyYTk1ZGJlZDQyZGI1MGNkMWYwMzY2ZmJjZCI7fQ%3D%3D -o goldwave.exe | |
wine goldwave -s | |
wget https://download.microsoft.com/download/c/6/e/c6e88215-0178-4c6c-b5f3-158ff77b1f38/NetFx20SP2_x86.exe | |
wine NetFx20SP2_x86 /q | |
# ISO2PNG for imgur upload | |
# wget gist.githubusercontent.com/briandeheus/9df32136c756227df4bfbff580a1aadd/raw/b1c9ee25c4eb6ae7e79aacadac5445116e42e5c5/punk.py | |
# wget raw.githubusercontent.com/mathiasbynens/small/master/png-transparent.png | |
# split -a3 -d -b1MB --additional-suffix=.iso office2010.iso office2010. | |
# for i in office2010.*.iso ; do cp png-transparent.png $i.png ; python <<< "from punk import Punk; Punk().encode(\"$i.png\", file(\"$i\").read())" ; done | |
# | |
# setup cleanup | |
rm -f *.exe | |
# Wine ricing | |
cat << 'EOF' >> "$HOME/.wine/user.reg" | |
[Control Panel\\Colors] 1492729683 | |
"ActiveTitle"="68 68 68" | |
"AppWorkSpace"="68 68 68" | |
"Background"="68 68 68" | |
"ButtonDkShadow"="16 16 16" | |
"ButtonFace"="68 68 68" | |
"ButtonHilight"="128 128 128" | |
"ButtonLight"="96 96 96" | |
"ButtonShadow"="32 32 32" | |
"ButtonText"="196 196 196" | |
"GradientActiveTitle"="68 68 68" | |
"GradientInactiveTitle"="68 68 68" | |
"GrayText"="32 32 32" | |
"Hilight"="200 73 73" | |
"HilightText"="255 255 255" | |
"InactiveTitle"="68 68 68" | |
"InactiveTitleText"="128 128 128" | |
"InfoText"="255 255 255" | |
"InfoWindow"="0 0 0" | |
"Menu"="68 68 68" | |
"MenuBar"="68 68 68" | |
"MenuHilight"="0 255 0" | |
"MenuText"="255 255 255" | |
"Scrollbar"="68 68 68" | |
"Window"="32 32 32" | |
"WindowText"="128 128 128" | |
[Software\\Wine\\DllOverrides] 1491146810 | |
"riched20"="native,builtin" | |
EOF | |
ME=$(whoami) | |
NPP_DIR="$HOME/.wine/drive_c/users/$ME/Application Data/Notepad++" | |
cat << 'EOF' >> "$NPP_DIR/config.xml" | |
<?xml version="1.0" encoding="Windows-1252" ?> | |
<NotepadPlus><FindHistory/><History/><GUIConfigs> | |
<GUIConfig name="StatusBar">hide</GUIConfig> | |
<GUIConfig name="ToolBar" visible="no"/> | |
<GUIConfig name="MenuBar">hide</GUIConfig> | |
<GUIConfig name="TabBar" dragAndDrop="yes" drawTopBar="yes" drawInactiveTab="yes" reduce="yes" closeButton="no" doubleClick2Close="yes" vertical="no" multiLine="no" hide="no" quitOnEmpty="no" /> | |
<GUIConfig name="ScintillaPrimaryView" lineNumberMargin="show" borderEdge="no" bookMarkMargin="hide" whiteSpaceShow="show" borderWidth="0" /> | |
<GUIConfig name="TabSetting" replaceBySpace="no" size="2" /> | |
<GUIConfig name="titleBar" short="no" /> | |
<GUIConfig name="stylerTheme" path="C:\users\${ME}\Application Data\Notepad++\themes\Monokai.xml" /> | |
<GUIConfig name="auto-completion" autoCAction="0" autoCIgnoreNumbers="no" funcParams="no"/> | |
</GUIConfigs></NotepadPlus> | |
EOF | |
CFG="$NPP_DIR/shortcuts.xml" | |
sed -i 's#<InternalCommands />#<InternalCommands>\ | |
<Shortcut id="48011" Ctrl="yes" Alt="no" Shift="no" Key="80"/>\ | |
<Shortcut id="41010" Ctrl="no" Alt="no" Shift="no" Key="0"/>\ | |
</InternalCommands>#' "$CFG" | |
CFG="$NPP_DIR/themes/Monokai.xml" | |
sed -i 's/272822/444444/' "$CFG" | |
sed -i 's/\(fontName="\)[^"]*/\1Liberation Mono/' "$CFG" | |
sed -i 's/\(fontSize="\)[^"]*/\18/' "$CFG" | |
mv $HOME/.local/share/applications/wine/Programs/*/*.desktop $HOME/.local/share/applications | |
chmod -w $HOME/.config/chromium/Default/History # disable chrome history storing | |
#{"manifest_version": 2, "name": "StripOpenSearch", "version": "1.0.0", "description": "Strip OpenSearch.", "content_scripts": [{"matches": ["<all_urls>"], "js": ["noOpenSearch.js"]}],"permissions": ["http://*/*","https://*/*"]} | |
#document.querySelectorAll('[type="application/opensearchdescription+xml"]').forEach(n=>n.remove()) | |
#xinput list | sed -ne 's/.*SYNA.*id=\([[:digit:]]\+\).*/\1/p' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment