Commit 648b020d authored by epsi sayidina's avatar epsi sayidina

i3wm

parent 7ff851fa
......@@ -27,6 +27,11 @@ There are three parts here
![XMonad DZen2][dzen-all]
* [README i3][readme-i3]
![i3-gaps i3status Conky Lua JSON][i3status-all]
-- -- --
# ~/.config
......@@ -63,3 +68,4 @@ There are three parts here
[wibox-all]: https://github.com/epsi-rns/dotfiles/blob/master/awesome/readme/wibox-all.png
[dzen-all]: https://github.com/epsi-rns/dotfiles/blob/master/xmonad/readme/dzen-all.png
[i3status-all]: https://github.com/epsi-rns/dotfiles/blob/master/i3/readme/conky-lua-json-both.png
! Window opacity
rofi.opacity: 90
! State: 'bg', 'fg', 'bgalt', 'hlbg', 'hlfg'
rofi.color-normal: #161616, #5c5dad, #000000, #000000, #c9c925
rofi.color-urgent: #161616, #ad3737, #000000, #000000, #fdf6e3
rofi.color-active: #161616, #ffffff, #000000, #000000, #fdf6e3
! 'background', 'border'
rofi.color-window: #161616, #5c5dad
File added
Awesome
=====================
# i3status Preview
## Conky Lua with JSON
You can change the color and easily by editing conky/04.modular/jsonparts.lua.
![i3status: Conky Lua with JSON: Top][i3status-top]
<br/>
![i3status: Conky Lua with JSON: Bottom][i3status-bottom]
-- -- --
# Screenshots
## Modularized i3status
<strong>OS</strong>: Arch<br/>
<strong>WM</strong>: i3-gaps<br/>
<br/>
+ <strong>Statusbar</strong>: i3bar<br/>
<br/>
+ Rofi<br/>
<br/>
+ Terminal: Termite<br/>
- ViM: NERDTree<br/>
- perl-term-extendedcolor<br/>
- ls++<br/>
<br/>
![i3-gaps Screenshot][picasa-ss-i3gaps-dark]
[picasa-ss-i3gaps-dark]: https://lh3.googleusercontent.com/-z2h94mqwszU/V59JN7KCTyI/AAAAAAAAAsI/Dj76UEcWbnkhowZUobnrj8uwC6aA-VcuwCCo/s0/i3gaps-dark.png
[i3status-top]: https://github.com/epsi-rns/dotfiles/blob/master/i3/readme/conky-lua-json-top.png
[i3status-bottom]: https://github.com/epsi-rns/dotfiles/blob/master/i3/readme/conky-lua-json-bottom.png
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
set $mod Mod4
font pango:monospace 8
# font pango:DejaVu Sans Mono 8
# font pango:Terminus 11px
# font pango:FontAwesome 8
# 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 Mod1+Return exec xfce4-terminal
bindsym $mod+Return exec termite
# kill focused window
bindsym $mod+Shift+q kill
# start dmenu (a program launcher)
# bindsym $mod+d exec --no-startup-id i3-dmenu-desktop
bindsym $mod+d exec dmenu_run
bindsym $mod+Shift+d exec rofi -show run -opacity 90
# list open windows to switch to
bindsym $alt+Tab exec rofi -show window -opacity 90
# change focus
bindsym $mod+j focus left
bindsym $mod+k focus down
bindsym $mod+l focus up
bindsym $mod+semicolon 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+semicolon 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
# workspace variable
# 1:  term, 2:  net, 3:  edit, 4:  place, 5: mail
set $ws01 "一 ichi"
set $ws02 "二 ni"
set $ws03 "三 san"
set $ws04 "四 shi"
set $ws05 "五 go"
set $ws06 "六 roku"
set $ws07 "七 shichi"
set $ws08 "八 hachi"
set $ws09 "九 kyū"
set $ws10 "十 jū"
# switch to workspace
bindsym $mod+1 workspace $ws01
bindsym $mod+2 workspace $ws02
bindsym $mod+3 workspace $ws03
bindsym $mod+4 workspace $ws04
bindsym $mod+5 workspace $ws05
bindsym $mod+6 workspace $ws06
bindsym $mod+7 workspace $ws07
bindsym $mod+8 workspace $ws08
bindsym $mod+9 workspace $ws09
bindsym $mod+0 workspace $ws10
# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace $ws01
bindsym $mod+Shift+2 move container to workspace $ws02
bindsym $mod+Shift+3 move container to workspace $ws03
bindsym $mod+Shift+4 move container to workspace $ws04
bindsym $mod+Shift+5 move container to workspace $ws05
bindsym $mod+Shift+6 move container to workspace $ws06
bindsym $mod+Shift+7 move container to workspace $ws07
bindsym $mod+Shift+8 move container to workspace $ws08
bindsym $mod+Shift+9 move container to workspace $ws09
bindsym $mod+Shift+0 move container to workspace $ws10
# 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
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 semicolon 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"
# Window Colours
# class border backgr. text indicator
client.focused #5c5dad #5c5dad #ffffff #fcc09e
client.focused_inactive #222222 #222222 #999999 #fcc09e
client.unfocused #c9c925 #c9c925 #000000 #fcc09e
client.urgent #a5a5a5 #a5a5a5 #2e3436 #fcc09e
client.background #161616
# workspace_layout tabbed
# i3 gaps
#for_window [class="^.*"] border pixel 3
new_window pixel 3
# Gaps
gaps inner 20
gaps outer 5
smart_gaps on
smart_borders on
# Examples
# gaps inner all set 20
# gaps outer current plus 5
# ws: term
assign [class="URxvt"] $ws01
# ws: net
for_window [class="facebook"] move $ws02
assign [instance="firefox"] $ws02
assign [instance="chromium"] $ws02
assign [instance="thunderbird"] $ws02
# ws: edit
assign [instance="geany"] $ws03
# ws: place
assign [class="File"] $ws04
assign [instance="thunar"] $ws04
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
bar {
# default i3 status config
# status_command i3status
# custom i3status config
# status_command i3status --config ~/.config/i3/i3status/custom.conf
# i3blocks
# status_command i3blocks -c ~/.config/i3/i3blocks/custom.conf
# i3bar, old pre-v1.10 plain conky onfiguration
# status_command conky -c ~/.config/i3/conky/01.old/conkyrc
# i3bar, v.1.10 conky lua configuration
# status_command conky -c ~/.config/i3/conky/02.lua/conkyrc.lua
# i3bar, v.1.10 conky lua with json configuration
# status_command ~/.config/i3/conky/03.json/json.sh
# i3bar, modularized lua json configuration
status_command ~/.config/i3/conky/04.modular/json.bottom.sh
# separator_symbol ""
# font pango:Consolas 9
position bottom
colors {
background #000000
statusline #c9c925
separator #ffffff
# class border backgrd text
focused_workspace #161616 #c9c925 #000000
active_workspace #161616 #5c5dad #a5a5a5
inactive_workspace #161616 #222222 #5c5dad
urgent_workspace #161616 #ad3737 #ffffff
}
}
# secondary bar
bar {
# i3bar, modularized lua json configuration
status_command ~/.config/i3/conky/04.modular/json.top.sh
position top
workspace_buttons no
colors {
background #000000
}
}
exec --no-startup-id xsetroot -solid "#333333"
exec --no-startup-id compton
exec --no-startup-id nitrogen --restore
# exec --no-startup-id geany
# exec --no-startup-id thunar
# vim:filetype=i3
# 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).
#
# i3 config file (v4)
#
# Please see http://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
# font pango:DejaVu Sans Mono 8
# font pango:Terminus 11px
# font pango:FontAwesome 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 Mod1+Return exec xfce4-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
bindsym $mod+Shift+d exec rofi -show run -opacity 90
# list open windows to switch to
bindsym $alt+Tab exec rofi -show window -opacity 90
# 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
# change focus
bindsym $mod+j focus left
bindsym $mod+k focus down
bindsym $mod+l focus up
bindsym $mod+semicolon 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+semicolon 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
# workspace variable
# 1:  term, 2:  net, 3:  edit, 4:  place, 5: mail
set $ws01 "一 ichi"
set $ws02 "二 ni"
set $ws03 "三 san"
set $ws04 "四 shi"
set $ws05 "五 go"
set $ws06 "六 roku"
set $ws07 "七 shichi"
set $ws08 "八 hachi"
set $ws09 "九 kyū"
set $ws10 "十 jū"
# switch to workspace
bindsym $mod+1 workspace $ws01
bindsym $mod+2 workspace $ws02
bindsym $mod+3 workspace $ws03
bindsym $mod+4 workspace $ws04
bindsym $mod+5 workspace $ws05
bindsym $mod+6 workspace $ws06
bindsym $mod+7 workspace $ws07
bindsym $mod+8 workspace $ws08
bindsym $mod+9 workspace $ws09
bindsym $mod+0 workspace $ws10
# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace $ws01
bindsym $mod+Shift+2 move container to workspace $ws02
bindsym $mod+Shift+3 move container to workspace $ws03
bindsym $mod+Shift+4 move container to workspace $ws04
bindsym $mod+Shift+5 move container to workspace $ws05
bindsym $mod+Shift+6 move container to workspace $ws06
bindsym $mod+Shift+7 move container to workspace $ws07
bindsym $mod+Shift+8 move container to workspace $ws08
bindsym $mod+Shift+9 move container to workspace $ws09
bindsym $mod+Shift+0 move container to workspace $ws10
# 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 semicolon 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"
# Window Colours
# class border backgr. text indicator
client.focused #5c5dad #5c5dad #ffffff #fcc09e
client.focused_inactive #222222 #222222 #999999 #fcc09e
client.unfocused #c9c925 #c9c925 #000000 #fcc09e
client.urgent #a5a5a5 #a5a5a5 #2e3436 #fcc09e
client.background #161616
# Example from documentation
# client.focused #4c7899 #285577 #ffffff #2e9ef4 #285577
# client.focused_inactive #333333 #5f676a #ffffff #484e50 #5f676a
# client.unfocused #333333 #222222 #888888 #292d2e #222222
# client.urgent #2f343a #900000 #ffffff #900000 #900000
# client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c
# client.background #ffffff
# --
# workspace_layout tabbed
# i3 gaps
#for_window [class="^.*"] border pixel 3
new_window pixel 3
# ws: term
assign [class="URxvt"] $ws01
# ws: net
for_window [class="facebook"] move $ws02
assign [instance="firefox"] $ws02
assign [instance="chromium"] $ws02
assign [instance="thunderbird"] $ws02
# ws: edit
assign [instance="geany"] $ws03
# ws: place
assign [class="File"] $ws04
assign [instance="thunar"] $ws04
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
bar {
# i3bar, modularized lua json configuration
status_command ~/.config/i3/conky/04.modular/json.bottom.sh
position bottom
colors {
background #161616
statusline #c9c925
separator #ffffff
# class border backgrd text
focused_workspace #161616 #c9c925 #000000
active_workspace #161616 #5c5dad #a5a5a5
inactive_workspace #161616 #222222 #5c5dad
urgent_workspace #161616 #ad3737 #ffffff
}
}
# secondary bar
bar {
# i3bar, modularized lua json configuration
status_command ~/.config/i3/conky/04.modular/json.top.sh
position top
workspace_buttons no
}
exec --no-startup-id xsetroot -solid "#333333"
exec --no-startup-id compton
exec --no-startup-id nitrogen --restore
# exec --no-startup-id geany
# exec --no-startup-id thunar
# vim:filetype=i3
out_to_x no
out_to_console yes
update_interval 1
TEXT
${if_mpd_playing}♫ ${mpd_artist} - ${mpd_title} | ${endif}\
${time %H:%M:%S}
-- vim: ts=4 sw=4 noet ai cindent syntax=lua
--[[
Conky, a system monitor, based on torsmo
https://github.com/brndnmtthws/conky/wiki/Convert-to-new-1.10-syntax
]]
conky.config = {
background = false,
out_to_x = false,
out_to_console = true,
update_interval = 1,
total_run_times = 0,
use_spacer = "none"
}
conky.text = [[
${if_mpd_playing}♫ ${mpd_artist} - ${mpd_title} | ${endif}\
${time %H:%M:%S}
]]
-- vim: ts=4 sw=4 noet ai cindent syntax=lua
--[[
Conky, a system monitor, based on torsmo
https://i3wm.org/docs/user-contributed/conky-i3bar.html
https://i3wm.org/docs/i3bar-protocol.html
You can change properties
"background": "\#c9c925",
"border": "\#ee0000"
"separator" : true
]]
conky.config = {
out_to_x = false,
out_to_console = true,
short_units = true,
update_interval = 1
}
conky.text = [[
[
# MPD
${if_mpd_playing}
{"full_text":"", "color":"\#c9c925",
"separator":false, "separator_block_width":6},
{"full_text":"${mpd_artist 20}", "color" : "\#5c5dad",
"separator" : false, "separator_block_width":3 },
{"full_text":" - ", "color" : "\#909737",
"separator" : false, "separator_block_width":3 },
{"full_text":"${mpd_title 30}", "color" : "\#545454",
"separator" : false, "separator_block_width":6 },
${else}
{"full_text":"", "color":"\#c92525",
"separator" : false, "separator_block_width":6 },
${endif}
# Time:
{"full_text":"|", "color":"\#545454",
"separator":false, "separator_block_width":6},
{"full_text":"", "color":"\#c9c925",
"separator":false, "separator_block_width":6},
{"full_text":"TIME", "color":"\#5c5dad",
"separator":false,"separator_block_width":6},
{"full_text":"${time %H:%M }", "color":"\#aaaaaa",
"separator":false, "separator_block_width":6 }
],
]]
-- note that tis json doesn't support unicode character.
out_to_x no
own_window no
out_to_console yes
background no
max_text_width 0
# Update interval in seconds
update_interval 2.0
# This is the number of times Conky will update before quitting.
# Set to zero to run forever.
total_run_times 0
# Shortens units to a single character (kiB->k, GiB->G, etc.). Default is off.
short_units yes
# How strict should if_up be when testing an interface for being up?
# The value is one of up, link or address, to check for the interface
# being solely up, being up and having link or being up, having link
# and an assigned IP address.
if_up_strictness address
# Add spaces to keep things from moving about? This only affects certain objects.
# use_spacer should have an argument of left, right, or none
use_spacer left
# Force UTF8? note that UTF8 support required XFT
override_utf8_locale no
# number of cpu samples to average
# set to 1 to disable averaging
cpu_avg_samples 2
# Stuff after 'TEXT' will be formatted on screen
TEXT
# JSON for i3bar
[{ "full_text" : "Home ${fs_free /home} Free" , "color" : "\#ffffff" },
{ "full_text" : "RAM ${memperc}%" , "color" :
${if_match ${memperc}<90}"\#ffffff"${else}"\#ff0000"${endif} }],
#!/bin/sh
# Send the header so that i3bar knows we want to use JSON:
echo '{"version":1}'
# Begin the endless array.
echo '['
# We send an empty first array of blocks to make the loop simpler:
echo '[],'
# Now send blocks with information forever:
exec conky -c ~/.config/i3/conky/03.json/conkyrc.lua
-- vim: ts=4 sw=4 noet ai cindent syntax=lua
--[[
Conky, a system monitor, based on torsmo
]]
conky.config = {
out_to_x = false,
out_to_console = true,
short_units = true,
update_interval = 1
}
home = os.getenv("HOME")
dofile(home .. '/.config/i3/conky/04.modular/' .. 'jsonhelper.lua')
dofile(home .. '/.config/i3/conky/04.modular/' .. 'jsonparts.lua')
disabled = [[
]] .. parts.mpd .. [[,
]] .. parts.mem .. [[,
]] .. parts.uptime .. [[,
]] .. parts.host .. [[,
]] .. parts.volume .. [[,
]] .. parts.machine .. [[
]]
enabled = [[
]] .. parts.cputemp .. [[,
]] .. parts.download .. [[,
]] .. parts.upload .. [[,
]] .. parts.memory .. [[,
]] .. parts.cpu0 .. [[,
]] .. parts.battery .. [[
]]
conky.text = [[
[
]] .. enabled .. [[,
]] .. parts.date .. [[,
]] .. parts.time .. [[
],
]]
-- vim: ts=4 sw=4 noet ai cindent syntax=lua