Add new scripts
Signed-off-by: Severin Kaderli <severin.kaderli@gmail.com>
This commit is contained in:
parent
7721996115
commit
50042dc9c0
11 changed files with 95 additions and 35 deletions
|
@ -45,7 +45,6 @@ LINKED_FILES_HOME=(
|
|||
".config/mpv"
|
||||
".config/npm"
|
||||
".config/polybar"
|
||||
".config/pulse"
|
||||
".config/python"
|
||||
".config/redshift"
|
||||
".config/streamlink"
|
||||
|
|
|
@ -19,3 +19,6 @@ rofi.color-normal: #273238, #c1c1c1, #273238, #394249, #ffffff
|
|||
rofi.color-active: #273238, #80cbc4, #273238, #394249, #80cbc4
|
||||
rofi.color-urgent: #273238, #ff1844, #273238, #394249, #ff1844
|
||||
rofi.seperator-style: solid
|
||||
rofi.opacity: 100
|
||||
rofi.location: 2
|
||||
rofi.yoffset: 35
|
|
@ -23,7 +23,7 @@ setxkbmap -model pc105 -layout ch
|
|||
nm-applet &
|
||||
|
||||
# Start redshift
|
||||
redshift &
|
||||
redshift-gtk &
|
||||
|
||||
# Merge .Xresources on boot
|
||||
xrdb -merge "${XDG_CONFIG_HOME}/X11/xresources"
|
||||
|
|
|
@ -24,5 +24,4 @@ glx-copy-from-front = false;
|
|||
glx-swap-method = "undefined";
|
||||
refresh-rate = 0;
|
||||
vsync = "none";
|
||||
sw-opti = true;
|
||||
xrender-sync-fence = true;
|
|
@ -11,4 +11,5 @@
|
|||
# This file is loaded on boot by crontab.
|
||||
|
||||
# Synchronize Google Drive every 30 minutes
|
||||
*/30 * * * * grive -d -p /home/severin/GoogleDrive/ >> $XDG_LOG_HOME/cron.log 2>&1
|
||||
*/30 * * * * grive -d -p /home/severin/GoogleDrive/ >> /home/severin/.local/log/cron.log 2>&1
|
||||
*/5 * * * * /home/severin/.local/bin/sync_notes.sh >> /home/severin/.local/log/notes.log 2>&1
|
||||
|
|
|
@ -15,8 +15,10 @@
|
|||
# Alias for clear because I sometimes type the DOS command instead
|
||||
alias cls="clear"
|
||||
|
||||
# Alias for using exa as ls replacement
|
||||
alias ls="exa -l"
|
||||
# Alias for using lsd as ls replacement
|
||||
alias ls='lsd'
|
||||
alias la="ls -al"
|
||||
alias lt="ls --tree"
|
||||
|
||||
# Alias for using ripgrep as grep replacement
|
||||
alias grep="rg -n"
|
||||
|
@ -27,6 +29,9 @@ alias cat="bat"
|
|||
# Alias to get to my Projects folder
|
||||
alias pj="cd ~/Projects"
|
||||
|
||||
# Alias to get to my Downloads folder
|
||||
alias dl="cd ~/Downloads"
|
||||
|
||||
# Alias for opening my code editor
|
||||
alias e="code"
|
||||
|
||||
|
|
|
@ -43,8 +43,9 @@ bindsym $mod+Return exec termite -c ~/.config/termite/config
|
|||
# kill focused window
|
||||
bindsym $mod+Shift+q kill
|
||||
|
||||
# Start rofi
|
||||
bindsym $mod+r exec rofi -show run -opacity 100 -lines 5 -location 2
|
||||
# Rofi menus
|
||||
bindsym $mod+r exec rofi -show run -lines 5
|
||||
bindsym $mod+g exec games.sh
|
||||
|
||||
# change focus
|
||||
bindsym $mod+Left focus left
|
||||
|
@ -221,6 +222,7 @@ exec discord
|
|||
exec nemo
|
||||
exec nemo
|
||||
exec keepassxc
|
||||
exec notable
|
||||
exec termite -e cmus --name cmus
|
||||
|
||||
# Assign programs to specific workspaces
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
[redshift]
|
||||
; Set the day and night screen temperatures
|
||||
temp-day=5700
|
||||
temp-night=4000
|
||||
temp-night=3700
|
||||
|
||||
; Disable the smooth fade between temperatures when Redshift starts and stops.
|
||||
; 0 will cause an immediate change between screen temperatures.
|
||||
|
|
32
system/.local/bin/games.sh
Executable file
32
system/.local/bin/games.sh
Executable file
|
@ -0,0 +1,32 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# SCRIPT NAME:
|
||||
# games.sh
|
||||
#
|
||||
# AUTHOR:
|
||||
# Severin Kaderli <severin.kaderli@gmail.com>
|
||||
#
|
||||
# DESCRIPTION:
|
||||
# Displays a game menu using rofi.
|
||||
#
|
||||
# USAGE:
|
||||
# ./games.sh
|
||||
|
||||
# The rofi prompt
|
||||
PROMPT="Games"
|
||||
|
||||
# Actions for the menu
|
||||
ACTIONS=(
|
||||
"1: Steam"
|
||||
"2: Guild Wars 2"
|
||||
)
|
||||
|
||||
SELECTION=$(printf '%s\n' "${ACTIONS[@]}" | rofi -dmenu -p "${PROMPT}" | cut -d ":" -f1)
|
||||
case "${SELECTION}" in
|
||||
"1")
|
||||
steam
|
||||
;;
|
||||
"2")
|
||||
g2.sh
|
||||
;;
|
||||
esac
|
|
@ -7,36 +7,36 @@
|
|||
# Severin Kaderli <severin.kaderli@gmail.com>
|
||||
#
|
||||
# DESCRIPTION:
|
||||
# Displays a power menu using zenity.
|
||||
# Displays a power menu using rofi.
|
||||
#
|
||||
# USAGE:
|
||||
# ./power.sh
|
||||
|
||||
TEXT="Choose action"
|
||||
WIDTH=400
|
||||
HEIGHT=300
|
||||
# The rofi prompt
|
||||
PROMPT="Power Options"
|
||||
|
||||
# Actions for the menu
|
||||
ACTIONS=(
|
||||
"Reboot"
|
||||
"Shutdown"
|
||||
"Performance Mode"
|
||||
"Powersave Mode"
|
||||
"1: Reboot"
|
||||
"2: Shutdown"
|
||||
"3: Performance Mode"
|
||||
"4: Powersave Mode"
|
||||
)
|
||||
|
||||
action=$(zenity --list --width="${WIDTH}" --height="${HEIGHT}" --text="${TEXT}" --column="Action" "${ACTIONS[@]}")
|
||||
|
||||
if [ "${action}" == "Reboot" ]
|
||||
then
|
||||
systemctl reboot
|
||||
elif [ "${action}" == "Shutdown" ]
|
||||
then
|
||||
systemctl poweroff
|
||||
elif [ "${action}" == "Performance Mode" ]
|
||||
then
|
||||
gksudo "cpupower frequency-set -g performance"
|
||||
optirun -b primus nvidia-settings -a '[gpu:0]/GPUPowerMizerMode=2' -c :8 > /dev/null
|
||||
elif [ "${action}" == "Powersave Mode" ]
|
||||
then
|
||||
gksudo "cpupower frequency-set -g powersave"
|
||||
optirun -b primus nvidia-settings -a '[gpu:0]/GPUPowerMizerMode=0' -c :8 > /dev/null
|
||||
fi
|
||||
|
||||
SELECTION=$(printf '%s\n' "${ACTIONS[@]}" | rofi -dmenu -p "${PROMPT}" | cut -d ":" -f1)
|
||||
case "${SELECTION}" in
|
||||
"1")
|
||||
systemctl reboot
|
||||
;;
|
||||
"2")
|
||||
systemctl poweroff
|
||||
;;
|
||||
"3")
|
||||
gksudo "cpupower frequency-set -g performance"
|
||||
optirun -b primus nvidia-settings -a '[gpu:0]/GPUPowerMizerMode=2' -c :8 > /dev/null
|
||||
;;
|
||||
"4")
|
||||
gksudo "cpupower frequency-set -g powersave"
|
||||
optirun -b primus nvidia-settings -a '[gpu:0]/GPUPowerMizerMode=0' -c :8 > /dev/null
|
||||
;;
|
||||
esac
|
||||
|
|
19
system/.local/bin/sync_notes.sh
Executable file
19
system/.local/bin/sync_notes.sh
Executable file
|
@ -0,0 +1,19 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# SCRIPT NAME:
|
||||
# sync_notes.sh
|
||||
#
|
||||
# AUTHOR:
|
||||
# Severin Kaderli <severin.kaderli@gmail.com>
|
||||
#
|
||||
# DESCRIPTION:
|
||||
# Sync notes in ~/Notes using git
|
||||
#
|
||||
# USAGE:
|
||||
# ./sync_notes.sh
|
||||
# Set custom wineprefix
|
||||
cd "/home/severin/Notes"
|
||||
git pull
|
||||
git add --all
|
||||
git commit -s -m "Update notes"
|
||||
git push origin master
|
Loading…
Add table
Add a link
Reference in a new issue