i3 and blocks changes for the win 95 look

This commit is contained in:
2018-11-19 16:19:01 +01:00
parent 97a2d2e750
commit 833702fa4b
6 changed files with 235 additions and 108 deletions

130
i3/config
View File

@@ -36,8 +36,8 @@ set $term2 urxvt
#browser
set $brow qutebrowser
#set $brow qutebrowser
set $brow google-chrome-unstable
# Keys bindings for easy access
set $bright XF86MonBrightnessUp
set $dim XF86MonBrightnessDown
@@ -45,8 +45,9 @@ set $volUp XF86AudioRaiseVolume
set $volDown XF86AudioLowerVolume
set $mute XF86AudioMute
#set $volUp "amixer -q sset Master 10%+"
#set $volDown "amixer -q sset Master 10%-"
#set $mute "amixer -q sset Master toggle"
@@ -61,23 +62,28 @@ bindsym $mod+Shift+q kill
#bindsym $mod+d exec dmenu_run -nb black -nf white -sb white -sf black -fn RobotoMono:size=10
#start rofi
bindsym $mod+d exec rofi -show run -hide-scrollbar -lines 3 -eh 1 -width 40 -location 8 -xoffset 170 -yoffset 70 -padding 30 -disable-history -font "RobotoMono 18"
#bindsym $mod+d exec rofi -show run -hide-scrollbar -lines 3 -eh 1 -width 40 -location 8 -xoffset 170 -yoffset 70 -padding 30 -disable-history -font "RobotoMono 18"
#keybindings
#laptop
bindsym $bright exec xbacklight -inc 5
bindsym $dim exec xbacklight -dec 5
bindsym $mod+$dim exec xbacklight -set 1
bindsym $mod+Shift+$dim exec xbacklight -set 0
bindsym $mod+Shift+F5 exec xbacklight -dec 5
bindsym $mod+Shift+F6 exec xbacklight -inc 5
bindsym $dim exec xbacklight -set 1
bindsym $mod+$dim exec xbacklight -set 0
bindsym $bright exec xbacklight -set 70
bindsym $mod+$bright exec xbacklight -set 100
bindsym $mod+Shift+$bright exec xbacklight -set 70
bindsym $mod+$volUp exec pulse sset Master 5%+
bindsym $mod+$volDown exec pulse sset Master 5%-
bindsym $mod+$volUp exec amixer -q sset Master 5%+
bindsym $mod+Shift+F1 exec amixer -q sset Master toggle
bindsym $mod+Shift+F2 exec amixer -q sset Master 5%-
bindsym $mod+Shift+F3 exec amixer -q sset Master 5%+
bindsym $mod+$volDown exec amixer -q sset master 5%-
bindsym $mod+Shift+$volUp exec pulse sset Master 100%
bindsym $mod+Shift+$volDown exec pulse sset Master 5%
bindsym $mod+$mute exec pulse sset Master 0%
bindsym $mod+Shift+Home exec i3-msg restart
#bindsym $mod+Shift+$volUp exec amixer -q sset Master 100%
#bindsym $mod+Shift+$volDown exec amixer -q sset Master 5%
bindsym $mod+End exec systemctl suspend
bindsym $mod+$mute exec amixer -q sset Master 0%
#personal
bindsym $mod+o exec $brow
@@ -107,10 +113,10 @@ bindsym $mod+Shift+k move up
bindsym $mod+Shift+l 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
#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+shift+v split h
@@ -128,15 +134,17 @@ bindsym $mod+e layout toggle split
# toggle tiling / floating
bindsym $mod+Shift+space floating toggle
#bindsym $mod+Shift+space mode "floating"
# change focus between tiling / floating windows
bindsym $mod+space focus mode_toggle
# focus the parent container
#bindsym $mod+a focus parent
bindsym $mod+a focus parent
# focus the child container
#bindsym $mod+d focus child
bindsym $mod+d focus child
# switch to workspace
bindsym $mod+1 workspace 1
@@ -172,7 +180,7 @@ bindsym $mod+Shift+r reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
#bindsym $mod+Shift+r restart
# resize window (you can also use the mouse for that)
mode "resize" {
mode "resize+move" {
# These bindings trigger as soon as you enter the resize mode
# Pressing left will shrink the windows width.
@@ -191,19 +199,62 @@ mode "resize" {
bindsym Up resize shrink height 6 px or 6 ppt
bindsym Right resize grow width 6 px or 6 ppt
# bind movement in resize mode
bindsym Shift+h move left
bindsym Shift+j move down
bindsym Shift+k move up
bindsym Shift+l move right
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
bindsym $mod+r mode "default"
}
mode "floating" {
bindsym Shift+$mod+h resize shrink width 6 px or 6 ppt
bindsym Shift+$mod+j resize grow height 6 px or 6 ppt
bindsym Shift+$mod+k resize shrink height 6 px or 6 ppt
bindsym Shift+$mod+l resize grow width 6 px or 6 ppt
bindsym Shift+Left resize shrink width 6 px or 6 ppt
bindsym Shift+Down resize grow height 6 px or 6 ppt
bindsym Shift+Up resize shrink height 6 px or 6 ppt
bindsym Shift+Right resize grow width 6 px or 6 ppt
bindsym Shift+h move left
bindsym Shift+j move down
bindsym Shift+k move up
bindsym Shift+l move right
# bindsym $mod+space mode "default" for_window [class="[.]*"] floating disable
bindsym $mod+space mode "default"
}
bar {
status_command SCRIPT_DIR=/home/beppe/.config/i3blocks i3blocks -c ~/.config/i3blocks/config
#status_command i3blocks -c ~/.config/i3blocks/config
colors {
background #989898
focused_workspace #000000 #00007F #ffffff
active_workspace #000000 #00007F #ffffff
inactive_workspace #002b36 #586e75 #002b36
urgent_workspace #d33682 #d33682 #fdf6e3
}
}
bindsym $mod+r mode "resize"
bindsym $mod+r mode "resize+move"
# Disable titlebar
new_window pixel 1
@@ -224,24 +275,47 @@ popup_during_fullscreen smart
focus_follows_mouse no
bindsym $mod+p exec rofi -show run
bindsym $mod+shift+p exec rofi -show window
#bindsym $mod+shift+p exec rofi -show window
#bindsym $mod+b exec polybar statusbar &
# playerctl settings
bindsym $mod+Shift+Left exec playerctl previous
bindsym $mod+Shift+Right exec playerctl next
bindsym $mod+Shift+p exec playerctl play-pause
bindsym $mod+shift+e exit
#startupStuff
#set polybar
#exec polybar statusbar &
bindsym $mod+End exec termite -e htop
#bindsym $mod+End exec termite -e htop
bindsym $mod+Home exec ranger
# Set Wallpaper
exec --no-startup-id feh --bg-scale ~/Pictures/wallpaper/wallpaper.*
exec compton -CGb
exec --no-startup-id clipit
#exec xautolock -detectsleep -time 3 -locker "systemctl suspend"
exec setxkbmap be -option caps:escape
exec xmodmap -e "keycode 117 = Down"
#exec xmodmap -e "keysym Caps_Lock = Escape"
#
#
# startupScript for space 1
exec ~/.startupScripts/space1
#exec ~/.startupScripts/space1
#
#
#experimental
#
#
#float everything at the start

View File

@@ -38,9 +38,9 @@ $percent = $2;
$full_text = "$percent%";
if ($status eq 'Discharging') {
$full_text .= ' DIS';
$full_text .= ' ';
} elsif ($status eq 'Charging') {
$full_text .= ' CHR';
$full_text .= ' ';
}
$short_text = $full_text;
@@ -56,19 +56,19 @@ print "$short_text\n";
# consider color and urgent flag only on discharge
if ($status eq 'Discharging') {
if ($percent < 20) {
print "#FF0000\n";
} elsif ($percent < 40) {
print "#FFAE00\n";
} elsif ($percent < 60) {
print "#FFF600\n";
} elsif ($percent < 85) {
print "#A8FF00\n";
}
if ($percent < 5) {
exit(33);
}
# if ($percent < 20) {
# print "#FF0000\n";
# } elsif ($percent < 40) {
# print "#FFAE00\n";
# } elsif ($percent < 60) {
# print "#FFF600\n";
# } elsif ($percent < 85) {
# print "#A8FF00\n";
# }
#
# if ($percent < 5) {
# exit(33);
# }
}
exit(0);

8
i3blocks/brightness Executable file
View File

@@ -0,0 +1,8 @@
case $BLOCK_BUTTON in
3) xbacklight -set 20 ;;
4) xbacklight -inc 10 ;;
5) xbacklight -dec 10 ;;
esac
printf "%.0f" "$(xbacklight -get)"

View File

@@ -28,70 +28,29 @@ command=$SCRIPT_DIR/$BLOCK_NAME
separator_block_width=15
markup=none
# Volume indicator
#
# The first parameter sets the step (and units to display)
# The second parameter overrides the mixer selection
# See the script for details.
[volume]
#label=VOL
label=♪
#instance=Master
instance=PCM
interval=once
signal=10
# Memory usage
# # Memory usage
#
# The type defaults to "mem" if the instance is not specified.
[memory]
label=MEM
separator=false
interval=30
[memory]
label=SWAP
instance=swap
separator=false
interval=30
# Disk usage
#
# The directory defaults to $HOME if the instance is not specified.
# The script may be called with a optional argument to set the alert
# (defaults to 10 for 10%).
[disk]
label=HOME
#instance=/mnt/data
interval=30
# Network interface monitoring
#
# If the instance is not specified, use the interface used for default route.
# The address can be forced to IPv4 or IPv6 with -4 or -6 switches.
[iface]
instance=wlan0
color=#00FF00
interval=10
separator=false
[wifi]
instance=wlp3s0
interval=10
separator=false
[bandwidth]
#instance=eth0
interval=5
# CPU usage
#
# The script may be called with -w and -c switches to specify thresholds,
# see the script for details.
[cpu_usage]
label=CPU
interval=10
min_width=CPU: 100.00%
#[cpu_usage]
#label=CPU
#interval=10
#min_width=CPU: 100.00%
#separator=false
#[load_average]
@@ -100,30 +59,57 @@ min_width=CPU: 100.00%
# Battery indicator
#
# The battery instance defaults to 0.
[battery]
#label=BAT
label=⚡
#instance=1
interval=30
# Date Time
#
[time]
command=date '+%Y-%m-%d %H:%M'
interval=5
# Generic media player support
#
# This displays "ARTIST - SONG" if a music is playing.
# Supported players are: spotify, vlc, audacious, xmms2, mplayer, and others.
#[mediaplayer]
#instance=spotify
#interval=5
#signal=10
#
#[colors]
#command=echo "<span color='red'>roses</span> and <span color='#0000ff'>violets</span>"
#markup=pango
#interval=once
[mediaplayer]
instance=spotify
interval=5
signal=10
label=♪
#color=#000000
# OpenVPN support
#
# Support multiple VPN, with colors.
[memory]
label=RAM
separator=false
interval=30
#color=#000000
#
#[memory]
#label=SWAP
#instance=swap
#separator=false
#interval=30
# Disk usage
#
# The directory defaults to $HOME if the instance is not specified.
# The script may be called with a optional argument to set the alert
# (defaults to 10 for 10%).
[disk]
label=DISK
#instance=/mnt/data
interval=30
#color=#000000
#[openvpn]
#interval=20
@@ -151,3 +137,62 @@ interval=5
#instance=NUM
#interval=once
#signal=11
#
#
#[iface]
#instance=wlan0
#color=#00FF00
#interval=10
#label="eth"
[wifi]
instance=wlp3s0
interval=10
label=⥮
#color=#000000
#
#[bandwidth]
##instance=eth0
#interval=5
[brightness]
label=💻
interval=1
[volume]
#label=VOL
label=🔊
instance=Master
#instance=PCM
interval=1
signal=10
#
[battery]
#label=BAT
label=I⚡
instance=0
interval=30
[battery]
label=E⚡
instance=1
interval=30
[time]
command=date '+%Y-%m-%d %H:%M'
interval=5

View File

@@ -33,8 +33,8 @@ fi
#------------------------------------------------------------------------
if [[ "$(cat /sys/class/net/$IF/operstate)" = 'down' ]]; then
echo down # full text
echo down # short text
echo # full text
#echo down # short text
echo \#FF0000 # color
exit
fi

View File

@@ -26,7 +26,7 @@ MIXER="default"
[ -n "$(lsmod | grep pulse)" ] && MIXER="pulse"
[ -n "$(lsmod | grep jack)" ] && MIXER="jackplug"
MIXER="${2:-$MIXER}"
MIXER="default"
# The instance option sets the control to report and configure
# This defaults to the first control of your selected mixer
# For a list of the available, use `amixer -D $Your_Mixer scontrols`