From 38077c376e553891e8f2173a2db90c64f0edf87f Mon Sep 17 00:00:00 2001 From: nexy7574 Date: Mon, 29 Apr 2024 19:08:35 +0100 Subject: [PATCH 1/4] Auto-load cargo in bash only when installed --- .bashrc | 6 +++++- .config/spectaclerc | 31 ------------------------------- 2 files changed, 5 insertions(+), 32 deletions(-) delete mode 100755 .config/spectaclerc diff --git a/.bashrc b/.bashrc index 6a48cb1..55e67ab 100644 --- a/.bashrc +++ b/.bashrc @@ -23,4 +23,8 @@ if [ -d ~/.bashrc.d ]; then done fi unset rc -. "$HOME/.cargo/env" + +if [ -f "$HOME/.cargo/env" ]; then + . "$HOME/.cargo/env" +fi + diff --git a/.config/spectaclerc b/.config/spectaclerc deleted file mode 100755 index d4b4f67..0000000 --- a/.config/spectaclerc +++ /dev/null @@ -1,31 +0,0 @@ -[$Version] -update_info=spectacle_clipboard.upd:clipboard-settings-change,spectacle_rememberregion.upd:spectacle-migrate-rememberregion - -[Annotations] -annotationToolType=8 -freehandStrokeWidth=12 -rectangleStrokeColor=255,173,173 -rectangleStrokeWidth=12 - -[General] -autoSaveImage=true -clipboardGroup=PostScreenshotCopyImage -launchAction=DoNotTakeScreenshot -onLaunchAction=DoNotTakeScreenshot -rememberSelectionRect=Never -useReleaseToCapture=true - -[ImageSave] -imageFilenameTemplate=///
/--- -lastImageSaveLocation=file:///home/nex/Pictures/Screenshots/Screenshot_20240324_164943.png -preferredImageFormat=WEBP -translatedScreenshotsFolder=Screenshots - -[Save] -defaultSaveImageFormat=JPEG -lastSaveLocation=file:///home/nex/Pictures/screenshots/2024/03/10/22:43:26.jpeg -saveFilenameFormat=screenshots/%Y/%M/%D/%H:%m:%S-%T - -[VideoSave] -translatedScreencastsFolder=Screencasts -videoFilenameTemplate=/<yyyy>/<MM>/<dd>/<hh>-<mm>-<ss>-<title> From 086179c21aad09870b7a04c0f1e6f259dd41eff6 Mon Sep 17 00:00:00 2001 From: nexy7574 <git@nexy7574.co.uk> Date: Thu, 30 May 2024 19:31:47 +0100 Subject: [PATCH 2/4] Fix MPV conf --- .config/mpv/mpv.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/mpv/mpv.conf b/.config/mpv/mpv.conf index d3c5926..86d78be 100755 --- a/.config/mpv/mpv.conf +++ b/.config/mpv/mpv.conf @@ -34,7 +34,7 @@ cscale=ewa_lanczossharp hdr-contrast-recovery=0.30 allow-delayed-peak-detect=no deband=yes -scaler-lut-size=8 +# scaler-lut-size=8 [fast] scale=bilinear From f696949031abd311051aa5dfbcbe8079fe9b0667 Mon Sep 17 00:00:00 2001 From: nexy7574 <git@nexy7574.co.uk> Date: Thu, 30 May 2024 19:32:09 +0100 Subject: [PATCH 3/4] Add omz installs cript --- .config/mpv/scripts/paste.lua | 10 +++++++ .oh-my-zsh/custom/plugins/zsh-autosuggestions | 1 - .../custom/plugins/zsh-syntax-highlighting | 1 - scripts/install-omz.sh | 26 +++++++++++++++++++ scripts/install.py | 4 --- 5 files changed, 36 insertions(+), 6 deletions(-) create mode 100644 .config/mpv/scripts/paste.lua delete mode 160000 .oh-my-zsh/custom/plugins/zsh-autosuggestions delete mode 160000 .oh-my-zsh/custom/plugins/zsh-syntax-highlighting create mode 100755 scripts/install-omz.sh delete mode 100644 scripts/install.py diff --git a/.config/mpv/scripts/paste.lua b/.config/mpv/scripts/paste.lua new file mode 100644 index 0000000..d179d40 --- /dev/null +++ b/.config/mpv/scripts/paste.lua @@ -0,0 +1,10 @@ +mp = require 'mp' +function paste() + local pasted = mp.command_native{ + name = 'subprocess', + args = 'wl-paste', + capture_stdout = true, + } + mp.commandv('loadfile', pasted.stdout:match('^%s*(.-)%s*$')) +end +mp.add_key_binding('Ctrl+v', 'paste', paste) diff --git a/.oh-my-zsh/custom/plugins/zsh-autosuggestions b/.oh-my-zsh/custom/plugins/zsh-autosuggestions deleted file mode 160000 index c3d4e57..0000000 --- a/.oh-my-zsh/custom/plugins/zsh-autosuggestions +++ /dev/null @@ -1 +0,0 @@ -Subproject commit c3d4e576c9c86eac62884bd47c01f6faed043fc5 diff --git a/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting b/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting deleted file mode 160000 index e0165ea..0000000 --- a/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting +++ /dev/null @@ -1 +0,0 @@ -Subproject commit e0165eaa730dd0fa321a6a6de74f092fe87630b0 diff --git a/scripts/install-omz.sh b/scripts/install-omz.sh new file mode 100755 index 0000000..e83d7c3 --- /dev/null +++ b/scripts/install-omz.sh @@ -0,0 +1,26 @@ +#!/bin/env bash + +# Check if OMZ exists. If not, complain. +if [ ! -d "$HOME/.oh-my-zsh" ]; then + echo 'Installing Oh My Zsh (0/2)...' + OLD_PWD=$(pwd) + cd $HOME + sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh) --keep-zshrc --unattended" + cd $OLD_PWD + _S=$(awk -F: -v user="$USER" '$1 == user {print $NF}' /etc/passwd) + if [ "$_S" != "/bin/zsh" ] && [ "$_S" != "/usr/bin/zsh" ]; then + echo 'Changing shell to Zsh...' + sudo chsh -s "/bin/zsh" $USER + fi + echo 'Oh My Zsh installed.' +fi + +# Install syntax highlighting +echo 'Installing syntax highlighting (1/2)...' +git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting + +# Install autosuggestions +echo 'Installing auto-suggestions (2/2)...' +git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions + +echo 'Done. diff --git a/scripts/install.py b/scripts/install.py deleted file mode 100644 index 4c903d5..0000000 --- a/scripts/install.py +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/env python3 -import argparse -import subprocess - From 665d61ac499821a091210155572cdd70218f7951 Mon Sep 17 00:00:00 2001 From: nexy7574 <git@nexy7574.co.uk> Date: Thu, 30 May 2024 19:32:42 +0100 Subject: [PATCH 4/4] Fix install script --- scripts/install-omz.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install-omz.sh b/scripts/install-omz.sh index e83d7c3..a036d16 100755 --- a/scripts/install-omz.sh +++ b/scripts/install-omz.sh @@ -23,4 +23,4 @@ git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM: echo 'Installing auto-suggestions (2/2)...' git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions -echo 'Done. +echo 'Done.'