Skip to content

Instantly share code, notes, and snippets.

View shoaib281's full-sized avatar

Shoaib shoaib281

  • London, England
View GitHub Profile
vim.opt.number = true
vim.opt.relativenumber = true
vim.opt.ignorecase = true
vim.opt.tabstop = 4
vim.opt.shiftwidth = 4
vim.opt.showmode = false -- airline is used instead
vim.api.nvim_set_keymap("i", "{", "{}<esc>ha", {noremap = true})
vim.api.nvim_set_keymap("i", "[", "[]<esc>ha", {noremap = true})
vim.api.nvim_set_keymap("i", "(", "()<esc>ha", {noremap = true})
set -o vi
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
@shoaib281
shoaib281 / downloadingovernight.sh
Created January 19, 2023 22:30
toggle dont auto-turn off
#!/bin/bash
if grep -q "\[AC\]\[SuspendSession\]" ~/.config/powermanagementprofilesrc; then
sed -i -e 's/\[AC\]\[SuspendSession\]/\[AC\]\[SuspendSessio3\]/g' ~/.config/powermanagementprofilesrc
sed -i -e "s/lidAction=1/lidAction=64/g" ~/.config/powermanagementprofilesrc
echo "downloading overnight"
else
sed -i -e 's/\[AC\]\[SuspendSessio3\]/\[AC\]\[SuspendSession\]/g' ~/.config/powermanagementprofilesrc
sed -i -e "s/lidAction=64/lidAction=1/g" ~/.config/powermanagementprofilesrc
echo "back to normal"
year=$(date +"%Y")
month=$(date +"%m")
day=$(date +"%d")
filepath=(~/Pictures/Screenshots/$year/$month/$day)
mkdir -p $filepath
if [ $1 == "full" ]
then