Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor #34

Merged
merged 26 commits into from
Feb 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .config/wpg/.current

This file was deleted.

Binary file removed .config/wpg/samples/wallpaper.png_wal_sample.png
Binary file not shown.
1 change: 0 additions & 1 deletion .config/wpg/sequences

This file was deleted.

1 change: 0 additions & 1 deletion .config/wpg/wallpapers/wallpaper.png

This file was deleted.

File renamed without changes
Binary file added Assets/Icons/gamma.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion .bscripts/brightness.sh → Bscripts/brightness.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function get_brightness {
function send_notification {
DIR=`dirname "$0"`
brightness=`get_brightness`
icon_name="${HOME}/Pictures/Important/icons/other/b.png"
icon_name="${HOME}/.config/rice_assets/Icons/b.png"

# Send the notification
dunstify "Brightness: $brightness%" -h int:value:$brightness -i "$icon_name" -t 1000 --replace=555 -u critical
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
47 changes: 47 additions & 0 deletions Bscripts/gamma.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#!/bin/bash

# You can call this script like this:
# $./gamma.sh up
# $./gamma.sh down
gamma_file="/tmp/gamma"

function get_gamma {
cat $gamma_file || echo 1
}

function send_notification {
gamma=`get_gamma`
gamma=`echo $gamma | awk '{printf $1*100}'`
icon_name="${HOME}/.config/rice_assets/Icons/gamma.png"

# Send the notification
dunstify "Gamma: $gamma%" -h int:value:$gamma -i "$icon_name" -t 1000 --replace=555 -u critical
}

case $1 in
up)
# Raise the gamma (+ 5%)
gamma=`get_gamma`
gamma=`echo $gamma | awk '{printf $1*100}'`
rem=$(( (gamma + 5) % 5 ))
inc=$(( 5 - rem ))
gamma=$(( gamma + inc ))
[[ $gamma -eq 0 ]] && gamma=1
gamma=`echo $gamma | awk '{printf $1/100}'`
xrandr --output eDP-1 --gamma $gamma && echo $gamma > $gamma_file
send_notification
;;
down)
# Lower the gamma (- 5%)
gamma=`get_gamma`
gamma=`echo $gamma | awk '{printf $1*100}'`
rem=$(( (gamma - 5) % 5 ))
inc=$(( 5 + rem ))
gamma=$(( gamma - inc ))
[[ $gamma -eq 0 ]] && gamma=1
gamma=`echo $gamma | awk '{printf $1/100}'`
xrandr --output eDP-1 --gamma $gamma && echo $gamma > $gamma_file

send_notification
;;
esac
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions .bscripts/notif_sounds.sh → Bscripts/notif_sounds.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

if [[ $2 == "Volume"* ]]
then
play -v 0.8 ~/Documents/Sounds/volume_notif.wav
play -v 0.8 ~/.config/rice_assets/Sounds/volume_notif.wav
elif [[ $2 == *"Screenshot"* ]] || [[ $2 == *"Flameshot"* ]]
then
play -v 0.8 ~/Documents/Sounds/screenshot_notif.wav
play -v 0.8 ~/.config/rice_assets/Sounds/screenshot_notif.wav
fi;

File renamed without changes.
2 changes: 1 addition & 1 deletion .bscripts/ss.sh → Bscripts/ss.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
# Screenshot is copied to clipboard and saved to
# ~/Pictures/Screenshots

mkdir ~/Pictures/Screenshots || true
mkdir -p ~/Pictures/Screenshots || true
date=`date +'%Y-%m-%d_%H:%M:%S'` && scrot ~/Pictures/Screenshots/$date.png -e 'xclip -selection clipboard -target image/png -i $f' && notify-send -u critical -t 3000 -i ~/Pictures/Screenshots/$date.png "Screenshot taken"
11 changes: 10 additions & 1 deletion .bscripts/toggle_bar.sh → Bscripts/toggle_bar.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Toggles bar on and off.
# You can call this script like this:
# toggle_bar auto|on|off
# toggle_bar auto|on|off|test_fullscreen

auto(){
(xdotool search --onlyvisible --class eww- || \
Expand Down Expand Up @@ -33,5 +33,14 @@ off(){
done;
xdotool search --class Polybar windowunmap
}

test_fullscreen(){
if [[ -z "$(bspc query -N -n focused.fullscreen)" ]]
then
on
else
off
fi;
}

$1
File renamed without changes.
12 changes: 6 additions & 6 deletions .bscripts/volume.sh → Bscripts/volume.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@ function send_notification {
#Set correct icon
if [[ $volume -eq 0 ]]
then
icon_name="${HOME}/Pictures/Important/icons/other/nov.png"
icon_name="${HOME}/.config/rice_assets/Icons/nov.png"
elif [[ $volume -lt 35 ]]
then
icon_name="${HOME}/Pictures/Important/icons/other/vlow.png"
icon_name="${HOME}/.config/rice_assets/Icons/vlow.png"
elif [[ $volume -lt 70 ]]
then
icon_name="${HOME}/Pictures/Important/icons/other/vmid.png"
icon_name="${HOME}/.config/rice_assets/Icons/vmid.png"
elif [[ $volume -lt 100 ]]
then
icon_name="${HOME}/Pictures/Important/icons/other/vhigh.png"
icon_name="${HOME}/.config/rice_assets/Icons/vhigh.png"
else
icon_name="${HOME}/Pictures/Important/icons/other/vthigh.png"
icon_name="${HOME}/.config/rice_assets/Icons/vthigh.png"
fi;
#bn=$(( (volume + 5) / 5 ))

Expand Down Expand Up @@ -65,7 +65,7 @@ case $1 in
# Toggle mute
pactl set-sink-mute @DEFAULT_SINK@ toggle > /dev/null
if [[ `is_mute` == "Mute: yes" ]] ; then
dunstify -i "${HOME}/Pictures/Important/icons/other/mute.png" --replace=555 -u normal "Volume: Mute" -t 1000 -u critical
dunstify -i "${HOME}/.config/rice_assets/Icons/mute.png" --replace=555 -u normal "Volume: Mute" -t 1000 -u critical
else
send_notification
fi
Expand Down
2 changes: 1 addition & 1 deletion .bscripts/wallset → Bscripts/wallset
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ if ! [[ -f $wallpaper ]] || ! identify $wallpaper > /dev/null 2> /dev/null;
echo "$wallpaper is not a valid image"
exit
fi;
cp $wallpaper ~/Pictures/Important/wallpaper.png
cp $wallpaper ~/.config/rice_assets/Images/wallpaper.png

bspc wm -r
12 changes: 6 additions & 6 deletions .bscripts/winevents.sh → Bscripts/winevents.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,28 @@ bspc subscribe desktop_focus node_state node_add node_remove| \
echo $line
case $line in
node_add*)
play -v 0.3 ~/Documents/Sounds/add.wav 2> /dev/null&
play -v 0.3 ~/.config/rice_assets/Sounds/add.wav 2> /dev/null&
~/.bscripts/toggle_bar.sh test_fullscreen
;;
node_remove*)
play -v 0.4 ~/Documents/Sounds/remove.wav 2> /dev/null&
play -v 0.4 ~/.config/rice_assets/Sounds/remove.wav 2> /dev/null&
~/.bscripts/toggle_bar.sh test_fullscreen
;;
*\ fullscreen\ on)
play -v 0.4 ~/Documents/Sounds/fullscreen.wav 2> /dev/null&
play -v 0.4 ~/.config/rice_assets/Sounds/fullscreen.wav 2> /dev/null&
~/.bscripts/toggle_bar.sh off&
;;
*\ fullscreen\ off)
~/.bscripts/toggle_bar.sh on&
;;
*\ tiled\ on)
play -v 0.4 ~/Documents/Sounds/tile.wav 2> /dev/null&
play -v 0.4 ~/.config/rice_assets/Sounds/tile.wav 2> /dev/null&
;;
*\ floating\ on)
play -v 0.4 ~/Documents/Sounds/float.wav 2> /dev/null&
play -v 0.4 ~/.config/rice_assets/Sounds/float.wav 2> /dev/null&
;;
desktop_focus*)
play -v 0.1 ~/Documents/Sounds/change_workspace.wav 2> /dev/null&
play -v 0.1 ~/.config/rice_assets/Sounds/change_workspace.wav 2> /dev/null&
~/.bscripts/toggle_bar.sh test_fullscreen
;;
*)
Expand Down
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions .config/bspwm/autostart → Configs/bspwm/autostart
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ picom &
xsetroot -cursor_name left_ptr &

# Set Wallpaper
hsetroot -cover ~/Pictures/Important/wallpaper.png
hsetroot -cover ~/.config/rice_assets/Images/wallpaper.png

# Cache lockscreen
mantablockscreen -i ~/Pictures/Important/lockscreen.png&
mantablockscreen -i ~/.config/rice_assets/Images/lockscreen.png&

# Authentication agent
/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1&
Expand Down Expand Up @@ -48,7 +48,7 @@ thunar --daemon&
killall sxhkd
sxhkd -c ~/.config/bspwm/sxhkdrc > /dev/null 2> /dev/null&

# Sounds
# Window event monitoring
killall winevents.sh
~/.bscripts/winevents.sh&

Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion .config/bspwm/hkpause → Configs/bspwm/hkpause
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

#Undo the pause
super+Return
killall sxhkd && sxhkd -c ~/.config/bspwm/sxhkdrc& dunstify "Resumed simple X hotkey daemon" -i ~/Pictures/Important/icons/other/resume.png -t 1500 --replace=420 -u critical&
killall sxhkd && sxhkd -c ~/.config/bspwm/sxhkdrc& dunstify "Resumed simple X hotkey daemon" -i ~/.config/rice_assets/Icons/resume.png -t 1500 --replace=420 -u critical&
8 changes: 5 additions & 3 deletions .config/bspwm/quit.sh → Configs/bspwm/quit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ killall sxhkd
killall dunst
killall idle.sh
killall eww
killall some.sh
killall dbus-daemon
killall bspwm
killall media_info
killall workspaces
killall layout
killall winevents.sh
bspc quit
File renamed without changes.
18 changes: 13 additions & 5 deletions .config/bspwm/sxhkdrc → Configs/bspwm/sxhkdrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# "Pausing" sxhkd
super+Return
killall sxhkd && sxhkd -c ~/.config/bspwm/hkpause& dunstify "Paused simple X hotkey daemon" -i ~/Pictures/Important/icons/other/stop.png -t 1500 --replace=420 -u critical&
killall sxhkd && sxhkd -c ~/.config/bspwm/hkpause& dunstify "Paused simple X hotkey daemon" -i ~/.config/rice_assets/Icons/stop.png -t 1500 --replace=420 -u critical&


# Apps and programs
Expand Down Expand Up @@ -121,6 +121,14 @@ alt+shift+period
alt+shift+comma
~/.bscripts/brightness.sh down

# Raise the monitor gamma by 5%
control+alt+x
~/.bscripts/gamma.sh up

# Lower the monitor gamma by 5%
control+alt+z
~/.bscripts/gamma.sh down

# Toggle media playing
Pause
playerctl play-pause
Expand Down Expand Up @@ -161,7 +169,7 @@ control+alt+space

# Move windows in workspace
super+shift+{k,j,h,l}
play -v 0.4 ~/Documents/Sounds/tile.wav& ~/.bscripts/bsmove.sh {north,south,west,east}
play -v 0.4 ~/.config/rice_assets/Sounds/tile.wav& ~/.bscripts/bsmove.sh {north,south,west,east}

# Select windows in workspace
super+{k,j,h,l}
Expand Down Expand Up @@ -189,15 +197,15 @@ control+shift+k

# Rotate tree
super+{d,a}
play -v 0.4 ~/Documents/Sounds/tile.wav& bspc node @/ -C {forward,backward}
play -v 0.4 ~/.config/rice_assets/Sounds/tile.wav& bspc node @/ -C {forward,backward}

# Rotate windows
alt+{d,a}
play -v 0.4 ~/Documents/Sounds/tile.wav& bspc node first_ancestor -R {90,270}
play -v 0.4 ~/.config/rice_assets/Sounds/tile.wav& bspc node first_ancestor -R {90,270}

# Equalize window sizes
super+e
play -v 0.4 ~/Documents/Sounds/tile.wav& bspc node first_ancestor --balance
play -v 0.4 ~/.config/rice_assets/Sounds/tile.wav& bspc node first_ancestor --balance

# Toggle fullscreen
super+f
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ notify()
if [[ $lstate -gt 1 ]]
then
echo 1 > /tmp/batstate
dunstify "Warning: $bat_level% Battery left" -i "${HOME}/Pictures/Important/icons/other/battery_mid.png" -t 10000 --replace=550 -u critical
dunstify "Warning: $bat_level% Battery left" -i "${HOME}/.config/rice_assets/Icons/battery_mid.png" -t 10000 --replace=550 -u critical
fi;
;;
low)
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@ $eww update color15=$color15
$eww update left_bg=$color0
$eww update center_bg=$color0
$eww update right_bg=$color0

cp ~/.cache/wal/colors.scss ~/.config/eww/mybar/colors.scss
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions Configs/wpg/.current
File renamed without changes.
Binary file added Configs/wpg/samples/wallpaper.png_wal_sample.png
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"wallpaper": "/home/usertest/.config/wpg/wallpapers/wallpaper.png",
"alpha": "100",

"special": {
"background": "#0C0B0A",
"foreground": "#f8fdff",
"cursor": "#f8fdff"
},
"colors": {
"color0": "#0C0B0A",
"color1": "#827F74",
"color2": "#C2BEBE",
"color3": "#A29268",
"color4": "#6C7688",
"color5": "#9D9EA7",
"color6": "#798597",
"color7": "#cfd3d9",
"color8": "#272420",
"color9": "#b8ae86",
"color10": "#ffdede",
"color11": "#e3c575",
"color12": "#7c94c0",
"color13": "#b7bcee",
"color14": "#8ba9d5",
"color15": "#f8fdff"
}
}
1 change: 1 addition & 0 deletions Configs/wpg/sequences
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
]4;0;#0C0B0A\]4;1;#827F74\]4;2;#C2BEBE\]4;3;#A29268\]4;4;#6C7688\]4;5;#9D9EA7\]4;6;#798597\]4;7;#cfd3d9\]4;8;#272420\]4;9;#b8ae86\]4;10;#ffdede\]4;11;#e3c575\]4;12;#7c94c0\]4;13;#b7bcee\]4;14;#8ba9d5\]4;15;#f8fdff\]10;#f8fdff\]11;#0C0B0A\]12;#f8fdff\]13;#f8fdff\]17;#f8fdff\]19;#0C0B0A\]4;232;#0C0B0A\]4;256;#f8fdff\
1 change: 1 addition & 0 deletions Configs/wpg/wallpapers/wallpaper.png
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file removed Pictures/Wallpapers/Arch.png
Diff not rendered.
Binary file removed Pictures/Wallpapers/Miku2.jpg
Diff not rendered.
Binary file removed Pictures/Wallpapers/dandadan.png
Diff not rendered.
Binary file removed Pictures/Wallpapers/doomer.jpg
Diff not rendered.
Binary file removed Pictures/Wallpapers/electronics.jpg
Diff not rendered.
Binary file removed Pictures/Wallpapers/eye.png
Diff not rendered.
Binary file removed Pictures/Wallpapers/gidv.jpg
Diff not rendered.
Binary file removed Pictures/Wallpapers/gogatsu.png
Diff not rendered.
Binary file removed Pictures/Wallpapers/gumi.png
Diff not rendered.
Binary file removed Pictures/Wallpapers/kaguya1.png
Diff not rendered.
Binary file removed Pictures/Wallpapers/kaguya2.png
Diff not rendered.
Binary file removed Pictures/Wallpapers/kaguya3.png
Diff not rendered.
Binary file removed Pictures/Wallpapers/kaguya4.png
Diff not rendered.
Binary file removed Pictures/Wallpapers/kaguya5.png
Diff not rendered.
Binary file removed Pictures/Wallpapers/melee.jpg
Diff not rendered.
Binary file removed Pictures/Wallpapers/miku.png
Diff not rendered.
Binary file removed Pictures/Wallpapers/moeshop.png
Diff not rendered.
Binary file removed Pictures/Wallpapers/moeshot.png
Diff not rendered.
Binary file removed Pictures/Wallpapers/nanahira2.png
Diff not rendered.
Binary file removed Pictures/Wallpapers/planets.png
Diff not rendered.
Binary file removed Pictures/Wallpapers/rushia.jpg
Diff not rendered.
Binary file removed Pictures/Wallpapers/saturn.jpg
Diff not rendered.
Binary file removed Pictures/Wallpapers/simplesaturn.jpg
Diff not rendered.
Binary file removed Pictures/Wallpapers/sky.png
Diff not rendered.
Binary file removed Pictures/Wallpapers/sm64.png
Diff not rendered.
Binary file removed Pictures/Wallpapers/smashball.png
Diff not rendered.
Binary file removed Pictures/Wallpapers/snes.png
Diff not rendered.
Binary file removed Pictures/Wallpapers/spaceanimals.png
Diff not rendered.
Binary file removed Pictures/Wallpapers/ultrakill1.png
Diff not rendered.
Loading