1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 | # This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
set $rofi "rofi -show run -font 'snap 10' -color-normal '#000000,#ffffff,#222222,#44bbff,#ffffff' -color-window '#000000,#ffffff'"
# i3 config file (v4)
#
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
set $mod Mod4
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
font pango:monospace 8
# This font is widely installed, provides lots of unicode glyphs, right-to-left
# text rendering and scalability on retina/hidpi displays (thanks to pango).
#font pango:DejaVu Sans Mono 8
# Before i3 v4.8, we used to recommend this one as the default:
# font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
# The font above is very space-efficient, that is, it looks good, sharp and
# clear in small sizes. However, its unicode glyph coverage is limited, the old
# X core fonts rendering does not support right-to-left and this being a bitmap
# font, it doesn’t scale on retina/hidpi displays.
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# start a terminal
#bindsym $mod+Return exec i3-sensible-terminal
bindsym $mod+Return exec termite
# kill focused window
bindsym $mod+Shift+q kill
# start dmenu (a program launcher)
#bindsym $mod+d exec dmenu_run
# There also is the (new) i3-dmenu-desktop which only displays applications
# shipping a .desktop file. It is a wrapper around dmenu, so you need that
# installed.
#bindsym $mod+d exec --no-startup-id i3-dmenu-desktop
#bindsym $mod+d exec --no-startup-id rofi -modi drun -show drun
bindsym $mod+d exec $rofi
# change focus
bindsym $mod+j focus left
bindsym $mod+k focus down
bindsym $mod+l focus up
bindsym $mod+ntilde focus right
# alternatively, you can use the cursor keys:
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# move focused window
bindsym $mod+Shift+j move left
bindsym $mod+Shift+k move down
bindsym $mod+Shift+l move up
bindsym $mod+Shift+ntilde move right
# alternatively, you can use the cursor keys:
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
# split in horizontal orientation
bindsym $mod+h split h
# split in vertical orientation
bindsym $mod+v split v
# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen toggle
# change container layout (stacked, tabbed, toggle split)
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
# toggle tiling / floating
bindsym $mod+Shift+space floating toggle
# change focus between tiling / floating windows
bindsym $mod+space focus mode_toggle
# focus the parent container
bindsym $mod+a focus parent
# focus the child container
#bindsym $mod+d focus child
# nombres del area de trabajo
set $workspace1 " terminal "
set $workspace2 " chrome "
set $workspace3 " spotify "
set $workspace4 " media "
set $workspace5 " "
set $workspace6 " systems "
set $workspace7 " "
set $workspace8 " "
set $workspace9 " games "
set $workspace10 " "
# Desplazar entre workspaces
bindsym $mod+Home workspace $workspace1
bindsym $mod+End workspace $workspace10
bindsym $mod+Prior workspace prev
bindsym $mod+Next workspace next
# switch to workspace
bindsym $mod+1 workspace $workspace1
bindsym $mod+2 workspace $workspace2
bindsym $mod+3 workspace $workspace3
bindsym $mod+4 workspace $workspace4
bindsym $mod+5 workspace $workspace5
bindsym $mod+6 workspace $workspace6
bindsym $mod+7 workspace $workspace7
bindsym $mod+8 workspace $workspace8
bindsym $mod+9 workspace $workspace9
bindsym $mod+0 workspace $workspace10
# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace $workspace1
bindsym $mod+Shift+2 move container to workspace $workspace2
bindsym $mod+Shift+3 move container to workspace $workspace3
bindsym $mod+Shift+4 move container to workspace $workspace4
bindsym $mod+Shift+5 move container to workspace $workspace5
bindsym $mod+Shift+6 move container to workspace $workspace6
bindsym $mod+Shift+7 move container to workspace $workspace7
bindsym $mod+Shift+8 move container to workspace $workspace8
bindsym $mod+Shift+9 move container to workspace $workspace9
bindsym $mod+Shift+0 move container to workspace $workspace10
assign [class="Google-chrome"] $workspace2
#assign [class="Firefox"] $workspace2
#assign [class="Spotify"] $workspace3
#assign [class="Vlc"] $workspace5
assign [class="Dolphin"] $workspace6
assign [class="VirtualBox"] $workspace6
assign [class="Simplescreenrecorder"] $workspace10
for_window [class="Spotify"] floating enable move container to workspace $workspace3
assign [class="xfce4-terminal"] $workspace1
#for_window [class="Gimp"] floating enable move container to workspace $workspace7
#for_window [window_role="gimp-dock"] floating disable; move left; resize shrink width 80px
#for_window [window_role="gimp-toolbox"] floating disable; move right; resize set 654px 262px
# reload the configuration file
bindsym $mod+Shift+c reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Shift+r restart
# exit i3 (logs you out of your X session)
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'"
# resize window (you can also use the mouse for that)
mode "resize" {
# These bindings trigger as soon as you enter the resize mode
# Pressing left will shrink the window’s width.
# Pressing right will grow the window’s width.
# Pressing up will shrink the window’s height.
# Pressing down will grow the window’s height.
bindsym j resize shrink width 10 px or 10 ppt
bindsym k resize grow height 10 px or 10 ppt
bindsym l resize shrink height 10 px or 10 ppt
bindsym ntilde resize grow width 10 px or 10 ppt
# same bindings, but for the arrow keys
bindsym Left resize shrink width 10 px or 10 ppt
bindsym Down resize grow height 10 px or 10 ppt
bindsym Up resize shrink height 10 px or 10 ppt
bindsym Right resize grow width 10 px or 10 ppt
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+r mode "resize"
# class border backgr. text indicator child_border
#client.placeholder #212121 #0C0C0C #FFFFFF #212121 #262626
#client.background #212121
# Color settings
client.focused #349f86 #349f85 #000088 #00C1FF
client.focused_inactive #2C2C2C #2C2C2C #ffffff #2C2C2C
client.unfocused #2C2C2C #2C2C2C #ffffff #2C2C2C
client.urgent #00C1FF #00C1FF #000088 #00C1FF
default_border pixel 3
hide_edge_borders vertical
bar {
font pango:sans, awesome 10
status_command i3blocks -c /home/angelaguayo/.config/i3/i3blocks.conff
#status_command i3blocks -c /home/angelaguayo/i3blocks.conff
i3bar_command i3bar -t
#status_command i3blocks -c /home/angelaguayo/.config/i3/i3blocks.conf
colors {
#separator #dc322f
#background #002b3680
background #fdf6e300
#statusline #268bd2
focused_workspace #349f89 #349f89 #fdf6e3
active_workspace #fdf6e380 #6c71c480 #fdf6e3
inactive_workspace #002b36 #002b36 #fdf6e3
urgent_workspace #d33682 #d33682 #fdf6e3
}
}
#OTHERS
#exec --no-start-id polybar example
# Borders
hide_edge_borders both
# others
exec --no-startup-id setxkbmap latam
# cambio fondo escritorio #directorio donde se encuentra la imagen
#exec --no-startup-id feh --bg-scale /home/angelaguayo/.config/i3/wall.png
exec --no-startup-id feh --bg-scale /home/angelaguayo/02.jpg
# correr compositor para transparencia, fondo,etc
exec --no-startup-id compton
##GAPSSSSS
# Disable window titlebars entirely
for_window [class="^.*"] border pixel 2
# Set inner/outer gaps
gaps inner 10
gaps outer 15
# Additionally, you can issue commands with the following syntax. This
#is useful to bind keys to changing the gap size.
# gaps inner|outer current|all set|plus|minus <px>
# gaps inner all set 10
# gaps outer all plus 5
# Smart gaps (gaps used if only more than one container on the
#workspace)
#smart_gaps on
# Smart borders (draw borders around container only if it is not the
#only container on this workspace)
# on|no_gaps (on=always activate and no_gaps=only activate if the gap
#size to the edge of the screen is 0)
smart_borders on
# Press $mod+Shift+g to enter the gap mode. Choose o or i for modifying
#outer/inner gaps. Press one of + / - (in-/decrement for current
#workspace) or 0 (remove gaps for current workspace). If you also press
#Shift with these keys, the change will be global for all workspaces.
set $mode_gaps Gaps: (o) outer, (i) inner
set $mode_gaps_outer Outer Gaps: +|-|0 (local), Shift + +|-|0 (global)
set $mode_gaps_inner Inner Gaps: +|-|0 (local), Shift + +|-|0 (global)
bindsym $mod+Shift+g mode "$mode_gaps"
mode "$mode_gaps" {
bindsym o mode "$mode_gaps_outer"
bindsym i mode "$mode_gaps_inner"
bindsym Return mode "default"
bindsym Escape mode "default"
}
mode "$mode_gaps_inner" {
bindsym plus gaps inner current plus 5
bindsym minus gaps inner current minus 5
bindsym 0 gaps inner current set 0
bindsym Shift+plus gaps inner all plus 5
bindsym Shift+minus gaps inner all minus 5
bindsym Shift+0 gaps inner all set 0
bindsym Return mode "default"
bindsym Escape mode "default"
}
mode "$mode_gaps_outer" {
bindsym plus gaps outer current plus 5
bindsym minus gaps outer current minus 5
bindsym 0 gaps outer current set 0
bindsym Shift+plus gaps outer all plus 5
bindsym Shift+minus gaps outer all minus 5
bindsym Shift+0 gaps outer all set 0
bindsym Return mode "default"
bindsym Escape mode "default"
}
#client.focused #859900 #859900 #fdf6e3 #6c71c4
#client.focused_inactive #073642 #073642 #eee8d5 #6c71c4
#client.unfocused #073642 #073642 #93a1a1 #586e75
#client.urgent #d33682 #d33682 #fdf6e3 #dc322f
|
x
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 | command=/usr/local/libexec/i3blocks/$BLOCK_NAME
#command=/usr/lib/i3blocks/$BLOCK_NAME
#separator_block_width=30
#markup=pango
full_text=
align=center
separator=true
separator_block_width=0
color=#005f87
markup=pango
border_left=0
border_right=0
border_top=8
border_bottom=8
border=#005f87 #151617
[separator2]
full_text=<span foreground="#349f85"></span>
markup=pango
border=#002b3600
# Display current song
[mediaplayer]
label=
command=printf "\\u266A " && /home/angelaguayo/.config/i3/media
instance=spotify
interval=5
signal=10
color=#FFFFFF
#background=#00FF00
background=#349F85
border=#349F85
[separator2]
full_text=<span background="#349F85" foreground="#002B36"></span>
markup=pango
border=#349f85
[volume]
#label=VOL
label=♪
instance=Master
#instance=PCM
interval=once
signal=10
color=#ffffff
background=#002B36
border=#002B36
[separator2]
full_text=<span background="#002b36" foreground="#349F85"></span>
markup=pango
border=#002b36
[memory]
label=
separator=true
interval=30
background=#349F85
border=#349F85
color=#002b36
[separator2]
full_text=<span background="#349F85" foreground="#002B36"></span>
markup=pango
border=#349F85
[disk]
label=
#instance=/mnt/data
interval=30
color=#ffffff
background=#002b36
border=#002b36
[separator2]
full_text=<span background="#002b36" foreground="#349F85"></span>
markup=pango
border=#002b36
[iface]
#instance=wlan0
#color=#00FF00
interval=10
separator=false
color=#002b36
background=#349F85
border=#349F85
[separator2]
full_text=<span background="#349F85" foreground="#002B36"></span>
markup=pango
border=#349F85
[wifi]
label=
instance=wlp2s0
interval=10
separator=true
background=#002b36
border=#002b36
[separator2]
full_text=<span background="#002b36" foreground="#349F85"></span>
markup=pango
border=#002b36
[battery]
label=BAT
label=⚡
#instance=1
interval=30
color=#002b36
background=#349F85
border=#349F85
[separator2]
full_text=<span background="#349F85" foreground="#002B36"></span>
markup=pango
border=#349F85
[time]
color=#ffffff
background=#002b36
border=#002b36
command=printf "\\uf017 " && date '+%I:%M'
interval=5
color=#FFFFFF
[separator2]
full_text=<span background="#002b36" foreground="#349F85"></span>
markup=pango
border=#002b36
[date]
command=printf "\\uf073 " && date '+%A %e de %B'
interval=60
color=#002b36
background=#349F85
border=#349F85
[brig]
command=/home/angelaguayo/.config/i3/brig
interval=10
|
x
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | # Solarized dark color scheme
[colors]
foreground = #839496
foreground_bold = #eee8d5
#foreground_dim = #888888
background = #002b36
cursor = #93a1a1
# if unset, will reverse foreground and background
#highlight = #839496
# colors from color0 to color254 can be set
color0 = #073642
color1 = #dc322f
color2 = #859900
color3 = #b58900
color4 = #268bd2
color5 = #d33682
color6 = #2aa198
color7 = #eee8d5
color8 = #002b36
color9 = #cb4b16
color10 = #586e75
color11 = #657b83
color12 = #839496
color13 = #6c71c4
color14 = #93a1a1
color15 = #fdf6e3
|
x
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 | #!/usr/bin/env perl
# Copyright (C) 2014 Tony Crisci <tony@dubstepdish.com>
# Copyright (C) 2015 Thiago Perrotta <perrotta dot thiago at poli dot ufrj dot br>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Requires playerctl binary to be in your path (except cmus)
# See: https://github.com/acrisci/playerctl
# Set instance=NAME in the i3blocks configuration to specify a music player
# (playerctl will attempt to connect to org.mpris.MediaPlayer2.[NAME] on your
# DBus session).
use Time::HiRes qw(usleep);
use Env qw(BLOCK_INSTANCE);
use constant DELAY => 50; # Delay in ms to let network-based players (spotify) reflect new data.
use constant SPOTIFY_STR => 'spotify';
my @metadata = ();
my $player_arg = "";
if ($BLOCK_INSTANCE) {
$player_arg = "--player='$BLOCK_INSTANCE'";
}
sub buttons {
my $method = shift;
if($method eq 'mpd') {
if ($ENV{'BLOCK_BUTTON'} == 1) {
system("mpc prev");
} elsif ($ENV{'BLOCK_BUTTON'} == 2) {
system("mpc toggle");
} elsif ($ENV{'BLOCK_BUTTON'} == 3) {
system("mpc next");
} elsif ($ENV{'BLOCK_BUTTON'} == 4) {
system("mpc volume +10");
} elsif ($ENV{'BLOCK_BUTTON'} == 5) {
system("mpc volume -10");
}
} elsif ($method eq 'cmus') {
if ($ENV{'BLOCK_BUTTON'} == 1) {
system("cmus-remote --prev");
} elsif ($ENV{'BLOCK_BUTTON'} == 2) {
system("cmus-remote --pause");
} elsif ($ENV{'BLOCK_BUTTON'} == 3) {
system("cmus-remote --next");
}
} elsif ($method eq 'playerctl') {
if ($ENV{'BLOCK_BUTTON'} == 1) {
system("playerctl $player_arg previous");
usleep(DELAY * 1000) if $BLOCK_INSTANCE eq SPOTIFY_STR;
} elsif ($ENV{'BLOCK_BUTTON'} == 2) {
system("playerctl $player_arg play-pause");
} elsif ($ENV{'BLOCK_BUTTON'} == 3) {
system("playerctl $player_arg next");
usleep(DELAY * 1000) if $BLOCK_INSTANCE eq SPOTIFY_STR;
} elsif ($ENV{'BLOCK_BUTTON'} == 4) {
system("playerctl $player_arg volume 0.01+");
} elsif ($ENV{'BLOCK_BUTTON'} == 5) {
system("playerctl $player_arg volume 0.01-");
}
} elsif ($method eq 'rhythmbox') {
if ($ENV{'BLOCK_BUTTON'} == 1) {
system("rhythmbox-client --previous");
} elsif ($ENV{'BLOCK_BUTTON'} == 2) {
system("rhythmbox-client --play-pause");
} elsif ($ENV{'BLOCK_BUTTON'} == 3) {
system("rhythmbox-client --next");
}
}
}
sub cmus {
my @cmus = split /^/, qx(cmus-remote -Q);
if ($? == 0) {
foreach my $line (@cmus) {
my @data = split /\s/, $line;
if (shift @data eq 'tag') {
my $key = shift @data;
my $value = join ' ', @data;
@metadata[0] = $value if $key eq 'artist';
@metadata[1] = $value if $key eq 'title';
}
}
if (@metadata) {
buttons('cmus');
# metadata found so we are done
print(join ' - ', @metadata);
exit 0;
}
}
}
sub mpd {
my $data = qx(mpc current);
if (not $data eq '') {
buttons("mpd");
print($data);
exit 0;
}
}
sub playerctl {
buttons('playerctl');
my $artist = qx(playerctl $player_arg metadata artist);
# exit status will be nonzero when playerctl cannot find your player
exit(0) if $? || $artist eq '(null)';
push(@metadata, $artist) if $artist;
my $title = qx(playerctl $player_arg metadata title);
exit(0) if $? || $title eq '(null)';
push(@metadata, $title) if $title;
print(join(" - ", @metadata)) if @metadata;
}
sub rhythmbox {
buttons('rhythmbox');
my $data = qx(rhythmbox-client --print-playing --no-start);
print($data);
}
if ($player_arg eq '' or $player_arg =~ /mpd/) {
mpd;
}
elsif ($player_arg =~ /cmus/) {
cmus;
}
elsif ($player_arg =~ /rhythmbox/) {
rhythmbox;
}
else {
playerctl;
}
|
x
Notes
requires
i3blocks-gaps
i3gaps-next-git
feh
compton
termite
playerctl
acpi