Skip to content

Commit 8c2a67f

Browse files
committed
Change i3 color and some vim config
1 parent e31cf1f commit 8c2a67f

File tree

276 files changed

+319
-17621
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

276 files changed

+319
-17621
lines changed

Xresources

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ URxvt.lineSpace: 0
99
! general settings
1010
URxvt*saveline: 15000
1111
URxvt*iso14755: false
12-
URxvt*termName: xterm-256color
12+
URxvt*termName: rxvt-unicode-256color
1313
URxvt*urgentOnBell: true
1414

1515
/* ! appearance */
@@ -20,17 +20,16 @@ URxvt*externalBorder: 0
2020
URxvt.geometry: 84x22
2121

2222
! perl extensions
23-
URxvt*perl-ext-common: default,matcher,clipboard,url-select,keyboard-select,-tabbed,resize-font
23+
URxvt*perl-ext-common: default,matcher,clipboard,url-select,keyboard-select,-tabbed,resize-font
24+
URxvt.keysym.Control-f: perl:keyboard-select:search
25+
URxvt.keysym.Control-v: perl:keyboard-select:activate
26+
URxvt.keysym.Control-o: perl:url-select:select_next
27+
URxvt.url-select.underline: true
28+
URxvt.url-select.button: 1
2429

2530
! macros for clipboard and selection
26-
URxvt*copyCommand: xclip -i -selection clipboard
27-
URxvt*pasteCommand: xclip -o -selection clipboard
28-
URxvt*keysym.M-C-v: perl:clipboard:paste_escaped
29-
URxvt*keysym.M-Escape: perl:keyboard-select:activate
30-
URxvt*keysym.M-f: perl:keyboard-select:search
31-
URxvt*keysym.M-n: perl:url-select:select_next
32-
URxvt*keysym.Control-Shift-C: perl:clipboard:copy
33-
URxvt*keysym.Control-Shift-V: perl:clipboard:paste
31+
URxvt*keysym.Control-Shift-C: perl:clipboard:copy
32+
URxvt*keysym.Control-Shift-V: perl:clipboard:paste
3433

3534
! ------------------------------------------------------------------------------
3635
! Color Configuration
@@ -39,7 +38,7 @@ URxvt*keysym.Control-Shift-V: perl:clipboard:paste
3938
! Base16 Default Dark
4039
! Scheme: Chris Kempson (http://chriskempson.com)
4140

42-
#define base00 #181818
41+
#define base00 #1c1c1c
4342
#define base01 #282828
4443
#define base02 #383838
4544
#define base03 #585858
@@ -86,15 +85,16 @@ URxvt*keysym.Control-Shift-V: perl:clipboard:paste
8685
! Font configuration
8786
! ------------------------------------------------------------------------------
8887

89-
URxvt*font: xft:Hack:Regular:size=11
90-
URxvt*boldFont: xft:Hack:Bold:size=11
91-
URxvt*italicFont: xft:Hack:Italic:size=11
92-
URxvt*boldItalicFont: xft:Hack:Bold Italic:size=11
88+
URxvt*font: xft:SauceCodePro Nerd Font Mono:Regular:size=10
89+
URxvt*boldFont: xft:SauceCodePro Nerd Font Mono:Bold:size=10
90+
URxvt*italicFont: xft:SauceCodePro Nerd Font Mono:Italic:size=10
91+
URxvt*boldItalicFont: xft:SauceCodePro Nerd Font Mono:Bold Italic:size=10
9392

9493
! ------------------------------------------------------------------------------
9594
! Xft Font Configuration
9695
! ------------------------------------------------------------------------------
9796

97+
Xft.dpi: 110
9898
Xft.autohint: 0
9999
Xft.lcdfilter: lcddefault
100100
Xft.hintstyle: hintslight

config/i3/config

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
set $super Mod4
33
set $alt Mod1
44

5-
set $ws1 "1: "
6-
set $ws2 "2: "
5+
set $ws1 "1: "
6+
set $ws2 "2: "
77
set $ws3 "3:  "
88
set $ws4 "4:  "
99
set $ws5 "5:  "
@@ -98,8 +98,8 @@ bindsym $super+space floating toggle
9898
bindsym $super+Shift+space focus mode_toggle
9999

100100
# switch to workspace
101-
bindsym $alt+Control+Right workspace next
102-
bindsym $alt+Control+Left workspace prev
101+
bindsym $super+n workspace next
102+
bindsym $super+p workspace prev
103103
bindsym $super+1 workspace $ws1
104104
bindsym $super+2 workspace $ws2
105105
bindsym $super+3 workspace $ws3
@@ -137,10 +137,10 @@ mode "$mode_system" {
137137

138138
# resize window (you can also use the mouse for that)
139139
mode "resize" {
140-
bindsym Left resize shrink width 5 px or 5 ppt
141-
bindsym Down resize grow height 5 px or 5 ppt
142-
bindsym Up resize shrink height 5 px or 5 ppt
143-
bindsym Right resize grow width 5 px or 5 ppt
140+
bindsym h resize shrink width 5 px or 5 ppt
141+
bindsym j resize grow height 5 px or 5 ppt
142+
bindsym k resize shrink height 5 px or 5 ppt
143+
bindsym l resize grow width 5 px or 5 ppt
144144
bindsym Return mode "default"
145145
}
146146
bindsym $super+r mode "resize"
@@ -149,17 +149,17 @@ bindsym $super+r mode "resize"
149149
bar {
150150
height 23
151151
strip_workspace_numbers no
152-
font pango: NotoSans Nerd Font 11
152+
font pango: NotoSans Nerd Font 10
153153
colors {
154154
background #1C1C1C
155155
statusline #000000
156156
# separator #4b5262
157157

158158
# colour of border, background, and text
159-
focused_workspace #2f343f #bf616a #d8dee8
160-
active_workspace #2f343f #2f343f #d8dee8
161-
inactive_workspace #2f343f #2f343f #d8dee8
162-
urgent_workspace #2f343f #ebcb8b #2f343f
159+
focused_workspace #1c1c1c #bf616a #d8dee8
160+
active_workspace #1c1c1c #1c1c1c #d8dee8
161+
inactive_workspace #1c1c1c #1c1c1c #d8dee8
162+
urgent_workspace #1c1c1c #ebcb8b #1c1c1c
163163
}
164164
status_command i3blocks
165165
}
@@ -176,16 +176,13 @@ for_window [class=URxvt|Firefox|Geany|Evince|Soffice|libreoffice*|mpv|Ghb|Xfburn
176176
for_window [class=Xfburn|GParted|System-config-printer.py|Lxtask|Pavucontrol|Exo-helper*|Lxrandr|Arandr] focus
177177

178178
# colour of border, background, text, indicator, and child_border
179-
client.focused #bf616a #2f343f #d8dee8 #bf616a #d8dee8
180-
client.focused_inactive #2f343f #2f343f #d8dee8 #2f343f #2f343f
181-
client.unfocused #2f343f #2f343f #d8dee8 #2f343f #2f343f
182-
client.urgent #2f343f #2f343f #d8dee8 #2f343f #2f343f
183-
client.placeholder #2f343f #2f343f #d8dee8 #2f343f #2f343f
184-
client.background #2f343f
179+
client.focused #bf616a #1c1c1c #d8dee8 #bf616a #a1d569
180+
client.focused_inactive #1c1c1c #1c1c1c #d8dee8 #1c1c1c #1c1c1c
181+
client.unfocused #1c1c1c #1c1c1c #d8dee8 #1c1c1c #1c1c1c
182+
client.urgent #1c1c1c #1c1c1c #d8dee8 #1c1c1c #1c1c1c
183+
client.placeholder #1c1c1c #1c1c1c #d8dee8 #1c1c1c #1c1c1c
184+
client.background #1c1c1c
185185

186186
# I3gaps
187187
gaps inner 9
188188
gaps outer 7
189-
# Only enable gaps on a workspace when there is at least one container
190-
# smart_gaps on
191-
# Only enable outer gaps when there is exactly one container

config/i3blocks/config

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,15 @@ command=~/.config/i3blocks/scripts/$BLOCK_NAME
2929
separator_block_width=15
3030
markup=pango
3131

32-
# Ncmpcpp
33-
[ncmpcpp]
34-
interval=10
32+
# # Ncmpcpp
33+
# [ncmpcpp]
34+
# interval=10
35+
# color=#a1d569
36+
37+
[mediaplayer]
38+
instance=mpd
39+
interval=5
40+
signal=10
3541
color=#a1d569
3642

3743
# Volume
Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
#!/usr/bin/env perl
2+
# Copyright (C) 2014 Tony Crisci <[email protected]>
3+
# Copyright (C) 2015 Thiago Perrotta <perrotta dot thiago at poli dot ufrj dot br>
4+
5+
# This program is free software: you can redistribute it and/or modify
6+
# it under the terms of the GNU General Public License as published by
7+
# the Free Software Foundation, either version 3 of the License, or
8+
# (at your option) any later version.
9+
10+
# This program is distributed in the hope that it will be useful,
11+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
# GNU General Public License for more details.
14+
15+
# You should have received a copy of the GNU General Public License
16+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
17+
18+
# Requires playerctl binary to be in your path (except cmus)
19+
# See: https://github.com/acrisci/playerctl
20+
21+
# Set instance=NAME in the i3blocks configuration to specify a music player
22+
# (playerctl will attempt to connect to org.mpris.MediaPlayer2.[NAME] on your
23+
# DBus session).
24+
25+
use Time::HiRes qw(usleep);
26+
use Env qw(BLOCK_INSTANCE);
27+
28+
use constant DELAY => 50; # Delay in ms to let network-based players (spotify) reflect new data.
29+
use constant SPOTIFY_STR => 'spotify';
30+
31+
my @metadata = ();
32+
my $player_arg = "";
33+
34+
if ($BLOCK_INSTANCE) {
35+
$player_arg = "--player='$BLOCK_INSTANCE'";
36+
}
37+
38+
sub buttons {
39+
my $method = shift;
40+
41+
if($method eq 'mpd') {
42+
if ($ENV{'BLOCK_BUTTON'} == 1) {
43+
system("mpc prev");
44+
} elsif ($ENV{'BLOCK_BUTTON'} == 2) {
45+
system("mpc toggle");
46+
} elsif ($ENV{'BLOCK_BUTTON'} == 3) {
47+
system("mpc next");
48+
} elsif ($ENV{'BLOCK_BUTTON'} == 4) {
49+
system("mpc volume +10");
50+
} elsif ($ENV{'BLOCK_BUTTON'} == 5) {
51+
system("mpc volume -10");
52+
}
53+
} elsif ($method eq 'cmus') {
54+
if ($ENV{'BLOCK_BUTTON'} == 1) {
55+
system("cmus-remote --prev");
56+
} elsif ($ENV{'BLOCK_BUTTON'} == 2) {
57+
system("cmus-remote --pause");
58+
} elsif ($ENV{'BLOCK_BUTTON'} == 3) {
59+
system("cmus-remote --next");
60+
}
61+
} elsif ($method eq 'playerctl') {
62+
if ($ENV{'BLOCK_BUTTON'} == 1) {
63+
system("playerctl $player_arg previous");
64+
usleep(DELAY * 1000) if $BLOCK_INSTANCE eq SPOTIFY_STR;
65+
} elsif ($ENV{'BLOCK_BUTTON'} == 2) {
66+
system("playerctl $player_arg play-pause");
67+
} elsif ($ENV{'BLOCK_BUTTON'} == 3) {
68+
system("playerctl $player_arg next");
69+
usleep(DELAY * 1000) if $BLOCK_INSTANCE eq SPOTIFY_STR;
70+
} elsif ($ENV{'BLOCK_BUTTON'} == 4) {
71+
system("playerctl $player_arg volume 0.01+");
72+
} elsif ($ENV{'BLOCK_BUTTON'} == 5) {
73+
system("playerctl $player_arg volume 0.01-");
74+
}
75+
} elsif ($method eq 'rhythmbox') {
76+
if ($ENV{'BLOCK_BUTTON'} == 1) {
77+
system("rhythmbox-client --previous");
78+
} elsif ($ENV{'BLOCK_BUTTON'} == 2) {
79+
system("rhythmbox-client --play-pause");
80+
} elsif ($ENV{'BLOCK_BUTTON'} == 3) {
81+
system("rhythmbox-client --next");
82+
}
83+
}
84+
}
85+
86+
sub cmus {
87+
my @cmus = split /^/, qx(cmus-remote -Q);
88+
if ($? == 0) {
89+
foreach my $line (@cmus) {
90+
my @data = split /\s/, $line;
91+
if (shift @data eq 'tag') {
92+
my $key = shift @data;
93+
my $value = join ' ', @data;
94+
95+
@metadata[0] = $value if $key eq 'artist';
96+
@metadata[1] = $value if $key eq 'title';
97+
}
98+
}
99+
100+
if (@metadata) {
101+
buttons('cmus');
102+
103+
# metadata found so we are done
104+
print(join ' - ', @metadata);
105+
exit 0;
106+
}
107+
}
108+
}
109+
110+
sub mpd {
111+
my $data = qx(mpc current);
112+
if (not $data eq '') {
113+
buttons("mpd");
114+
print($data);
115+
exit 0;
116+
}
117+
}
118+
119+
sub playerctl {
120+
buttons('playerctl');
121+
122+
my $artist = qx(playerctl $player_arg metadata artist);
123+
chomp $artist;
124+
# exit status will be nonzero when playerctl cannot find your player
125+
exit(0) if $? || $artist eq '(null)';
126+
127+
push(@metadata, $artist) if $artist;
128+
129+
my $title = qx(playerctl $player_arg metadata title);
130+
exit(0) if $? || $title eq '(null)';
131+
132+
push(@metadata, $title) if $title;
133+
134+
print(join(" - ", @metadata)) if @metadata;
135+
}
136+
137+
sub rhythmbox {
138+
buttons('rhythmbox');
139+
140+
my $data = qx(rhythmbox-client --print-playing --no-start);
141+
print($data);
142+
}
143+
144+
if ($player_arg eq '' or $player_arg =~ /mpd/) {
145+
mpd;
146+
}
147+
elsif ($player_arg =~ /cmus/) {
148+
cmus;
149+
}
150+
elsif ($player_arg =~ /rhythmbox/) {
151+
rhythmbox;
152+
}
153+
else {
154+
playerctl;
155+
}
156+
print("\n");

config/mpd/mpd.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
port "6700"
1+
port "6600"
22

33
music_directory "~/Dropbox/Musics"
44
playlist_directory "~/.config/mpd/playlists"

0 commit comments

Comments
 (0)