-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ea91674
commit 5205bb9
Showing
7 changed files
with
113 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
#!/bin/bash | ||
# light and dark theme switcher | ||
|
||
# Check if an argument is provided | ||
if [ $# -ne 1 ]; then | ||
|
@@ -13,40 +14,60 @@ theme=$1 | |
if [ "$theme" = "light" ]; then | ||
echo "Setting light theme..." | ||
|
||
# gtk | ||
gsettings set org.gnome.desktop.interface color-scheme 'default' | ||
gsettings set org.gnome.desktop.interface icon-theme 'ePapirus' | ||
# generic across all de/wm | ||
# terminal | ||
alacritty-conf -c atom_one_light | ||
|
||
gnome-extensions enable [email protected] | ||
case "$DESKTOP_SESSION" in | ||
gnome) | ||
# gtk | ||
gsettings set org.gnome.desktop.interface color-scheme 'default' | ||
gsettings set org.gnome.desktop.interface icon-theme 'ePapirus' | ||
|
||
# qt | ||
cp "$HOME/.config/qt5ct/light.conf" "$HOME/.config/qt5ct/qt5ct.conf" | ||
# tray icons change contrast so they can be seen | ||
dconf write /org/gnome/shell/extensions/appindicator/icon-contrast -1.0 | ||
|
||
# terminal | ||
alacritty-conf -c atom_one_light | ||
gnome-extensions enable [email protected] | ||
|
||
# qt | ||
cp "$HOME/.config/qt5ct/light.conf" "$HOME/.config/qt5ct/qt5ct.conf" | ||
|
||
# wallpaper using variety | ||
variety --set-option icon Dark --set-option lightness_mode 1 | ||
variety --next | ||
# wallpaper using variety | ||
variety --set-option icon Dark --set-option lightness_mode 1 | ||
variety --next | ||
;; | ||
i3) | ||
echo "no theme setup" | ||
;; | ||
esac | ||
|
||
elif [ "$theme" = "dark" ]; then | ||
echo "Setting dark theme..." | ||
|
||
gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark' | ||
gsettings set org.gnome.desktop.interface icon-theme 'ePapirus-Dark' | ||
# terminal | ||
alacritty-conf -c alacritty_0_12 | ||
|
||
gnome-extensions disable [email protected] | ||
case "$DESKTOP_SESSION" in | ||
gnome) | ||
gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark' | ||
gsettings set org.gnome.desktop.interface icon-theme 'ePapirus-Dark' | ||
|
||
# qt | ||
cp "$HOME/.config/qt5ct/dark.conf" "$HOME/.config/qt5ct/qt5ct.conf" | ||
# tray icons reset contrast back so they can be seen | ||
dconf write /org/gnome/shell/extensions/appindicator/icon-contrast 0.0 | ||
|
||
# terminal | ||
alacritty-conf -c alacritty_0_12 | ||
gnome-extensions disable [email protected] | ||
|
||
# wallpaper using variety | ||
variety --set-option icon Light --set-option lightness_mode 0 | ||
variety --next | ||
# qt | ||
cp "$HOME/.config/qt5ct/dark.conf" "$HOME/.config/qt5ct/qt5ct.conf" | ||
|
||
# wallpaper using variety | ||
variety --set-option icon Light --set-option lightness_mode 0 | ||
variety --next | ||
;; | ||
i3) | ||
echo "no theme set" | ||
;; | ||
esac | ||
else | ||
echo "Invalid argument. Usage: $0 <light|dark>" | ||
exit 1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
eval $(/usr/bin/gnome-keyring-daemon --start --components=gpg,pkcs11,secrets,ssh) | ||
export GNOME_KEYRING_CONTROL GNOME_KEYRING_PID GPG_AGENT_INFO SSH_AUTH_SOCK |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash | ||
|
||
# Get the window ID of the currently focused window | ||
WINDOW_ID=$(xdotool getwindowfocus) | ||
# zenity --info --text="$WINDOW_ID" | ||
# Get the class name of the window | ||
WINDOW_CLASS=$(xprop -id $WINDOW_ID | grep "WM_CLASS" | awk -F '"' '{print $4}') | ||
|
||
# Check if the window class name is 'google-chrome' | ||
if [ "$WINDOW_CLASS" == "Google-chrome" ]; then | ||
xdotool key ctrl+Tab | ||
# xdotool windowactivate --sync $WINDOW_ID | ||
# sleep 0.2 | ||
# xdotool key ctrl+shift+a | ||
# xdotool key Return | ||
# xdotool --window $WINDOW_ID keydown ctrl | ||
# xdotool --window $WINDOW_ID keydown shift | ||
# xdotool --window $WINDOW_ID key a | ||
# xdotool --window $WINDOW_ID keyup shift | ||
# xdotool --window $WINDOW_ID keyup ctrl | ||
# zenity --info --text="shivanshu" | ||
else | ||
xdotool key ctrl+Tab | ||
fi | ||
|