1
0

initial commit

This commit is contained in:
Rokas Puzonas 2023-06-04 16:32:00 +03:00
commit 4504c8e6ad
13 changed files with 125 additions and 0 deletions

3
adjust-brightness Normal file
View File

@ -0,0 +1,3 @@
To list screens: xrandr --prop | grep " connected"
To set brightness: xrandr --output HDMI2 --brightness 0.4

41
cleanup-home Executable file
View File

@ -0,0 +1,41 @@
#!/bin/sh
trash ~/.python_history*
trash ~/.xsession-errors*
trash ~/.rnd
trash ~/.viminfo
trash ~/.wget-hsts
trash ~/.rediscli_history
trash ~/.pydoro.ini
trash ~/.odbc.ini
trash ~/.octave_hist
trash ~/.nuxtrc
trash ~/.node_repl_history
trash ~/.NERDTreeBookmarks
trash ~/.mongorc.js
trash ~/.lyxauth
trash ~/.lyrics
trash ~/.lesshst
trash ~/.festival_history
trash ~/.emulator_console_auth_token
trash ~/.babel.json
trash ~/.awesome-client_history
# trash ~/.adventofcode.session
trash ~/.zoom
trash ~/.fromscratch
trash ~/.templateengine
trash ~/.pork
trash ~/.subversion
trash ~/.ngrok
trash ~/.putty
trash ~/.pylint.d
trash ~/.IdeaIC2019.3
trash ~/.ColorGrab
trash ~/.ccemuredux
trash ~/.designer
trash ~/.mcreator
trash ~/.runelite
trash ~/.osbuddy
trash ~/.paradoxlauncher
trash ~/.gnomato
trash ~/.gnome
trash ~/.genius

4
disable-sleep Executable file
View File

@ -0,0 +1,4 @@
#!/bin/sh
sudo -A systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
sudo xset s off
sudo xset s 0

3
enable-sleep Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
sudo -A systemctl unmask sleep.target suspend.target hibernate.target hybrid-sleep.target
sudo xset s on

11
pac-cleanup Executable file
View File

@ -0,0 +1,11 @@
#!/bin/bash
[[ `whoami` != "root" ]] && echo "Must be root." && exit 1
echo -e "\e[1;36mCleaning package caches\e[0m"
# All packages
paccache -rk3 -c /var/cache/pacman/pkg
# Uninstalled packages
paccache -ruk1 -c /var/cache/pacman/pkg

2
screenshot Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
maim -s | xclip -selection clipboard -t image/png

26
setup-task-aoc.sh Executable file
View File

@ -0,0 +1,26 @@
# Create 25 recurring tasks for each advent of code day
task add AOC day 1 recur:yearly due:2021-12-02T00:00-05:00 until:2022-01-01 wait:2021-12-01T00:00-05:00
task add AOC day 2 recur:yearly due:2021-12-03T00:00-05:00 until:2022-01-01 wait:2021-12-02T00:00-05:00
task add AOC day 3 recur:yearly due:2021-12-04T00:00-05:00 until:2022-01-01 wait:2021-12-03T00:00-05:00
task add AOC day 4 recur:yearly due:2021-12-05T00:00-05:00 until:2022-01-01 wait:2021-12-04T00:00-05:00
task add AOC day 5 recur:yearly due:2021-12-06T00:00-05:00 until:2022-01-01 wait:2021-12-05T00:00-05:00
task add AOC day 6 recur:yearly due:2021-12-07T00:00-05:00 until:2022-01-01 wait:2021-12-06T00:00-05:00
task add AOC day 7 recur:yearly due:2021-12-08T00:00-05:00 until:2022-01-01 wait:2021-12-07T00:00-05:00
task add AOC day 8 recur:yearly due:2021-12-09T00:00-05:00 until:2022-01-01 wait:2021-12-08T00:00-05:00
task add AOC day 9 recur:yearly due:2021-12-10T00:00-05:00 until:2022-01-01 wait:2021-12-09T00:00-05:00
task add AOC day 10 recur:yearly due:2021-12-11T00:00-05:00 until:2022-01-01 wait:2021-12-10T00:00-05:00
task add AOC day 11 recur:yearly due:2021-12-12T00:00-05:00 until:2022-01-01 wait:2021-12-11T00:00-05:00
task add AOC day 12 recur:yearly due:2021-12-13T00:00-05:00 until:2022-01-01 wait:2021-12-12T00:00-05:00
task add AOC day 13 recur:yearly due:2021-12-14T00:00-05:00 until:2022-01-01 wait:2021-12-13T00:00-05:00
task add AOC day 14 recur:yearly due:2021-12-15T00:00-05:00 until:2022-01-01 wait:2021-12-14T00:00-05:00
task add AOC day 15 recur:yearly due:2021-12-16T00:00-05:00 until:2022-01-01 wait:2021-12-15T00:00-05:00
task add AOC day 16 recur:yearly due:2021-12-17T00:00-05:00 until:2022-01-01 wait:2021-12-16T00:00-05:00
task add AOC day 17 recur:yearly due:2021-12-18T00:00-05:00 until:2022-01-01 wait:2021-12-17T00:00-05:00
task add AOC day 18 recur:yearly due:2021-12-19T00:00-05:00 until:2022-01-01 wait:2021-12-18T00:00-05:00
task add AOC day 19 recur:yearly due:2021-12-20T00:00-05:00 until:2022-01-01 wait:2021-12-19T00:00-05:00
task add AOC day 20 recur:yearly due:2021-12-21T00:00-05:00 until:2022-01-01 wait:2021-12-20T00:00-05:00
task add AOC day 21 recur:yearly due:2021-12-22T00:00-05:00 until:2022-01-01 wait:2021-12-21T00:00-05:00
task add AOC day 22 recur:yearly due:2021-12-23T00:00-05:00 until:2022-01-01 wait:2021-12-22T00:00-05:00
task add AOC day 23 recur:yearly due:2021-12-24T00:00-05:00 until:2022-01-01 wait:2021-12-23T00:00-05:00
task add AOC day 24 recur:yearly due:2021-12-25T00:00-05:00 until:2022-01-01 wait:2021-12-24T00:00-05:00
task add AOC day 25 recur:yearly due:2021-12-26T00:00-05:00 until:2022-01-01 wait:2021-12-25T00:00-05:00

2
task-add-daily Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
task add +DAILY_GOAL due:eod $@

2
task-add-monthly Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
task add +MONTHLY_GOAL due:eom $@

2
task-add-quaterly Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
task add +QUARTERLTY_GOAL due:eoq $@

2
task-add-weekly Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
task add +WEEKLY_GOAL due:eow $@

2
task-add-yearly Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
task add +YEARLY_GOAL due:eoy $@

25
tmux-sessionizer Executable file
View File

@ -0,0 +1,25 @@
#!/usr/bin/env zsh
if [[ $# -eq 1 ]]; then
selected=$1
else
selected=$(ls-repos ~/code | fzf)
fi
if [[ -z $selected ]]; then
exit 0
fi
selected_name=$(basename "$selected" | tr . _)
tmux_running=$(pgrep tmux)
if [[ -z $TMUX ]] && [[ -z $tmux_running ]]; then
tmux new-session -s $selected_name -c $selected
exit 0
fi
if ! tmux has-session -t=$selected_name 2> /dev/null; then
tmux new-session -ds $selected_name -c $selected
fi
tmux switch-client -t $selected_name