1
0
Fork 0

Add omz installs cript

This commit is contained in:
Nexus 2024-05-30 19:32:09 +01:00
parent 086179c21a
commit f696949031
Signed by: nex
GPG key ID: 0FA334385D0B689F
5 changed files with 36 additions and 6 deletions

View file

@ -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)

@ -1 +0,0 @@
Subproject commit c3d4e576c9c86eac62884bd47c01f6faed043fc5

@ -1 +0,0 @@
Subproject commit e0165eaa730dd0fa321a6a6de74f092fe87630b0

26
scripts/install-omz.sh Executable file
View file

@ -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.

View file

@ -1,4 +0,0 @@
#!/bin/env python3
import argparse
import subprocess