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