Add theme switcher and alternative magenta colorscheme

This commit is contained in:
samedamci 2020-03-24 11:46:16 +01:00
parent b501aeac22
commit de1730c1ac
10 changed files with 119 additions and 59 deletions

View File

@ -16,7 +16,7 @@
padding = 15 padding = 15
horizontal_padding = 15 horizontal_padding = 15
frame_width = 1 frame_width = 1
frame_color = "#144949" frame_color = "#144949"
#alignment = left #alignment = left
#x = 15 #x = 15
#y = 15 #y = 15
@ -83,23 +83,20 @@
[urgency_low] [urgency_low]
# IMPORTANT: colors have to be defined in quotation marks. # IMPORTANT: colors have to be defined in quotation marks.
# Otherwise the "#" and following would be interpreted as a comment. # Otherwise the "#" and following would be interpreted as a comment.
background = "#071616" background = "#071616"
foreground = "#cccccc" foreground = "#dfdfdf"
frame_color = "#144949"
timeout = 5 timeout = 5
# Icon for notifications with low urgency, uncomment to enable # Icon for notifications with low urgency, uncomment to enable
#icon = ~/.local/share/arch.png #icon = ~/.local/share/arch.png
[urgency_normal] [urgency_normal]
background = "#071616" background = "#071616"
foreground = "#cccccc" foreground = "#dfdfdf"
frame_color = "#144949"
timeout = 5 timeout = 5
[urgency_critical] [urgency_critical]
background = "#10a0200" background = "#071616"
foreground = "#cccccc" foreground = "#dfdfdf"
frame_color = "#dfdfdf"
timeout = 0 timeout = 0
# Every section that isn't one of the above is interpreted as a rules to # Every section that isn't one of the above is interpreted as a rules to

View File

@ -1,8 +1,8 @@
[FileDialog] [FileDialog]
history=file:///home/samedamci/Pictures/Screenshots, file:///home/samedamci/.scripts/rofi-keepassxc, file:///home/samedamci/Pictures, file:///home/samedamci, file:///home/samedamci/Downloads/Telegram Desktop history=file:///home/samedamci/Pictures/Screenshots, file:///home/samedamci/.scripts/rofi-keepassxc, file:///home/samedamci/Pictures, file:///home/samedamci, file:///home/samedamci/Downloads/Telegram Desktop
lastVisited=file:///home/samedamci/Downloads/Telegram Desktop lastVisited=file:///home/samedamci/Pictures/Screenshots
qtVersion=5.14.1 qtVersion=5.14.1
shortcuts=file:, file:///home/samedamci shortcuts=file:, file:///home/samedamci
sidebarWidth=90 sidebarWidth=90
treeViewHeader=@ByteArray(\0\0\0\xff\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x1\xec\0\0\0\x4\x1\x1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x64\xff\xff\xff\xff\0\0\0\x81\0\0\0\0\0\0\0\x4\0\0\0\xff\0\0\0\x1\0\0\0\0\0\0\0?\0\0\0\x1\0\0\0\0\0\0\0@\0\0\0\x1\0\0\0\0\0\0\0n\0\0\0\x1\0\0\0\0\0\0\x3\xe8\0\xff\xff\xff\xff) treeViewHeader=@ByteArray(\0\0\0\xff\0\0\0\0\0\0\0\x1\0\0\0\x1\0\0\0\x3\x1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x1\xec\0\0\0\x4\x1\x1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x64\xff\xff\xff\xff\0\0\0\x81\0\0\0\0\0\0\0\x4\0\0\0\xff\0\0\0\x1\0\0\0\0\0\0\0?\0\0\0\x1\0\0\0\0\0\0\0@\0\0\0\x1\0\0\0\0\0\0\0n\0\0\0\x1\0\0\0\0\0\0\x3\xe8\0\xff\xff\xff\xff)
viewMode=Detail viewMode=Detail

View File

@ -2,6 +2,9 @@ rofi.modi: drun
rofi.font: DejaVu San Mono for Powerline 12 rofi.font: DejaVu San Mono for Powerline 12
rofi.show-icons: true rofi.show-icons: true
rofi.m: 0 rofi.m: 0
rofi.lines: 20 rofi.lines: 13
rofi.width: 30 rofi.width: 20
rofi.theme: theme rofi.theme: theme
rofi.location: 1
rofi.xoffset: 10
rofi.yoffset: 40

View File

@ -1,50 +1,38 @@
* { * {
maincolor: #144949; maincolor: #144949;
highlight: bold #e2a478; highlight: bold #e2a478;
urgentcolor: #dfdfdf; urgentcolor: #dfdfdf;
fg: #dfdfdf; foreground: #dfdfdf;
bg: #071616; background: #071616;
blackselect: #22262e; blackselect: #22262e;
/* hack */ background-color: @background;
/* maincolor: #007700; */
/* highlight: bold #00bb00; */
/* urgentcolor: #007700; */
/* fg: #007700; */
/* bg: #000000; */
/* blackselect: #001100; */
/* cyan: #004400; */
background-color: @bg;
show-icons: true; show-icons: true;
} }
window { window {
background-color: @bg; background-color: @background;
border: 1; border: 1;
border-color: @maincolor; border-color: @maincolor;
padding: 0; padding: 0;
anchor: center;
location: center;
y-offset: 20;
} }
mainbox { mainbox {
background-color: @bg; background-color: @background;
spacing: 0px; spacing: 0px;
children: [inputbar, message, listview]; children: [inputbar, message, listview];
} }
message { message {
padding: 6px 10px; padding: 6px 10px;
background-color:@bg; background-color:@background;
} }
textbox { textbox {
text-color:@urgentcolor; text-color:@urgentcolor;
padding: 10px 10px; padding: 10px 10px;
background-color:@bg; background-color:@background;
} }
listview { listview {
@ -54,7 +42,7 @@ listview {
spacing: 0px; spacing: 0px;
padding: 1px 0px 0px 0px; padding: 1px 0px 0px 0px;
margin: 0px 0px 1px 0px; margin: 0px 0px 1px 0px;
background: @bg; background: #071616;
} }
element { element {
@ -63,62 +51,62 @@ element {
element normal.normal { element normal.normal {
padding: 0px 15px; padding: 0px 15px;
background-color: @bg; background-color: @background;
text-color: @urgentcolor; text-color: @urgentcolor;
} }
element normal.urgent { element normal.urgent {
background-color: @bg; background-color: @background;
text-color: @urgentcolor; text-color: @urgentcolor;
} }
element normal.active { element normal.active {
background-color: @bg; background-color: @background;
text-color: @maincolor; text-color: @maincolor;
} }
element selected.normal { element selected.normal {
background-color: @blackselect; background-color: @blackselect;
text-color: @fg; text-color: @foreground;
} }
element selected.urgent { element selected.urgent {
background-color: @urgentcolor; background-color: @urgentcolor;
text-color: @bg; text-color: @background;
} }
element selected.active { element selected.active {
background-color: @maincolor; background-color: @maincolor;
text-color: @bg; text-color: @background;
} }
element alternate.normal { element alternate.normal {
background-color: @bg; background-color: @background;
text-color: @fg; text-color: @foreground;
} }
element alternate.urgent { element alternate.urgent {
background-color: @bg; background-color: @background;
text-color: @urgentcolor; text-color: @urgentcolor;
} }
element alternate.active { element alternate.active {
background-color: @bg; background-color: @background;
text-color: @maincolor; text-color: @maincolor;
} }
scrollbar { scrollbar {
background-color: @bg; background-color: @background;
handle-color: @cyan; handle-color: @cyan;
handle-width: 15px; handle-width: 15px;
} }
mode-switcher { mode-switcher {
background-color: @bg; background-color: @background;
} }
button { button {
background-color: @bg; background-color: @background;
text-color: @cyan; text-color: @cyan;
} }
@ -127,7 +115,7 @@ button selected {
} }
inputbar { inputbar {
background-color: @bg; background-color: @background;
spacing: 0px; spacing: 0px;
} }
@ -139,13 +127,13 @@ prompt {
entry { entry {
padding:6px 10px; padding:6px 10px;
background-color:@bg; background-color:@background;
text-color:@urgentcolor; text-color:@urgentcolor;
} }
case-indicator { case-indicator {
padding:6px 10px; padding:6px 10px;
text-color:@maincolor; text-color:@maincolor;
background-color:@bg; background-color:@background;
} }
/* vim:ft=css /* vim:ft=css

View File

@ -69,6 +69,10 @@ super + n
# kaomoji-rofi # kaomoji-rofi
super + e super + e
$SCRD/kaomoji-rofi/kaomoji.sh $SCRD/kaomoji-rofi/kaomoji.sh
# theme switcher
super + v
$SCRD/themeswitcher
#~~~~~~~~~~~~ #~~~~~~~~~~~~
# WM CONTROL # WM CONTROL

View File

@ -73,6 +73,9 @@ super + n
# kaomoji-rofi # kaomoji-rofi
super + e super + e
$SCRD/kaomoji-rofi/kaomoji.sh $SCRD/kaomoji-rofi/kaomoji.sh
# themeswitcher
super + v
$SCRD/themeswitcher
#~~~~~~~~~~~~ #~~~~~~~~~~~~
# WM CONTROL # WM CONTROL

View File

@ -16,19 +16,19 @@ fi
# Polybar # Polybar
killall -q polybar killall -q polybar
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done while pgrep -u $UID -x polybar >/dev/null; do killall -q polybar; done
polybar polybarexe & polybar polybarexe &
# Polybar # sxhkd
killall -q sxhkd killall -q sxhkd
while pgrep -u $UID -x sxhkd >/dev/null; do sleep 1; done while pgrep -u $UID -x sxhkd >/dev/null; do killall -q sxhkd; done
sxhkd & sxhkd &
# Dunst # Dunst
killall -q dunst killall -q dunst
while pgrep -u $UID -x dunst >/dev/null; do sleep 1; done while pgrep -u $UID -x dunst >/dev/null; do killall -q dunst; done
dunst & dunst &
# Picom # Picom
killall -q picom killall -q picom
while pgrep -u $UID -x picom >/dev/null; do sleep 1; done while pgrep -u $UID -x picom >/dev/null; do killall -q picom; done
picom & picom &
# Set keyboard layout & key swaping # Set keyboard layout & key swaping

3
botfiles/.scripts/bindinglist Executable file
View File

@ -0,0 +1,3 @@
#!/usr/bin/env sh
awk '/^[a-z]/ && last {print $0,"\t",last} {last=""} /^#/{last=$0}' ~/.config/sxhkd/sxhkdrc | column -t -s $'\t' | fzf --preview '' --height 100%

View File

@ -0,0 +1,62 @@
#!/usr/bin/env bash
xfile="$HOME/.Xresources"
theme="$(printf "cyan\nmagenta" | rofi -dmenu -i -p "Theme" -l 2)"
case "$theme" in
cyan)
bg="#071616"
bunfoc="#353234"
bfoc="#144949"
dselb="#144949"
;;
magenta)
bg="#211019"
bunfoc="#2d060e"
bfoc="#4c1139"
dselb="#4c1139"
;;
*) exit;;
esac
sed -i \
-e "s/\*\.background:.*/\*\.background: $bg/" \
-e "s/\*\.border_unfocused:.*/\*\.border_unfocused: $bunfoc/" \
-e "s/\*\.border_focused:.*/\*\.border_focused: $bfoc/" \
-e "s/dmenu\.selbackground:.*/dmenu\.selbackground: $dselb/" \
$xfile
# get colors
xrdb "$xfile"
fg=$(xrdb -query | awk '/\*.foreground/ { printf $2 }')
bg=$(xrdb -query | awk '/\*.background/ { printf $2 }')
bfoc=$(xrdb -query | awk '/\*.border_focused/ { printf $2 }')
# black=$(xrdb -query | awk '/color0/ { printf $2 }')
# red=$(xrdb -query | awk '/color1:/ { printf $2 }')
# green=$(xrdb -query | awk '/color2/ { printf $2 }')
# yellow=$(xrdb -query | awk '/color3/ { printf $2 }')
# blue=$(xrdb -query | awk '/color4/ { printf $2 }')
# magenta=$(xrdb -query | awk '/color5/ { printf $2 }')
# cyan=$(xrdb -query | awk '/color6/ { printf $2 }')
# white=$(xrdb -query | awk '/color7/ { printf $2 }')
# dunst
sed -i \
-e "s/^\s*foreground.*/ foreground = \"$fg\"/" \
-e "s/^\s*background.*/ background = \"$bg\"/" \
-e "s/^\s*frame_color.*/ frame_color = \"$bfoc\"/" \
~/.config/dunst/dunstrc
# rofi
sed -i \
-e "s/foreground:.*/foreground: ${fg};/" \
-e "s/background:.*/background: ${bg};/" \
-e "s/maincolor:.*/maincolor: ${bfoc};/" \
~/.config/rofi/theme.rasi
bspc wm -r
notify-send "Theme changed!"

6
updot
View File

@ -5,8 +5,8 @@ echo "Adding configs to dotfiles repo..."
cd ~ cd ~
cp .zshrc .Xresources .profile .shellrc .bashrc .zprofile .bash_profile .local/share/TelegramDesktop/tdata/shortcuts-custom.json ~/Dotfiles/botfiles/ &>/dev/null cp .zshrc .Xresources .profile .shellrc .bashrc .zprofile .bash_profile .local/share/TelegramDesktop/tdata/shortcuts-custom.json ~/Dotfiles/botfiles/ &>/dev/null
cd ~/.scripts/ cd ~/.scripts/
cp autostart lockscreen powermenu screenshot update-check updater websearch ~/Dotfiles/botfiles/.scripts/ &>/dev/null cp * ~/Dotfiles/botfiles/.scripts/ &>/dev/null
cd ~/.config cd ~/.config/
if [ "$HOSTNAME" = "pc" ]; then if [ "$HOSTNAME" = "pc" ]; then
cat sxhkd/sxhkdrc > sxhkd/sxhkdrc.pc cat sxhkd/sxhkdrc > sxhkd/sxhkdrc.pc
@ -16,7 +16,7 @@ elif [ "$HOSTNAME" = "laptop" ]; then
cat polybar/config > polybar/config.laptop cat polybar/config > polybar/config.laptop
fi fi
cp -r autostart flake8 bspwm dconf dunst gtk-3.0 gtk-2.0 homepage mpd ncmpcpp neofetch nvim picom polybar qutebrowser ranger rofi sxhkd vifm vis vlc wallpapers yay zsh ~/Dotfiles/botfiles/.config/ &>/dev/null cp -r flake8 bspwm dconf dunst gtk-3.0 gtk-2.0 homepage mpd ncmpcpp neofetch nvim picom polybar qutebrowser ranger rofi sxhkd vifm vis vlc wallpapers yay zsh ~/Dotfiles/botfiles/.config/ &>/dev/null
cd ~/Dotfiles/botfiles/.config/ cd ~/Dotfiles/botfiles/.config/
rm -rf nvim/bundle zsh/plugins mpd/database zsh/history mpd/mpd.log mpd/pid mpd/state mpd/sticker.sql vis/vis.log ncmpcpp/lyrics sxhkd/sxhkdrc polybar/config vifm/vifminfo rm -rf nvim/bundle zsh/plugins mpd/database zsh/history mpd/mpd.log mpd/pid mpd/state mpd/sticker.sql vis/vis.log ncmpcpp/lyrics sxhkd/sxhkdrc polybar/config vifm/vifminfo