Compare commits

...

3 commits

Author SHA1 Message Date
Simon Vieille 62966c2fce
configure bar 2019-01-28 11:13:11 +01:00
Simon Vieille 542fa6e379
refactoring config 2019-01-28 11:13:02 +01:00
Simon Vieille 0ef0093106
New bar 2019-01-21 16:20:04 +01:00
16 changed files with 481 additions and 370 deletions

View file

@ -1,113 +1,126 @@
[bandwidth_eth0] [bandwidth_eth0]
command=/home/simon/.i3/bar/src/bandwidth.php eth0 command=/home/simon/.i3/bar/src/bandwidth.php eth0
format=json format=json
markup=pango
interval=5 interval=5
[bandwidth_eth1] [bandwidth_eth1]
command=/home/simon/.i3/bar/src/bandwidth.php eth1 command=/home/simon/.i3/bar/src/bandwidth.php eth1
format=json format=json
markup=pango
interval=5 interval=5
[bandwidth_wlan0] [bandwidth_wlan0]
command=/home/simon/.i3/bar/src/bandwidth.php wlan0 command=/home/simon/.i3/bar/src/bandwidth.php wlan0
format=json format=json
markup=pango
interval=1 interval=1
[inet_eth0] [inet_eth0]
command=/home/simon/.i3/bar/src/ip.php eth0 command=/home/simon/.i3/bar/src/ip.php eth0
format=json format=json
markup=pango
interval=10 interval=10
[ip_eth0_inet] [ip_eth0_inet]
command=/home/simon/.i3/bar/src/ip.php eth0 command=/home/simon/.i3/bar/src/ip.php eth0
format=json format=json
markup=pango
interval=10 interval=10
[ip_eth1_inet] [ip_eth1_inet]
command=/home/simon/.i3/bar/src/ip.php eth1 command=/home/simon/.i3/bar/src/ip.php eth1
format=json format=json
markup=pango
interval=10 interval=10
[ip_wlan0_inet] [ip_wlan0_inet]
command=/home/simon/.i3/bar/src/ip.php wlan0 command=/home/simon/.i3/bar/src/ip.php wlan0
format=json format=json
markup=pango
interval=10 interval=10
[ip_easytether0_inet] [ip_easytether0_inet]
command=/home/simon/.i3/bar/src/ip.php easytether0 command=/home/simon/.i3/bar/src/ip.php easytether0
format=json format=json
markup=pango
interval=100 interval=100
[ip_wan] [ip_wan]
command=/home/simon/.i3/bar/src/ip_wan.php command=/home/simon/.i3/bar/src/ip_wan.php
format=json format=json
markup=pango
interval=100 interval=100
[mount_point_space_root] [mount_point_space_root]
command=/home/simon/.i3/bar/src/mount_point_space.php root / command=/home/simon/.i3/bar/src/mount_point_space.php root /
format=json format=json
markup=pango
interval=5 interval=5
[mount_point_space_home] [mount_point_space_home]
command=/home/simon/.i3/bar/src/mount_point_space.php home /home 90 95 command=/home/simon/.i3/bar/src/mount_point_space.php home /home 90 95
format=json format=json
markup=pango
interval=5 interval=5
[memory]
command=memory
[spotify] [spotify]
command=/home/simon/.i3/bar/src/spotify.php command=/home/simon/.i3/bar/src/spotify.php
format=json format=json
markup=pango
interval=3
[spotify_ctrl]
command=/home/simon/.i3/bar/src/spotify_ctrl.php
format=json
markup=pango
interval=1 interval=1
[app_S]
command=/home/simon/.i3/bar/src/app.php S "i3-msg workspace '6. MEDIA'" '#1db954' 0
format=json
interval=1000
[app_Y]
command=/home/simon/.i3/bar/src/app.php Y "xdg-open https://www.youtube.com/feed/subscriptions" '#f00' 0
format=json
interval=1000
[app_F]
command=/home/simon/.i3/bar/src/app.php F "xdg-open https://www.facebook.com/" '#598df3' 0
format=json
interval=1000
[app_C]
command=/home/simon/.i3/bar/src/app.php C "xdg-open https://choualbox.com/new" '#eeb819' 0
format=json
interval=1000
[app_R]
command=/home/simon/.i3/bar/src/app.php R "xdg-open https://redmine.like-inn-developpement.com/client" '#ff4e51'
format=json
interval=1000
[volume] [volume]
command=/home/simon/.i3/bar/src/volume.php command=/home/simon/.i3/bar/src/volume.php
format=json format=json
markup=pango
interval=1 interval=1
[screensaver]
command=/home/simon/.i3/bar/src/screensaver.php
format=json
markup=pango
interval=3
[app_C]
command=/home/simon/.i3/bar/src/app.php C "xdg-open https://cloud.deblan.org/nc/" '#5d5d7d' '#fff'
format=json
markup=pango
interval=1000
[app_Y]
command=/home/simon/.i3/bar/src/app.php Y "xdg-open https://www.youtube.com/feed/subscriptions" '#c74a42' '#fff'
format=json
markup=pango
interval=1000
[time] [time]
command=/home/simon/.i3/bar/src/time.php command=/home/simon/.i3/bar/src/time.php "H:i:s d/m/Y"
format=json format=json
markup=pango
interval=1 interval=1
[date] #[date]
command=/home/simon/.i3/bar/src/date.php #command=/home/simon/.i3/bar/src/date.php
format=json #format=json
interval=30 #markup=pango
#interval=30
[rss] [rss]
command=/home/simon/.i3/bar/src/rss.php "https://tiny.deblan.org/public.php?op=rss&id=-3&key=17c659af1ad27f30941a724fcf48421d1e83081a" "RSS" command=/home/simon/.i3/bar/src/rss.php "https://tiny.deblan.org/public.php?op=rss&id=-3&key=17c659af1ad27f30941a724fcf48421d1e83081a" "https://tiny.deblan.org/"
align=left align=left
interval=30 interval=30
format=json format=json
markup=pango
[acpi] [acpi]
command=/home/simon/.i3/bar/src/acpi.php command=/home/simon/.i3/bar/src/acpi.php
format=json format=json
markup=pango
interval=20 interval=20

View file

@ -16,28 +16,37 @@ if (!preg_match('`Discharging`', $acpi)) {
} }
if ($charging < 20) { if ($charging < 20) {
$color = color('critical'); $foreground = '#333';
$background = color('critical');
} elseif ($charging < 50) { } elseif ($charging < 50) {
$color = color('warning'); $foreground = color('info');
$background = color('warning');
} else { } else {
$color = color('normal'); $foreground = '#333';
$background = color('normal');
} }
$charging .= '↑'; $charging .= '% '.emoji(0xf0aa);
$text = span(' '.$charging.' ', $foreground, $background);
$block = block( $block = block(
'acpi', 'acpi',
[ [
'full_text' => $charging, 'full_text' => $text,
'color' => $color, 'color' => $color,
'separator' => false,
'separator_block_width' => 0,
] ]
); );
} else { } else {
$block = block( $block = block(
'acpi', 'acpi',
[ [
'full_text' => '??? ', 'full_text' => '??? '.emoji(0xf0aa),
'color' => color('info'), 'color' => color('info'),
'separator' => false,
'separator_block_width' => 0,
] ]
); );
} }
@ -45,22 +54,27 @@ if (!preg_match('`Discharging`', $acpi)) {
preg_match('`([0-9]+%), ([0-9]+:[0-9]+)`', $acpi, $values); preg_match('`([0-9]+%), ([0-9]+:[0-9]+)`', $acpi, $values);
if ($values[0] < 20) { if ($values[0] < 20) {
$color = color('critical'); $foreground = '#333';
$background = color('critical');
} elseif ($values[0] < 50) { } elseif ($values[0] < 50) {
$color = color('warning'); $foreground = color('info');
$background = color('warning');
} else { } else {
$color = color('info'); $foreground = '#333';
$background = color('normal');
} }
$charging = $values[1].'↓'; $charging = $values[1];
$times = str_replace(':', 'h', $values[2]); $times = str_replace(':', 'h', $values[2]);
$text = implode(' ', [$charging, $times]); $text = span(' '.implode(' ', [$charging, $times, emoji(0xf0ab)]).' ', $foreground, $background);
$block = block( $block = block(
'acpi', 'acpi',
[ [
'full_text' => $text, 'full_text' => $text,
'color' => $color, 'color' => $color,
'separator' => false,
'separator_block_width' => 0,
] ]
); );
} }

View file

@ -5,15 +5,13 @@ require __DIR__.'/base/block.php';
$name = $argv[1] ?? null; $name = $argv[1] ?? null;
$app = $argv[2] ?? null; $app = $argv[2] ?? null;
$color = $argv[3] ?? color('normal'); $background = $argv[3] ?? '#333';
$separator = (bool) ($argv[4] ?? true); $foreground = $argv[4] ?? '#fff';
if (empty($name) && empty($app)) { if (empty($name) && empty($app)) {
die; die;
} }
$fullText = sprintf('[%s]', $name);
if (getenv('BLOCK_BUTTON') === '1') { if (getenv('BLOCK_BUTTON') === '1') {
pclose(popen($app, 'r')); pclose(popen($app, 'r'));
} }
@ -21,10 +19,6 @@ if (getenv('BLOCK_BUTTON') === '1') {
echo block( echo block(
'app_'.$name, 'app_'.$name,
[ [
'full_text' => $fullText, 'full_text' => pspan($name, $foreground, $background),
'short_text' => $shortText,
'color' => $color,
'separator' => $separator,
'separator_block_width' => $separator ? 20 : 0,
] ]
); );

View file

@ -1,4 +1,4 @@
#!/usr/bin/php #!/usr/bin/php7.1
<?php <?php
require __DIR__.'/base/block.php'; require __DIR__.'/base/block.php';
@ -18,19 +18,20 @@ if (empty($ip)) {
die; die;
} }
$bwidth = explode(' ', preg_replace('/ +/', ' ', trim(shell_exec('ifstat -i '.escapeshellcmd($iface).' 1 1 | tail -n 1')))); $bwidth = explode(' ', preg_replace('/ +/', ' ', trim(shell_exec('ifstat -i '.escapeshellcmd($iface).' 0.1 1 | tail -n 1'))));
if (empty($bwidth)) { if (empty($bwidth)) {
die; die;
} }
$fullText = '['.$iface.'] '.$bwidth[0].'Ko/s↓ '.$bwidth[1].'Ko/s↑'; $up = $bwidth[1].'Ko/s'.pemoji(0xf0aa);
$down = pemoji(0xf0ab).$bwidth[0].'Ko/s ';
$fullText = pspan($iface, '#ccc', '#222').pspan($down.$up, '#ddd', '#000');
echo block( echo block(
'bandwidth_'.$iface, 'bandwidth_'.$iface,
[ [
'full_text' => $fullText, 'full_text' => $fullText,
'color' => '#ffffff',
'urgent' => 1,
] ]
); );

View file

@ -10,7 +10,7 @@
function color($label) function color($label)
{ {
$colors = [ $colors = [
'music' => '#C3D4FF', 'music' => '#cccccc',
'date' => '#E9F1FF', 'date' => '#E9F1FF',
'info' => '#E9F1FF', 'info' => '#E9F1FF',
'critical' => '#FF474A', 'critical' => '#FF474A',
@ -21,11 +21,64 @@ function color($label)
return $colors[$label] ?? $colors['info']; return $colors[$label] ?? $colors['info'];
} }
/**
* Create emoji with padding.
*
* @param mixed $char
*/
function pemoji($char)
{
return '<span font=\'FontAwesome\'> '.IntlChar::chr($char).' </span>';
}
/**
* Create emoji.
*
* @param mixed $char
*/
function emoji($char)
{
return '<span font=\'FontAwesome\'>'.IntlChar::chr($char).'</span>';
}
/**
* Creates span with padding.
*
* @param string $text
* @param string $foreground
* @param string $background
*
* @return string
*/
function pspan($text, $foreground = null, $background = null)
{
return span(sprintf(' %s ', $text), $foreground, $background);
}
/**
* Creates span.
*
* @param string $text
* @param string $foreground
* @param string $background
*
* @return string
*/
function span($text, $foreground = null, $background = null)
{
return sprintf(
'<span background=\'%s\' foreground=\'%s\'>%s</span>',
$background ?? '#333333',
$foreground ?? color('normal'),
$text
);
}
/** /**
* Returns a json of a block. * Returns a json of a block.
* *
* @param string $name * @param string $name
* @param array $options * @param array $options
* *
* @return string * @return string
*/ */
@ -37,8 +90,8 @@ function block(string $name, array $options = [])
'align' => 'left', 'align' => 'left',
'name' => $name, 'name' => $name,
'urgent' => false, 'urgent' => false,
'separator' => true, 'separator' => false,
'separator_block_width' => 20, 'separator_block_width' => 0,
], ],
$options $options
); );

View file

@ -1,11 +1,11 @@
#!/usr/bin/php #!/usr/bin/php7.1
<?php <?php
require __DIR__.'/base/block.php'; require __DIR__.'/base/block.php';
$format = $argv[1] ?? 'd/m/Y'; $format = $argv[1] ?? 'd/m/Y';
$fullText = date($format); $fullText = span(' '.emoji(0xf073).' '.date($format).' ', color('date'), '#444');
if (getenv('BLOCK_BUTTON') === '1') { if (getenv('BLOCK_BUTTON') === '1') {
shell_exec('i3-msg \'workspace "3. MAIL"\''); shell_exec('i3-msg \'workspace "3. MAIL"\'');
@ -15,6 +15,7 @@ echo block(
'date', 'date',
[ [
'full_text' => $fullText, 'full_text' => $fullText,
'color' => color('date'), 'separator' => false,
'separator_block_width' => 0,
] ]
); );

View file

@ -1,4 +1,4 @@
#!/usr/bin/php #!/usr/bin/php7.1
<?php <?php
require __DIR__.'/base/block.php'; require __DIR__.'/base/block.php';
@ -18,18 +18,18 @@ if (empty($ip)) {
die; die;
} }
$fullText = sprintf('[%s] %s', $iface, $ip); $fullText = pspan($iface, '#ccc', '#222').pspan($ip, '#ddd', '#000');
$shortText = sprintf('%s: %s', $iface, $ip);
if (getenv('BLOCK_BUTTON') === '1') { if (getenv('BLOCK_BUTTON') === '1') {
shell_exec('export DISPLAY=:0; echo '.escapeshellarg($ip).' | xclip'); shell_exec('export DISPLAY=:0; echo '.escapeshellarg($ip).' | xclip');
shell_exec('export DISPLAY=:0; echo '.escapeshellarg($ip).' | xclip --selection c'); shell_exec('export DISPLAY=:0; echo '.escapeshellarg($ip).' | xclip --selection clip');
} }
echo block( echo block(
'ip_'.$iface.'_'.trim($inet), 'ip_'.$iface.'_'.trim($inet),
[ [
'full_text' => $fullText, 'full_text' => $fullText,
'short_text' => $shortText, 'separator' => false,
'separator_block_width' => 0,
] ]
); );

View file

@ -7,7 +7,7 @@ $ipv6 = !empty($argv[1]);
$iface = 'wan'; $iface = 'wan';
$command = sprintf( $command = sprintf(
'wget -O - -q %s "https://api.ipify.org/?format=text" | head -n 1 | cut -c1-50', 'dig +short myip.opendns.com @resolver1.opendns.com',
$ipv6 ? '-6' : null $ipv6 ? '-6' : null
); );
@ -19,16 +19,16 @@ if (empty($ip)) {
if (getenv('BLOCK_BUTTON') === '1') { if (getenv('BLOCK_BUTTON') === '1') {
shell_exec('export DISPLAY=:0; echo '.escapeshellarg($ip).' | xclip'); shell_exec('export DISPLAY=:0; echo '.escapeshellarg($ip).' | xclip');
shell_exec('export DISPLAY=:0; echo '.escapeshellarg($ip).' | xclip -sel c'); shell_exec('export DISPLAY=:0; echo '.escapeshellarg($ip).' | xclip -sel clip');
} }
$fullText = sprintf('[%s] %s', $iface, $ip); $fullText = pspan($iface, '#ccc', '#222').pspan($ip, '#ddd', '#000');
$shortText = sprintf('%s: %s', $iface, $ip);
echo block( echo block(
'ip_wan', 'ip_wan',
[ [
'full_text' => $fullText, 'full_text' => $fullText,
'short_text' => $shortText, 'separator' => false,
'separator_block_width' => 0,
] ]
); );

View file

@ -31,19 +31,19 @@ if ($percent < $range1) {
$color = color('critical'); $color = color('critical');
} }
$fullText = sprintf('[%s] %s%%', $mountPoint, $percent);
$shortText = sprintf('%s: %s%%', $mountPoint, $percent);
if (getenv('BLOCK_BUTTON') === '1') { if (getenv('BLOCK_BUTTON') === '1') {
$command = 'export DISPLAY=:0; pcmanfm '.escapeshellarg('file://'.$mountPoint).'&'; $command = 'export DISPLAY=:0; pcmanfm '.escapeshellarg('file://'.$mountPoint).'&';
pclose(popen($command, 'r')); pclose(popen($command, 'r'));
} }
$fullText = pspan($mountPoint, '#ccc', '#222').pspan($percent.'%', $color, '#000');
echo block( echo block(
'mount_point_space_'.$name, 'mount_point_space_'.$name,
[ [
'full_text' => $fullText, 'full_text' => $fullText,
'short_text' => $shortText,
'color' => $color, 'color' => $color,
'separator' => false,
'separator_block_width' => 0,
] ]
); );

View file

@ -1,12 +1,12 @@
#!/usr/bin/php #!/usr/bin/php7.1
<?php <?php
require __DIR__.'/base/block.php'; require __DIR__.'/base/block.php';
$rss = $argv[1] ?? null; $rss = $argv[1] ?? null;
$title = $argv[2] ?? null; $client = $argv[2] ?? null;
if (empty($rss) || empty($title)) { if (empty($rss)) {
die; die;
} }
@ -18,18 +18,22 @@ if (empty($content)) {
preg_match_all('/<entry/isU', $content, $matches, PREG_SET_ORDER); preg_match_all('/<entry/isU', $content, $matches, PREG_SET_ORDER);
$fullText = sprintf('[%s] %s', $title, $count = count($matches)); $title = pemoji(0xf09e);
$count = count($matches);
$blockButton = (int) getenv('BLOCK_BUTTON'); if ($count > 0) {
$title .= ' +'.$count;
}
if ($blockButton === 1) { $fullText = span($title, $count ? color('normal') : color('info'), '#333');
shell_exec('xdg-open "https://tiny.deblan.org/index.php"');
if ($client && (int) getenv('BLOCK_BUTTON') === 1) {
shell_exec(sprintf('xdg-open %s', escapeshellarg($client)));
} }
echo block( echo block(
'rss', 'rss',
[ [
'full_text' => $fullText, 'full_text' => $fullText,
'color' => $count ? color('normal') : color('info'),
] ]
); );

37
bar/src/screensaver.php Executable file
View file

@ -0,0 +1,37 @@
#!/usr/bin/php7.1
<?php
require __DIR__.'/base/block.php';
$command = 'ps aux | grep no-screensaver | grep -v grep';
$output = trim(shell_exec($command));
if (empty($output)) {
echo block(
'screensaver',
[
'full_text' => pspan(emoji(0xf108), color('normal'), '#000'),
'color' => color('normal'),
]
);
if (getenv('BLOCK_BUTTON') === '1') {
$command = '/home/simon/bin/no-screensaver >/dev/null 2>/dev/null &';
pclose(popen($command, 'r'));
}
} else {
echo block(
'screensaver',
[
'full_text' => pspan(emoji(0xf108), color('warning'), '#000'),
'color' => color('warning'),
]
);
if (getenv('BLOCK_BUTTON') === '1') {
$command = 'pkill no-screensaver';
shell_exec($command);
}
}

View file

@ -23,8 +23,7 @@ function cleanUp($d, $max = 20)
$title = cleanUp(shell_exec('playerctl -p spotify metadata xesam:title')); $title = cleanUp(shell_exec('playerctl -p spotify metadata xesam:title'));
$artist = cleanUp(shell_exec('playerctl -p spotify metadata xesam:artist')); $artist = cleanUp(shell_exec('playerctl -p spotify metadata xesam:artist'));
$label = sprintf('%s %s', $title, $artist); $fullText = pspan($artist, '#ccc', '#222').pspan($title, '#ddd', '#000');
$fullText = sprintf('%s %s', $title, $artist);
if (getenv('BLOCK_BUTTON') === '1') { if (getenv('BLOCK_BUTTON') === '1') {
shell_exec('i3-msg \'workspace "6. MEDIA"\''); shell_exec('i3-msg \'workspace "6. MEDIA"\'');
@ -35,5 +34,7 @@ echo block(
[ [
'full_text' => $fullText, 'full_text' => $fullText,
'color' => color('music'), 'color' => color('music'),
'separator' => false,
'separator_block_width' => 0,
] ]
); );

28
bar/src/spotify_ctrl.php Executable file
View file

@ -0,0 +1,28 @@
#!/usr/bin/php
<?php
require __DIR__.'/base/block.php';
$status = trim(shell_exec('playerctl -p spotify status'));
if ($status === 'Playing') {
$fullText = pemoji(0xf04c);
} elseif ($status === 'Paused') {
$fullText = pemoji(0xf04b);
}
if (empty($fullText)) {
die(0);
}
if (getenv('BLOCK_BUTTON') === '1') {
shell_exec('dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause');
}
echo block(
'spotify_ctrl',
[
'full_text' => span($fullText, '#ccc', '#000'),
'color' => color('music'),
]
);

View file

@ -1,4 +1,4 @@
#!/usr/bin/php #!/usr/bin/php7.1
<?php <?php
require __DIR__.'/base/block.php'; require __DIR__.'/base/block.php';
@ -15,10 +15,13 @@ if (date('H:i:s') === '13:37:00') {
shell_exec('notify-send "1337" "Powaaaa" --icon=/home/simon/Images/if_geek_zombie_60815.png'); shell_exec('notify-send "1337" "Powaaaa" --icon=/home/simon/Images/if_geek_zombie_60815.png');
} }
$fullText = span(pemoji(0xf073).$fullText, color('date'), '#444');
echo block( echo block(
'time', 'time',
[ [
'full_text' => $fullText, 'full_text' => $fullText,
'color' => color('date'), 'separator' => false,
'separator_block_width' => 0,
] ]
); );

View file

@ -1,4 +1,4 @@
#!/usr/bin/php #!/usr/bin/php7.1
<?php <?php
require __DIR__.'/base/block.php'; require __DIR__.'/base/block.php';
@ -9,11 +9,25 @@ if ($volume) {
preg_match('/\[([0-9%]+)\]/', $volume, $mach); preg_match('/\[([0-9%]+)\]/', $volume, $mach);
if (isset($mach[1])) { if (isset($mach[1])) {
$v = (int) str_replace('%', '', $mach[1]);
$fullText = ' '.$mach[1].' ';
if ($v === 0) {
$fullText.= emoji(0xf026);
} elseif ($v < 50) {
$fullText.= emoji(0xf027);
} else {
$fullText.= emoji(0xf028);
}
echo block( echo block(
'volume', 'volume',
[ [
'full_text' => $mach[1].' ♪', 'full_text' => $fullText,
'color' => color('music'), 'color' => color('music'),
'markup' => 'pango',
'separator' => false,
'separator_block_width' => 0,
] ]
); );
} }

500
config
View file

@ -1,215 +1,199 @@
# @see: $ xmodmap # @see: $ xmodmap
set $mod Mod4 set $window Mod4
set $altleft Mod1
set $shift Shift
set $space space
set $enter Return
set $escape Escape
set $ctrl control
set $backspace BackSpace
set $left Left
set $up Up
set $right Right
set $down Down
#font for window titles. ISO 10646 = Unicode set $wp1 "1. IRC"
#font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1 set $wp2 "2. WWW"
#font pango:Droid Sans Mono 9 set $wp3 "3. MAIL"
#font xft:Inconsolata:style=Regular: set $wp4 "4"
set $wp5 "5"
set $wp6 "6. MEDIA"
set $wp7 "7. WORK"
set $wp8 "8"
set $wp9 "9"
set $wp10 "10"
set $wp11 "11"
set $wp12 "12"
font pango:Bitstream Vera Sans Mono, 9 # class border backgr. text indicator
client.focused #9B2A5D #000000 #ffffff #2e9ef4
# Use Mouse+$mod to drag floating windows to their wanted position client.focused_inactive #333333 #5f676a #ffffff #484e50
floating_modifier $mod client.unfocused #333333 #222222 #888888 #292d2e
client.urgent #2f343a #87af15 #ffffff #900000
# start a terminal
# bindsym $mod+Return exec i3-sensible-terminal
bindsym $mod+Return exec ~/bin/urxvt
# kill focused window
bindsym $mod+Shift+A kill
# start dmenu (a program launcher)
bindsym $mod+d exec dmenu_run -nb '#333333' -nf '#ffffff' -sb '#982323' -p "$" -fn 'Bitstream Vera Sans Mono-9'
bindsym $mod+shift+d exec ~/bin/i3_winmenu
# change focus
bindsym $mod+j focus left
bindsym $mod+k focus down
#bindsym $mod+l focus up
bindsym $mod+m 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+M 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
# kill focused window
bindsym $mod+Shift+q kill
# split in vertical orientation
bindsym $mod+v split v
# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen
# change container layout (stacked, tabbed, default)
bindsym $mod+s layout stacking
bindsym $mod+z layout tabbed
bindsym $mod+e layout default
# 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+q focus parent
# focus the child container
#bindcode $mod+d focus child
# bindsym $mod+x move workspace to output right
bindsym $mod+b workspace back_and_forth
# Go to a workspace
bindsym $mod+F1 workspace "1. IRC"
bindsym $mod+F2 workspace "2. WWW"
bindsym $mod+F3 workspace "3. MAIL"
bindsym $mod+F4 workspace "4"
bindsym $mod+F5 workspace "5"
bindsym $mod+F6 workspace "6. MEDIA"
bindsym $mod+F7 workspace "7: WORK"
bindsym $mod+F8 workspace "8: VM"
bindsym $mod+F9 workspace "9"
bindsym $mod+F10 workspace "10"
bindsym $mod+F11 workspace "11"
bindsym $mod+F12 workspace "12"
# move focused container to workspace
bindsym $mod+Shift+F1 move container to workspace "1. IRC"
bindsym $mod+Shift+F2 move container to workspace "2. WWW"
bindsym $mod+Shift+F3 move container to workspace "3. MAIL"
bindsym $mod+Shift+F4 move container to workspace "4"
bindsym $mod+Shift+F5 move container to workspace "5"
bindsym $mod+Shift+F6 move container to workspace "6. MEDIA"
bindsym $mod+Shift+F7 move container to workspace "7: WORK"
bindsym $mod+Shift+F8 move container to workspace "8: VM"
bindsym $mod+Shift+F9 move container to workspace "9"
bindsym $mod+Shift+F10 move container to workspace "10"
bindsym $mod+Shift+F11 move container to workspace "11"
bindsym $mod+Shift+F12 move container to workspace "12"
workspace_auto_back_and_forth yes workspace_auto_back_and_forth yes
# reload the configuration file # @see fc-list, fc-cache -f -v
bindsym $mod+Shift+C reload font pango:Bitstream Vera Sans Mono, 9
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3) #font pango:System San Francisco Display 8
bindsym $mod+Shift+R restart #
# exit i3 (logs you out of your X session) # Use Mouse+$window to drag floating windows to their wanted position
bindsym $mod+Shift+E exit floating_modifier $window
# start a terminal
# bindsym $window+$enter exec i3-sensible-terminal
bindsym $window+$enter exec ~/bin/urxvt
# kill focused window
bindsym $window+$shift+A kill
# start dmenu (a program launcher)
bindsym $window+d exec dmenu_run -nb '#333333' -nf '#ffffff' -sb '#982323' -p "$" -fn 'Bitstream Vera Sans Mono-9'
bindsym $window+$shift+d exec xfce4-appfinder
# change focus
bindsym $window+j focus left
bindsym $window+k focus down
#bindsym $window+l focus u
bindsym $window+m focus right
# alternatively, you can use the cursor keys:
bindsym $window+$left focus left
bindsym $window+$down focus down
bindsym $window+$up focus up
bindsym $window+$right focus right
# move focused window
bindsym $window+$shift+J move left
bindsym $window+$shift+K move down
bindsym $window+$shift+L move up
bindsym $window+$shift+M move right
# alternatively, you can use the cursor keys:
bindsym $window+$shift+$left move left
bindsym $window+$shift+$down move down
bindsym $window+$shift+$up move up
bindsym $window+$shift+$right move right
bindsym $window+h split h
bindsym $window+v split v
bindsym $window+$shift+q kill
bindsym $window+f fullscreen
# change container layout (stacked, tabbed, default)
bindsym $window+s layout stacking
bindsym $window+z layout tabbed
bindsym $window+e layout default
# toggle tiling / floating
bindsym $window+$shift+$space floating toggle
bindsym $window+$space focus mode_toggle
# focus the parent container
bindsym $window+q focus parent
bindsym $window+b workspace back_and_forth
# Go to a workspace
bindsym $window+F1 workspace $wp1
bindsym $window+F2 workspace $wp2
bindsym $window+F3 workspace $wp3
bindsym $window+F4 workspace $wp4
bindsym $window+F5 workspace $wp5
bindsym $window+F6 workspace $wp6
bindsym $window+F7 workspace $wp7
bindsym $window+F8 workspace $wp8
bindsym $window+F9 workspace $wp9
bindsym $window+F10 workspace $wp10
bindsym $window+F11 workspace $wp11
bindsym $window+F12 workspace $wp12
bindsym $window+$shift+F1 move container to workspace $wp1
bindsym $window+$shift+F2 move container to workspace $wp2
bindsym $window+$shift+F3 move container to workspace $wp3
bindsym $window+$shift+F4 move container to workspace $wp4
bindsym $window+$shift+F5 move container to workspace $wp5
bindsym $window+$shift+F6 move container to workspace $wp6
bindsym $window+$shift+F7 move container to workspace $wp7
bindsym $window+$shift+F8 move container to workspace $wp8
bindsym $window+$shift+F9 move container to workspace $wp9
bindsym $window+$shift+F10 move container to workspace $wp10
bindsym $window+$shift+F11 move container to workspace $wp11
bindsym $window+$shift+F12 move container to workspace $wp12
bindsym $window+$shift+C reload
bindsym $window+$shift+R restart
bindsym $window+$shift+E exit
bindsym $window+r mode "resize"
# resize window (you can also use the mouse for that)
mode "resize" { mode "resize" {
# These bindings trigger as soon as you enter the resize mode
# Pressing left will shrink the windows width.
# Pressing right will grow the windows width.
# Pressing up will shrink the windows height.
# Pressing down will grow the windows height.
bindsym h resize shrink width 5 px or 5 ppt bindsym h resize shrink width 5 px or 5 ppt
bindsym j resize grow height 5 px or 5 ppt bindsym j resize grow height 5 px or 5 ppt
bindsym u resize shrink height 5 px or 5 ppt bindsym u resize shrink height 5 px or 5 ppt
bindsym k resize grow width 5 px or 5 ppt bindsym k resize grow width 5 px or 5 ppt
# same bindings, but for the arrow keys # same bindings, but for the arrow keys
bindsym 113 resize shrink width 10 px or 10 ppt bindsym $right resize shrink width 5 px or 5 ppt
bindsym 116 resize grow height 10 px or 10 ppt bindsym $up resize grow height 5 px or 5 ppt
bindsym 111 resize shrink height 10 px or 10 ppt bindsym $down resize shrink height 5 px or 5 ppt
bindsym 114 resize grow width 10 px or 10 ppt bindsym $left resize grow width 5 px or 5 ppt
# back to normal: Enter or Escape bindsym $enter mode "default"
bindsym Return mode "default" bindsym $escape mode "default"
bindsym Escape mode "default"
} }
bindsym $mod+r mode "resize" bindsym Print exec ~/bin/screenshot
bindsym $altleft+F10 exec ~/bin/screenshot_zone
# Start i3bar to display a workspace bar (plus the system information i3status bindsym $window+Print exec ~/bin/upload_wall
# finds out, if available) bindsym $window+$altleft+l exec ~/bin/lock
bindsym $window+$shift+t exec monitordisplay -t
bar { bindsym $window+$backspace move scratchpad
#status_command ~/.i3/i3status.sh bindsym $window+$shift+$backspace scratchpad show
status_command i3blocks -c ~/.i3/bar/bar1.conf bindsym XF86MonBrightness$up exec xbacklight + 7
position top bindsym XF86MonBrightness$down exec xbacklight - 7
output eDP1 bindsym $shift+$window+h exec xbacklight + 7
output DP1 bindsym $shift+$window+n exec xbacklight - 7
output HDMI1 bindsym $window+$altleft+$shift+n exec mpc next
bindsym $window+$altleft+$shift+h exec mpc prev
colors { bindsym $window+$altleft+$shift+p exec mpc toggle
#background #111111 bindsym $window+$altleft+n exec playerctl -p spotify next
background #000000 bindsym $window+$altleft+h exec playerctl -p spotify previous
statusline #ffffff bindsym $window+$altleft+p exec playerctl -p spotify play-pause
#border bg text bindsym XF86HomePage exec ~/bin/uzbl
focused_workspace #a74068 #bd4875 #ffffff bindsym XF86AudioRaiseVolume exec amixer set Master 2%+
active_workspace #333333 #5f676a #ffffff bindsym XF86AudioLowerVolume exec amixer set Master 2%-
inactive_workspace #111111 #111111 #888888 bindsym $altleft+g exec amixer set Master 2%+
urgent_workspace #5aaad8 #6ac6ff #ffffff bindsym $altleft+b exec amixer set Master 2%-
} bindsym $window+p exec ~/bin/i3_switch_workspace.php previous
} bindsym $window+n exec ~/bin/i3_switch_workspace.php next
bindsym $altleft+F1 exec ~/bin/i3_switch_focus_container.php 1
#bar { bindsym $altleft+F2 exec ~/bin/i3_switch_focus_container.php 2
# status_command ~/.i3/i3status2.sh bindsym $altleft+F3 exec ~/bin/i3_switch_focus_container.php 3
# position top bindsym $altleft+F4 exec ~/bin/i3_switch_focus_container.php 4
# tray_output none bindsym $altleft+F5 exec ~/bin/i3_switch_focus_container.php 5
# bindsym $altleft+F6 exec ~/bin/i3_switch_focus_container.php 6
# colors { bindsym $window+x move workspace to output left
# background #111111 bindsym $window+c exec ~/bin/i3_switch_monitor_wrapper.sh
# statusline #ffffff bindsym $altleft+$shift+h exec ~/bin/i3_move_mouse.sh left
# #border bg text bindsym $altleft+$shift+k exec ~/bin/i3_move_mouse.sh right
# focused_workspace #AC2E67 #9B2A5D #ffffff bindsym $altleft+$shift+u exec ~/bin/i3_move_mouse.sh up
# active_workspace #333333 #5f676a #ffffff bindsym $altleft+$shift+j exec ~/bin/i3_move_mouse.sh down
# inactive_workspace #111111 #111111 #888888 bindsym $window+$shift+y exec ~/bin/i3_mouse_click.sh
# urgent_workspace #2f343a #87af15 #ffffff bindsym $ctrl+$shift+f exec ~/bin/search
# } bindsym $ctrl+$altleft+$shift+e exec sudo shutdown -h now
#} bindsym $ctrl+$altleft+$shift+r exec sudo shutdown -r now
bindsym $ctrl+$window+e exec pcmanfm
bar { bindsym XF86Calculator exec qalculate
status_command ~/.i3/processList.sh bindsym $window+l exec mlclipboard
#status_command i3blocks bindsym $window+$shift+S exec i3-msg "sticky toggle"
workspace_buttons no
position bottom
tray_output none
output eDP1
output HDMI1
output DP1
mode hide
modifier mod1
colors {
#background #111111
background #000000
statusline #ffffff
#border bg text
# focused_workspace #AC2E67 #9B2A5D #ffffff
# active_workspace #333333 #5f676a #ffffff
# inactive_workspace #111111 #111111 #888888
# urgent_workspace #2f343a #87af15 #ffffff
focused_workspace #a74068 #bd4875 #ffffff
active_workspace #333333 #5f676a #ffffff
inactive_workspace #111111 #111111 #888888
urgent_workspace #5aaad8 #6ac6ff #ffffff
}
}
for_window [title="Deluge"] floating enable
for_window [title="VirtualBox"] floating enable
for_window [title="Thème du panel tint2"] floating enable
for_window [title="Gestionnaire de tâches"] floating enable
for_window [title="Liste des applications"] floating enable
for_window [title="crire un SMS"] floating enable
for_window [title="OBS"] floating enable for_window [title="OBS"] floating enable
for_window [title="(En fonction)"] floating enable
for_window [title="SimpleScreenRecorder"] floating enable for_window [title="SimpleScreenRecorder"] floating enable
for_window [title="QuickSynergy"] floating enable for_window [title="QuickSynergy"] floating enable
for_window [title="recordMyDesktop"] floating enable for_window [title="recordMyDesktop"] floating enable
@ -218,7 +202,6 @@ for_window [title="Sozi"] floating enable
for_window [title="Volti"] floating enable for_window [title="Volti"] floating enable
for_window [title="Choqok"] floating enable for_window [title="Choqok"] floating enable
for_window [title="xmessage_upload"] floating enable for_window [title="xmessage_upload"] floating enable
for_window [title="TeamViewer"] floating enable
for_window [title="ouvrir une session"] floating enable for_window [title="ouvrir une session"] floating enable
for_window [title="Wicd"] floating enable for_window [title="Wicd"] floating enable
for_window [title="Qalculate!"] floating enable for_window [title="Qalculate!"] floating enable
@ -228,100 +211,65 @@ for_window [title="Android Emulator"] floating enable
for_window [title="Guake"] floating enable for_window [title="Guake"] floating enable
for_window [title=".*"] border 1pixel for_window [title=".*"] border 1pixel
#exec utox bar {
status_command i3blocks -c ~/.i3/bar/bar1.conf
position top
tray_output primary
output DP1
output HDMI1
output eDP1
colors {
background #000000
statusline #ffffff
#border bg text
focused_workspace #a74068 #bd4875 #ffffff
active_workspace #333333 #5f676a #ffffff
inactive_workspace #111111 #111111 #888888
urgent_workspace #5aaad8 #6ac6ff #ffffff
}
}
bar {
status_command ~/.i3/processList.sh
workspace_buttons no
position bottom
tray_output none
output eDP1
output HDMI1
output DP1
mode hide
modifier $altleft
colors {
background #000000
statusline #ffffff
#border bg text
focused_workspace #a74068 #bd4875 #ffffff
active_workspace #333333 #5f676a #ffffff
inactive_workspace #111111 #111111 #888888
urgent_workspace #5aaad8 #6ac6ff #ffffff
}
}
exec tint2
exec rofi -key-run 'SuperL+Alt+d' -Key-ssh 'SuperL+Alt+s' -key-window 'SuperL+Alt+w' exec rofi -key-run 'SuperL+Alt+d' -Key-ssh 'SuperL+Alt+s' -key-window 'SuperL+Alt+w'
exec feh --bg-fill ~/wallpaper.jpg exec feh --bg-fill ~/wallpaper.jpg
exec setxkbmap fr oss exec setxkbmap fr oss
exec mpd exec mpd
exec owncloud exec nextcloud
exec gpg-agent --daemon exec gpg-agent --daemon
exec wicd-gtk -t exec wicd-gtk -t
exec alsactl init -c 1 exec alsactl init -c 1
exec volumeicon exec volumeicon
exec ~/bin/sshplus.py exec ~/bin/sshplus.py
exec ~/make/dunst/dunst exec systemctl --user start xfce4-notifyd
exec sleep 3 && monitordisplay -s -m laptop exec sleep 3 && monitordisplay -s -m laptop
exec sleep 3 && monitordisplay -s -m hdmi exec sleep 3 && monitordisplay -s -m hdmi
exec ~/bin/reload_wallpaper exec ~/bin/reload_wallpaper
exec redshift-gtk -l 47.51659:6.7809 exec redshift-gtk -l 47.51659:6.7809
exec blueman-applet exec blueman-applet
exec guake exec /home/simon/bin/remote_i3_server
exec flatpak run com.github.bajoja.indicator-kdeconnect/x86_64/stable
#exec pulseaudio --start
# exec synclient MiddleButtonAreaRight=3500
# exec synclient MiddleButtonAreaLeft=2700
# exec synclient MiddleButtonAreaRight=3500
# exec synclient MiddleButtonAreaLeft=2700
# exec xcompmgr -c
exec xbacklight + 100 exec xbacklight + 100
# Softwares bind
bindsym Print exec ~/bin/screenshot
bindsym mod1+F10 exec ~/bin/screenshot_zone
bindsym $mod+Print exec ~/bin/upload_wall
bindsym $mod+mod1+l exec ~/bin/lock
bindsym $mod+Shift+t exec monitordisplay -t
bindsym $mod+BackSpace move scratchpad
bindsym $mod+Shift+BackSpace scratchpad show
bindsym XF86MonBrightnessUp exec xbacklight + 7
bindsym XF86MonBrightnessDown exec xbacklight - 7
bindsym Shift+$mod+h exec xbacklight + 7
bindsym Shift+$mod+n exec xbacklight - 7
bindsym $mod+mod1+shift+n exec mpc next
bindsym $mod+mod1+shift+h exec mpc prev
bindsym $mod+mod1+shift+p exec mpc toggle
bindsym $mod+mod1+n exec dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next
bindsym $mod+mod1+h exec dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous
bindsym $mod+mod1+p exec dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause
bindsym XF86HomePage exec ~/bin/uzbl
bindsym XF86AudioRaiseVolume exec amixer set Master 2%+
bindsym XF86AudioLowerVolume exec amixer set Master 2%-
bindsym mod1+g exec amixer set Master 2%+
bindsym mod1+b exec amixer set Master 2%-
bindsym $mod+p exec ~/bin/i3_switch_workspace.php previous
bindsym $mod+n exec ~/bin/i3_switch_workspace.php next
bindsym mod1+mod1+k exec ~/bin/i3_empty_firefox_search_and_search.sh
bindsym mod1+F1 exec ~/bin/i3_switch_focus_container.php 1
bindsym mod1+F2 exec ~/bin/i3_switch_focus_container.php 2
bindsym mod1+F3 exec ~/bin/i3_switch_focus_container.php 3
bindsym mod1+F4 exec ~/bin/i3_switch_focus_container.php 4
bindsym mod1+F5 exec ~/bin/i3_switch_focus_container.php 5
bindsym mod1+F6 exec ~/bin/i3_switch_focus_container.php 6
bindsym $mod+x move workspace to output left
bindsym $mod+c exec ~/bin/i3_switch_monitor_wrapper.sh
bindsym mod1+Shift+h exec ~/bin/i3_move_mouse.sh left
bindsym mod1+Shift+k exec ~/bin/i3_move_mouse.sh right
bindsym mod1+Shift+u exec ~/bin/i3_move_mouse.sh up
bindsym mod1+Shift+j exec ~/bin/i3_move_mouse.sh down
bindsym $mod+Shift+y exec ~/bin/i3_mouse_click.sh
bindsym control+Shift+f exec ~/bin/search
bindsym control+mod1+shift+e exec sudo shutdown -h now
bindsym control+mod1+shift+r exec sudo shutdown -r now
bindsym control+$mod+e exec pcmanfm
bindsym XF86Calculator exec qalculate
bindsym XF86Mail exec icedove
bindsym $mod+l exec mlclipboard
bindsym $mod+Shift+S exec i3-msg "sticky toggle"
# class border backgr. text indicator
client.focused #9B2A5D #000000 #ffffff #2e9ef4
client.focused_inactive #333333 #5f676a #ffffff #484e50
client.unfocused #333333 #222222 #888888 #292d2e
client.urgent #2f343a #87af15 #ffffff #900000
#4c7899