Skip to content

Commit

Permalink
Added new script: Reverse URxvt Black/White
Browse files Browse the repository at this point in the history
  • Loading branch information
owl4ce committed Oct 8, 2020
1 parent 8853a46 commit 172c3e7
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 15 deletions.
34 changes: 25 additions & 9 deletions .Xresources
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
! DO NOT CHANGE THE ORDER
! -----------------------

! URXVT APPEARANCE
URxvt.font: xft:mplus nerd font mono:size=10
URxvt.geometry: 84x15
Expand Down Expand Up @@ -73,26 +76,39 @@ URxvt.urlButton: 1
#define white0 #F9F9F9
#define white1 #FFFFFF

*.foreground: white0
*.background: black0
*.cursorColor: white0
!*fading: 35
!*fadeColor: black2

*.color0: black2
*.color1: red0
*.color2: green0
*.color3: yellow0
*.color4: blue0
*.color5: magenta0
*.color6: cyan0
*.color7: white0

*.color8: black3
*.color9: red1
*.color10: green1
*.color11: yellow1
*.color12: blue1
*.color13: magenta1
*.color14: cyan1

! FOR REVERSING ONLY (BLACK-WHITE)
! see ~/.scripts/reverse-urxvt-bw
! --------------------------------
*.foreground: white0
*.background: black0
*.cursorColor: white0

*.color0: black2
*.color7: white0

*.color8: black3
*.color15: white1

!*.foreground: black0
!*.background: white0
!*.cursorColor: black0

!*.color0: white0
!*.color7: black2

!*.color8: white1
!*.color15: black3
1 change: 1 addition & 0 deletions .config/obmenu-generator/schema.pl
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@

{beg => ["Theme Styling", "$ENV{HOME}/.icons/gladient/themer.png"]},
{item => ["urxvt -e ~/.config/openbox/visual-mode/wally", "Change Wallpaper", "$ENV{HOME}/.icons/gladient/wally.png"]},
{item => ["bash -c '~/.scripts/reverse-urxvt-bw'", "Reverse URxvt B/W", "$ENV{HOME}/.icons/gladient/term.png"]},
{sep => undef},
{item => ["urxvt -e ~/.config/openbox/visual-mode/obch", "Change Button Style", "$ENV{HOME}/.icons/gladient/obt-c.png"]},
{item => ["bash -c '~/.config/openbox/visual-mode/obsw'", "Switch Button L/R", "$ENV{HOME}/.icons/gladient/obt-s.png"]},
Expand Down
46 changes: 46 additions & 0 deletions .scripts/reverse-urxvt-bw
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#!/usr/bin/env bash

# Reverse urxvt color between black and white

current="$(cat ~/.Xresources | grep "foreground" | head -n1 | grep '!')"

if [[ $current != *"!"* ]]; then

sed -i '96s_*_!*_' ~/.Xresources
sed -i '97s_*_!*_' ~/.Xresources
sed -i '98s_*_!*_' ~/.Xresources
sed -i '100s_*_!*_' ~/.Xresources
sed -i '101s_*_!*_' ~/.Xresources
sed -i '103s_*_!*_' ~/.Xresources
sed -i '104s_*_!*_' ~/.Xresources

sed -i '106s_!__' ~/.Xresources
sed -i '107s_!__' ~/.Xresources
sed -i '108s_!__' ~/.Xresources
sed -i '110s_!__' ~/.Xresources
sed -i '111s_!__' ~/.Xresources
sed -i '113s_!__' ~/.Xresources
sed -i '114s_!__' ~/.Xresources
xrdb ~/.Xresources &

else

sed -i '96s_!__' ~/.Xresources
sed -i '97s_!__' ~/.Xresources
sed -i '98s_!__' ~/.Xresources
sed -i '100s_!__' ~/.Xresources
sed -i '101s_!__' ~/.Xresources
sed -i '103s_!__' ~/.Xresources
sed -i '104s_!__' ~/.Xresources

sed -i '106s_*_!*_' ~/.Xresources
sed -i '107s_*_!*_' ~/.Xresources
sed -i '108s_*_!*_' ~/.Xresources
sed -i '110s_*_!*_' ~/.Xresources
sed -i '111s_*_!*_' ~/.Xresources
sed -i '113s_*_!*_' ~/.Xresources
sed -i '114s_*_!*_' ~/.Xresources
xrdb ~/.Xresources &

fi

7 changes: 1 addition & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Here are some details about my setup:
- **Text Editor** : [Geany](https://www.geany.org/), [nano](https://www.nano-editor.org/), [vim](https://www.vim.org/)

## :gift: Changelogs
<img src="https://i.ibb.co/grQBY3Y/Rike-Koi-owl4ce.png" alt="RikeKoi.owl4ce" align="right" width="400px">
<img src="https://i.ibb.co/8Xv8Hyg/2020-10-08-143824-1366x768-scrot.png" alt="reverse-urxvt-bw.owl4ce" align="right" width="400px">

- **UI Enlargement**: Fonts, etc. - [See gallery](https://github.com/owl4ce/dotfiles/wiki/Gallery)
- **GTK+ Theme**: Google-chrome / Chromium - [See tip](#user-configuration)
Expand All @@ -44,11 +44,6 @@ Here are some details about my setup:
- **SLiM**: New looks
- **Major Changes**: Reconfigure all files

<br>
<br>
<br>
<br>

## :rice_scene: Setup
This is how to install this dotfiles for openbox automated setup.

Expand Down

0 comments on commit 172c3e7

Please sign in to comment.