guest@dotshare [~/groups/wms/i3] $ ls nyan/ | cat

nyan (scrot) (+2 likes)

nyasuh Apr 24, 2016 (wms/i3)

config(raw, dl)

SCROT

  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
# i3 config file 
set $mod Mod4
#setup color
set $col1 #343C48
set $col2 #528588
set $col3 #E5E5E5
set $col4 #BA5E57
set $col5 #E38179
set $col6 #343C48
set $col7 #528588

font pango:Droid Serif-10

# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod

# start a terminal
bindsym $mod+Return exec urxvt
bindsym $mod+i exec /home/kaze/.config/i3/bin/info-dzen

# kill focused window
bindsym $mod+Shift+q kill


bindsym $mod+d exec sh /home/kaze/.config/i3/bin/dmenu_suh.sh

# 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

# autostart application
exec /home/kaze/.config/i3/bin/autostart.sh

for_window [class="^.*"] border pixel 1

# switch to workspace
set $ws1  "1:TERM "
set $ws2  "2:NET "
set $ws3  "3:MO "
set $ws4  "4:NSFW  "

workspace $ws1 gaps inner 2
workspace $ws1 gaps outer 2
workspace $ws2 gaps inner 2
workspace $ws2 gaps outer 2
workspace $ws3 gaps inner 2
workspace $ws3 gaps outer 2

workspace_auto_back_and_forth yes

bindsym $mod+1 workspace $ws1
bindsym $mod+2 workspace $ws2
bindsym $mod+3 workspace $ws3
bindsym $mod+4 workspace $ws4

bindsym $mod+Tab workspace back_and_forth


bindsym $mod+Shift+1 move container to workspace number $ws1
bindsym $mod+Shift+2 move container to workspace number $ws2
bindsym $mod+Shift+3 move container to workspace number $ws3
bindsym $mod+Shift+4 move container to workspace number $ws4



#bindsym $mod+1 workspace 1:TERM ;
#bindsym $mod+3 workspace 2:NET ;
#bindsym $mod+2 workspace 3:MO ;
#bindsym $mod+4 workspace 4:NSFW ;

# move focused container to workspace
#bindsym $mod+Shift+1 move container to workspace 1:TERM ;
#bindsym $mod+Shift+3 move container to workspace 2:NET ;
#bindsym $mod+Shift+2 move container to workspace 3:MO ;
#bindsym $mod+Shift+4 move container to workspace 4:NSFW ;

# 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 sh ~/.i3/assets/bin/powermenu.sh 

# 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"

gaps inner 30
gaps outer 50

# class                 border  backgr. text    indicator child_border
client.focused          $col2 $col2 $col2
client.focused          $col2 $col2 $col2
client.unfocused        $col6 $col6 $col6
client.focused_inactive $col1 $col1 $col1
client.urgent           $col1 $col1 $col1

bar {
	status_command ~/.config/i3/bin/panel-info.sh
	position top
	height 25
	strip_workspace_numbers yes
	font pango:FontAwesome 10
	colors {
                background             $col1
                statusline             $col1
                active_workspace       $col4 $col4 $col3
                focused_workspace      $col4 $col4 $col3
                inactive_workspace     $col6 $col6 $col3
                urgent_workspace       $col7 $col7 $col3
	}
}

CLICK TO VIEW

x

panel-info.sh(raw, dl)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
#!/bin/sh
ScreenWidth=1366
fg="#efefef"
bg="#343C48"
hg="25"
icons2="FontAwesome:size=12"
icons4="FontAwesome:size=10"
bg_volume="#BA5E57"
font='Droid Serif-10'
WidthInfo=`expr $ScreenWidth / 2 - 100`
WidthVolume=100
X_info=`expr $ScreenWidth - $WidthInfo - $WidthVolume`
X_volume=`expr $ScreenWidth - $WidthVolume`

conky -c /home/kaze/.config/i3/bin/conky/info | dzen2 -p -ta r -e 'button3=' -fn 'Droid Serif-10' -fg $fg -bg $bg -h $hg -w $WidthInfo -x $X_info &
conky -c /home/kaze/.config/i3/bin/conky/info2 | dzen2 -p -ta r -e 'button3=' -fn 'Droid Serif-10' -fg $fg -bg $bg_volume -h $hg -w $WidthVolume -x $X_volume &
 

x

info(raw, dl)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
background no
out_to_console yes
out_to_x no
update_interval 0.3
total_run_times 0
use_spacer none

TEXT
^fg(\#528588)^i(/home/kaze/.icons/stlarch/uparrow4.xbm)^fg()  ${upspeedf wlp2s0}   \
^fg(\#BA5E57)^i(/home/kaze/.icons/stlarch/downarrow4.xbm)^fg()  ${downspeedf wlp2s0}  \
^fg(\#505E73)  //^fg()     \
^fg(\#7d7d7d)^fg() ${exec mpc current -f %title% | tr ‘[a-z]’ ‘[A-Z]}  (${mpd_elapsed}/${mpd_length})   \
^fg(\#505E73)  //^fg()      \
^bg(\#528588)      ${time %R %p}     \
 

x

info2(raw, dl)

1
2
3
4
5
6
7
8
9
background no
out_to_console yes
out_to_x no
update_interval 0.3
total_run_times 0
use_spacer none

TEXT
^bg(\#BA5E57)Kazehaya    \
 

x

autostart.sh(raw, dl)

1
2
3
4
5
6
xrdb ~/.Xdefaults &
/usr/lib/lxpolkit
xsetroot -cursor_name left_ptr &
nitrogen --restore &
mpd &
compton &
 

x

dmenu_suh.sh(raw, dl)

 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
#!/bin/sh
terminal='urxvt -e'
menu_list="FILE\\nNET\nMUSIC\n------------\nLOGOUT\nREBOOT\nSHUTDOWN"

Dmenu="dmenu -p '' -i -b -h 24 -l 12 -w 85 -dim 0.0 -x 450 -y 320 -i -fn 'Droid Serif-8'  -nb '#1D2426' -sb '#BA5E57' -nf '#FFFFFF' -sf '#212121'"

asuh=$(echo -e "$menu_list" | eval $Dmenu)



case $asuh in
  *FILE)
    thunar ;;
  *NET)
    firefox ;;
  *MUSIC)
    $terminal ncmpcpp ;; 
   *LOGOUTt | ";"i | i";") 
    pkill i3 & ;;
   *REBOOT)
   shutdown -r now & ;;
  *SHUTDOWN)
   shutdown -h now & ;;

esac
 

x

info_dzen.sh(raw, dl)

 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
#!/bin/bash

FG='#dcdcdc'
BG='#1D2426'
fg_title="#528588"

font1="Inconsolata:size=11"
font_title="Droid Serif:bold:size=10"
icons="Typicons:size=12"
icons2="FontAwesome:size=12"
icons4="FontAwesome:size=10"
icons3="Ionicons:size=12"

 #A simple popup showing system information
 disk=$(df -h / | awk 'NR==2 {total=$2; used=$3; print used" / "total}')
 termfn=$(cat $HOME/.Xdefaults | grep -v ! | awk '/*font/ {print $2}' | sed 's/xft://;s/:pixelsize//;s/=/\ /')
 OS=$(uname -r)
 pid=$(pgrep -x -u $USER $wm)
 HOST=$(uname -n)
 KERNEL=$(uname -r)
 uptime=$(uptime | awk '{print $3}')
 charCount=$(echo ${#uptime})
 MPC=`mpc -f %title%  | head -1`
 MPD=`mpc -f %artist%  | head -1`
 cpu=$(lscpu | grep 'Model name' | awk -F ':' '{print $2}' | cut -c13-37)
 if [[ "$charCount" = "3" ]]
 	then
 	uptime=$(uptime | awk '{print $3}' | sed 's/,/m/')
 elif [[ "$charCount" = "1" ]] || [[ "$charCount" = "2" ]]
 	then
 	uptime=$(uptime | awk '{print $3}' | sed 's/$/m/')
 else
 	uptime=$(uptime | awk '{print $3}' | sed 's/:/h /' | sed 's/,/m/')
 fi


 #UPTIME=$(uptime | sed 's/.* up //' | sed 's/[0-9]* us.*//' | sed 's/ day, /d /'\
  #        | sed 's/ days, /d /' | sed 's/:/h /' | sed 's/ min//'\
   #         |  sed 's/,/m/' | sed 's/  / /')
 PACKAGES=$(pacman -Q | wc -l)
 de=$(wmctrl -m | grep -i name | awk '{print $2}')
 ram_used=$(free -m | grep Mem | awk '{print $3" MB"}')
 ram_total=$(free -m | grep Mem | awk '{print $2" MB"}')
 cpu_user=$(mpstat | grep all | awk '{print $4"%"}')
 cpu_sys=$(mpstat | grep all | awk '{print $6"%"}')
 cpu_idle=$(mpstat | grep all | awk '{print $13"%"}')
 temp=$(cat /sys/devices/virtual/thermal/thermal_zone0/temp)
 let "cpu_temp=$temp/1000"
 hdd_temp=$(hddtemp -n /dev/sda)

gtkrc="$HOME/.gtkrc-2.0"
GtkTheme=$( grep "gtk-theme-name" "$gtkrc" | cut -d\" -f2 )
GtkIcon=$( grep "gtk-icon-theme-name" "$gtkrc" | cut -d\" -f2 )
GtkFont=$( grep "gtk-font-name" "$gtkrc" | cut -d\" -f2 )

(
 echo "
 ^fg($fg_title)^fn($font_title)^p(+25)SYSTEM INFORMATION^p()^fg()" # Fist line goes to title
 echo "   ^fg(#666666)^p(+27)------------------------------------"
 echo "   ^p(+15)^fg(#FFFFFF)^fn($icons2)^fn($font1) Kaze | $HOST "
 echo "   ^p(+15)^fg(#FFFFFF)^fn($icons2)^fn($font1) $uptime"
 echo "   ^p(+15)^fg(#FFFFFF)^fn($icons3)P^fn() $PACKAGES packages"
 echo "   ^fg(#666666)^p(+27)------------------------------------"
 echo "   ^p(+55)^fg(#FFFFFF)^fn($font_title)^fg($fg_title)^bg(#181818) INFO "
 echo "   ^p(+15)^fg(#FFFFFF)^fn($icons2)^fn($font1) WM 		   ^fn($icons4)^fn($font1) $de	"
 echo "   ^p(+15)^fg(#FFFFFF)^fn($icons2)^fn($font1) THEME 	 ^fn($icons4)^fn($font1) $GtkTheme	"
 ##echo "   ^fg(#FFFFFF)^fn($icons2)^fn($font1) ICON    ^fn($icons4)^fn($font1) $GtkIcon	"
 echo "   ^fg(#666666)^p(+27)------------------------------------"
 echo "   ^p(+55)^fg(#FFFFFF)^fn($font_title)^fg($fg_title)^bg(#181818) RAM "
 echo "   ^p(+15)^fg(#FFFFFF)^fn($icons2) ^fn($font1)$ram_used / $ram_total"
 echo "   ^p(+15)^fg(#666666)^p(+27)------------------------------------"
 echo "   ^p(+55)^fg(#FFFFFF)^fn($font_title)^fg($fg_title)^bg(#181818) HDD "
 echo "   ^p(+15)^fg(#FFFFFF)^fn($icons2)^fn($font1) $disk
 "
 echo ""

) | dzen2 -p -x 50 -y 50 -w 200 -bg $BG -fg $FG -l 17 -sa l -ta c -e 'onstart=uncollapse;button1=exit;button3=exit' -fn "Droid Serif-10"
 

x

Notes

Just for fun