From: ds6 Date: Sat, 9 Dec 2017 20:43:12 +0000 (-0600) Subject: switch i3bar->tint2, zsh bell, pbuild/run->portpkg X-Git-Url: https://git.sev.monster/~sev/dotfiles.git/commitdiff_plain/118fb6e074a9e7ebf94fa5fd6c000d44b76fd403?hp=821519016af1834f362213a6de807276311981d4 switch i3bar->tint2, zsh bell, pbuild/run->portpkg stop using i3bar, switch entirely to tint2 zsh bell on long operations + urxvt urgentOnBell pbuild and prun combined into `portpkg [build/run]' compton changes and optimizations luakit changes ssh-agent added to .xinitrc .Xresources fix, `depth: 32' broke many things including old X apps --- diff --git a/base/.Xresources b/base/.Xresources index ac6f6cf..5cd2410 100644 --- a/base/.Xresources +++ b/base/.Xresources @@ -1,6 +1,5 @@ ! generic settings *font: xft:Dina:size=8 -*depth: 32 ! Solarized colors, http://ethanschoonover.com/solarized !#define S_base03 #002b36 @@ -56,24 +55,39 @@ *underlineColor: S_yellow -! urxvt -urxvt.termName: rxvt-256color -urxvt.perl-ext: -urxvt.perl-ext-common: +! URxvt +URxvt.termName: rxvt-256color +URxvt.perl-ext: +URxvt.perl-ext-common: -urxvt.cursorBlink: on -urxvt.cursorUnderline: on -urxvt.scrollstyle: plain -urxvt.scrollBar_right: true -urxvt.urgentOnBell: true -urxvt.visualBell: true +URxvt.cursorBlink: on +URxvt.cursorUnderline: on +URxvt.scrollstyle: plain +URxvt.scrollBar_right: true +URxvt.urgentOnBell: true +URxvt.visualBell: true -urxvt.background: rgba:0000/0a00/0d00/d000 -urxvt.dynamicColors: true -urxvt.intensityStyles: false +URxvt.depth: 32 +URxvt.background: rgba:0000/0a00/0d00/d000 +URxvt.dynamicColors: true +URxvt.intensityStyles: false -urxvt.print-pipe: cat > "$HOME/urxvt-$(date +'%Y-%m-%d-%H%M%S')" +URxvt.print-pipe: cat > "$HOME/urxvt-$(date +'%Y-%m-%d-%H%M%S')" +! bg terminal +URxvtRoot.termName: rxvt-256color +URxvtRoot.perl-ext: +URxvtRoot.perl-ext-common: + +URxvtRoot.scrollBar: false +URxvtRoot.visualBell: true + +URxvtRoot.depth: 32 +URxvtRoot.borderLess: true +URxvtRoot.transparent: true +URxvtRoot.shading: 80 + +! xvkbd xvkbd.Alt_R.width: 1 xvkbd.Meta_R.width: 1 xvkbd.Multi_key.width: 1 diff --git a/base/.xinitrc b/base/.xinitrc index ed72b5e..c0d5993 100755 --- a/base/.xinitrc +++ b/base/.xinitrc @@ -18,16 +18,28 @@ if [ -f "$usermodmap" ]; then xmodmap "$usermodmap" fi -# session-independent -xset r rate 290 26 -xset m 1/1 0 +# root image, redshift redon & +"$HOME/.fehbg" + +# Xorg settings +xset r rate 290 26 & +xset m 1/1 0 & + +# root terminal +#urxvt -name URxvtRoot -override-redirect -geometry x26+0-0 -e glances & +#xdotool search --limit 1 --sync --classname URxvtRoot windowsize 100% y + +# tray icons +#"$HOME/src/phwmon/phwmon.py" --mem --mem_percent --net --io --bg \#0000 & +volumeicon & + +# daemons dunst & xautolock -time 10 -locker "$HOME/bin/l" & xbanish & eval `ssh-agent` -# run terminal daemon if [ -x /usr/local/bin/urxvtd ]; then for i in 1 2; do # try to start client twice, once before checking for daemon and @@ -47,6 +59,11 @@ if [ -x /usr/local/bin/urxvtd ]; then unset i fi +# try to wait for session to start +(sleep 0.1 && tint2) & +(sleep 0.1 && [ -x "$HOME/bin/acpi_ac" ] && "$HOME/bin/acpi_ac" "0x0`sysctl -n hw.acpi.acline`") & +(sleep 1.5 && [ -x /usr/local/bin/conky ] && conky -c "$HOME/.conkyrc.d/dock") & + # load any global scripts if [ -d /usr/local/etc/X11/xinit/xinitrc.d ]; then for f in /usr/local/etc/X11/xinit/xinitrc.d/?*.sh; do @@ -55,15 +72,6 @@ if [ -d /usr/local/etc/X11/xinit/xinitrc.d ]; then unset f fi -tint2 & -# sleep for tint to start -sleep 3 - -# try to wait for session to start -(sleep 0.2 && [ -x "$HOME/bin/acpi_ac" ] && "$HOME/bin/acpi_ac" "0x0`sysctl -n hw.acpi.acline`") & -(sleep 1 && "$HOME/.fehbg") & -(sleep 1.5 && [ -x /usr/local/bin/conky ] && conky -c "$HOME/.conkyrc.d/dock") & - if [ ! -n "$1" ]; then session=i3 else @@ -71,3 +79,6 @@ else shift fi exec $session "$@" + +# cleanup +ssh-agent -k diff --git a/base/.zshrc b/base/.zshrc index 4c2fdb4..51f3a34 100644 --- a/base/.zshrc +++ b/base/.zshrc @@ -7,9 +7,14 @@ zstyle ':vcs_info:git*' formats "(%F{green}%r/%b%f) %m%u%c " function precmd { print -Pn "\e]0;${SSH_CLIENT+$USER@$HOST}%#zsh%(1j,:%j,):%~\a" vcs_info + if ((SECONDS - _exectime >= 5)) { + # bell after long exec + print "\a" + } } function preexec { printf "\033]0;%s\a" "$1" + _exectime=$SECONDS } # prompt @@ -42,8 +47,15 @@ alias rm='rm -I' alias activate="source bin/activate" # ports -alias pbuild="sudo pkg install --automatic \`make build-depends-list | sed 's/\/usr\/ports\// /' | tr -d '\n'\`" -alias prun="sudo pkg install --automatic \`make run-depends-list | sed 's/\/usr\/ports\// /' | tr -d '\n'\`" +function portpkg { + case "$1" { + build|run) ;; + *) + echo "Usage: \`portpkg ' in a port directory" + return 1;; + } + sudo pkg install -AU $(make ${1}-depends-list | sed 's_/usr/ports/_ _' | tr -d '\n') +} # keys bindkey "^[[7~" beginning-of-line #Home diff --git a/xdg/compton.conf b/xdg/compton.conf index 99228bc..d1c8065 100644 --- a/xdg/compton.conf +++ b/xdg/compton.conf @@ -8,12 +8,18 @@ shadow-offset-x = -7; shadow-offset-y = -7; shadow-opacity = 1; shadow-exclude = [ + # gtk3 fix "_GTK_FRAME_EXTENTS@:c", - # fullscreen - "x = 0 && y = 0 && override_redirect = true" + # i3 tabbed windows + "_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'", + # i3 titlebar + "class_g = 'i3-frame'", + # fullscreen/dmenu + "x = 0 && y = 0 && override_redirect = true", + # root terminal + "class_i = 'URxvtRoot'" ]; shadow-ignore-shaped = true; -xinerama-shadow-crop = true; # Opacity menu-opacity = 0.9; @@ -23,6 +29,19 @@ alpha-step = 0.01; inactive-dim = 0.075; blur-background = true; blur-kern = "5,5,0.367879,0.535261,0.606531,0.535261,0.367879,0.535261,0.778801,0.882497,0.778801,0.535261,0.606531,0.882497,0.882497,0.606531,0.535261,0.778801,0.882497,0.778801,0.535261,0.367879,0.535261,0.606531,0.535261,0.367879," +opacity-rule = [ + # i3 tabbed windows + "0:_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'" +]; +blur-background-exclude = [ + # gtk3 fix + "_GTK_FRAME_EXTENTS@:c", + # i3 titlebar + "class_g = 'i3-frame'", + # ignore docks + "window_type = 'dock'", + "window_type = 'desktop'" +]; # Fading fading = true; diff --git a/xdg/i3/config b/xdg/i3/config index d37b5d7..32327eb 100644 --- a/xdg/i3/config +++ b/xdg/i3/config @@ -142,38 +142,38 @@ bindsym XF86AudioRaiseVolume exec --no-startup-id mixer vol +5 # move and resize [floating] windows mode "translate" { - bindsym $left resize shrink width 20 px - bindsym $down resize grow height 20 px - bindsym $up resize shrink height 20 px - bindsym $right resize grow width 20 px + bindsym $left resize shrink width 20 px + bindsym $down resize grow height 20 px + bindsym $up resize shrink height 20 px + bindsym $right resize grow width 20 px bindsym $left2 resize shrink width 20 px bindsym $down2 resize grow height 20 px bindsym $up2 resize shrink height 20 px bindsym $right2 resize grow width 20 px - bindsym Shift+$left move left 20 px - bindsym Shift+$down move down 20 px - bindsym Shift+$up move up 20 px - bindsym Shift+$right move right 20 px + bindsym Shift+$left move left 20 px + bindsym Shift+$down move down 20 px + bindsym Shift+$up move up 20 px + bindsym Shift+$right move right 20 px bindsym Shift+$left2 move left 20 px bindsym Shift+$down2 move down 20 px bindsym Shift+$up2 move up 20 px bindsym Shift+$right2 move right 20 px # smaller movements - bindsym Control+$left resize shrink width 1 px or 1 ppt - bindsym Control+$down resize grow height 1 px or 1 ppt - bindsym Control+$up resize shrink height 1 px or 1 ppt - bindsym Control+$right resize grow width 1 px or 1 ppt + bindsym Control+$left resize shrink width 1 px or 1 ppt + bindsym Control+$down resize grow height 1 px or 1 ppt + bindsym Control+$up resize shrink height 1 px or 1 ppt + bindsym Control+$right resize grow width 1 px or 1 ppt bindsym Control+$left2 resize shrink width 1 px or 1 ppt bindsym Control+$down2 resize grow height 1 px or 1 ppt bindsym Control+$up2 resize shrink height 1 px or 1 ppt bindsym Control+$right2 resize grow width 1 px or 1 ppt - bindsym Control+Shift+$left move left 1 px - bindsym Control+Shift+$down move down 1 px - bindsym Control+Shift+$up move up 1 px - bindsym Control+Shift+$right move right 1 px + bindsym Control+Shift+$left move left 1 px + bindsym Control+Shift+$down move down 1 px + bindsym Control+Shift+$up move up 1 px + bindsym Control+Shift+$right move right 1 px bindsym Control+Shift+$left2 move left 1 px bindsym Control+Shift+$down2 move down 1 px bindsym Control+Shift+$up2 move up 1 px @@ -192,18 +192,18 @@ mode "translate" { bindsym $mod+z focus child # back to normal: Enter, Escape, or original key - bindsym return mode default - bindsym escape mode default + bindsym Return mode default + bindsym Escape mode default bindsym $mod+r mode default } bindsym $mod+r mode "translate" # borders hide_edge_borders smart -#new_window normal 1 new_window pixel 1 gaps inner 6 smart_gaps on +for_window [class="Gsimplecal"] floating enable # misc workspace_auto_back_and_forth yes @@ -214,27 +214,27 @@ force_display_urgency_hint 2000 ms set $focused #cc6600 #aa5500 #eee8d5 #4466ff #cc6600 set $inactive #884400 #221100 #93a1a1 #264bd2 #884400 set $urgent #ff4444 #dc322f #000000 #4466ff #ff4444 -set $blue #4466ff #264bd2 #fdf6e3 #264db2 #4466ff - -bar { - position top - tray_output primary - status_command i3status - separator_symbol "|" - - colors { - background #110800 - statusline #93a1a1 - separator #268bd2 - - # class border backgr. text - focused_workspace $focused - active_workspace $inactive - inactive_workspace $inactive - urgent_workspace $urgent - binding_mode $blue - } -} +set $blue #4466ff #268bd2 #fdf6e3 #264db2 #4466ff + +#bar { +# position top +# tray_output primary +# status_command i3status +# separator_symbol "|" +# +# colors { +# background #110800 +# statusline #93a1a1 +# separator #268bd2 +# +# # class border backgr. text +# focused_workspace $focused +# active_workspace $inactive +# inactive_workspace $inactive +# urgent_workspace $urgent +# binding_mode $blue +# } +#} # colors # class border backgr. text indicator child_border diff --git a/xdg/i3status/config b/xdg/i3status/config index 80571b4..400bf22 100644 --- a/xdg/i3status/config +++ b/xdg/i3status/config @@ -11,7 +11,7 @@ order += "ethernet _first_" order += "cpu_usage" order += "load" order += "battery 0" -#order += "tztime local" +order += "tztime local" wireless wlan0 { format_up = "WLAN0 %essid %ip" @@ -42,6 +42,6 @@ battery 0 { low_threshold = 20 } -#tztime local { -# format = "%a/%b %d/%m/%Y %H:%M:%S" -#} +tztime local { + format = "%a/%b %d/%m/%Y %H:%M:%S" +} diff --git a/xdg/i3status/tint2_cpu b/xdg/i3status/tint2_cpu new file mode 100644 index 0000000..3fd1e7d --- /dev/null +++ b/xdg/i3status/tint2_cpu @@ -0,0 +1,36 @@ +general { + output_format = "xmobar" + interval = 2 + separator = "" + color_good = "#85c000" + color_degraded = "#b58900" + color_bad = "#dc322f" +} + +order += "cpu_usage" +order += "load" +order += "wireless wlan0" +order += "ethernet em0" + +cpu_usage { + format = "%usage " + max_threshold = 90 + degraded_threshold = 50 + separator = false + separator_block_width = 0 +} + +load { + format = "%1min %5min %15min\n" + max_threshold = "1.5" +} + +wireless wlan0 { + format_up = "%essid %ip" + format_down = "wlan down" +} + +ethernet em0 { + format_up = " %ip" + format_down = "" +} diff --git a/xdg/luakit/rc.lua b/xdg/luakit/rc.lua index e784406..ea644b7 100644 --- a/xdg/luakit/rc.lua +++ b/xdg/luakit/rc.lua @@ -172,6 +172,8 @@ settings.window.search_engines = { } settings.window.search_engines.default = settings.window.search_engines.ddg +-- change tab text +require("lousy.widget.tab").label_format = '{index} {title}' -- Restore last saved session local w = (not luakit.nounique) and (session and session.restore()) diff --git a/xdg/luakit/theme.lua b/xdg/luakit/theme.lua index b685a40..7678414 100644 --- a/xdg/luakit/theme.lua +++ b/xdg/luakit/theme.lua @@ -40,65 +40,66 @@ theme.success_fg = S_green theme.loaded_fg = S_cyan theme.warning_fg = theme.warn.fg theme.warning_bg = theme.warn.bg -theme.error_fg = theme.error.fg -theme.error_bg = theme.error.bg +theme.error_fg = theme.error.fg +theme.error_bg = theme.error.bg -- Notification colours theme.notif_fg = S_blue theme.notif_bg = S_base02 -- Menu colours -theme.menu_fg = S_base0 -theme.menu_bg = S_base03 -theme.menu_selected_fg = S_base0 -theme.menu_selected_bg = S_base02 -theme.menu_title_bg = S_base03 -theme.menu_primary_title_fg = S_base0 -theme.menu_secondary_title_fg = S_base01 +theme.menu_fg = S_base0 +theme.menu_bg = S_base03 +theme.menu_selected_fg = S_base0 +theme.menu_selected_bg = S_base02 +theme.menu_title_bg = S_base03 +theme.menu_primary_title_fg = S_base0 +theme.menu_secondary_title_fg = S_base01 theme.menu_disabled_fg = S_base01 -theme.menu_disabled_bg = S_base03 -theme.menu_enabled_fg = S_yellow --? -theme.menu_enabled_bg = S_green --? -theme.menu_active_fg = S_green -theme.menu_active_bg = theme.menu_bg +theme.menu_disabled_bg = theme.menu_bg +-- enabled but not active, eg. userstyles that aren't applied +theme.menu_enabled_fg = S_yellow +theme.menu_enabled_bg = theme.menu_bg +theme.menu_active_fg = S_green +theme.menu_active_bg = theme.menu_bg -- Proxy manager -theme.proxy_active_menu_fg = S_green -theme.proxy_active_menu_bg = theme.menu_bg -theme.proxy_inactive_menu_fg = theme.menu_fg -theme.proxy_inactive_menu_bg = theme.menu_bg +theme.proxy_active_menu_fg = S_green +theme.proxy_active_menu_bg = theme.menu_bg +theme.proxy_inactive_menu_fg = theme.menu_fg +theme.proxy_inactive_menu_bg = theme.menu_bg -- Statusbar specific -theme.sbar_fg = S_base0 -theme.sbar_bg = "#110800" +theme.sbar_fg = S_base0 +theme.sbar_bg = "#110800" -- Downloadbar specific -theme.dbar_fg = theme.menu_fg -theme.dbar_bg = theme.menu_bg -theme.dbar_error_fg = S_red +theme.dbar_fg = theme.menu_fg +theme.dbar_bg = theme.menu_bg +theme.dbar_error_fg = S_red -- Input bar specific -theme.ibar_fg = S_base1 -theme.ibar_bg = S_base03 +theme.ibar_fg = S_base1 +theme.ibar_bg = S_base03 -- Tab label -theme.tab_fg = S_base0 -theme.tab_bg = S_base03 -theme.tab_hover_bg = S_base02 -theme.tab_ntheme = S_red -theme.selected_fg = S_base1 -theme.selected_bg = S_base02 -theme.selected_ntheme = S_magenta -theme.loading_fg = S_green -theme.loading_bg = S_base02 +theme.tab_fg = S_base1 +theme.tab_bg = "#884400" +theme.tab_hover_bg = "#4466ff" +theme.tab_ntheme = S_red --? +theme.selected_fg = S_base2 +theme.selected_bg = "#aa5500" +theme.selected_ntheme = S_magenta --? +theme.loading_fg = S_green +theme.loading_bg = S_base02 theme.selected_private_tab_bg = S_violet -theme.private_tab_bg = S_magenta +theme.private_tab_bg = S_magenta -- Trusted/untrusted ssl colours -theme.trust_fg = S_green -theme.notrust_fg = S_base01 +theme.trust_fg = S_green +theme.notrust_fg = S_red return theme diff --git a/xdg/tint2/tint2rc b/xdg/tint2/tint2rc index b701cde..7641f25 100644 --- a/xdg/tint2/tint2rc +++ b/xdg/tint2/tint2rc @@ -1,4 +1,4 @@ -#---- Generated by tint2conf 758d ---- +#---- Generated by tint2conf e587 ---- # See https://gitlab.com/o9000/tint2/wikis/Configure for # full documentation of the configuration options. #------------------------------------- @@ -51,8 +51,8 @@ border_color_pressed = #000000 0 #------------------------------------- # Panel -panel_items = T:C -panel_size = 100% 19 +panel_items = T:SECB +panel_size = 100% 28 panel_margin = 0 0 panel_padding = 0 1 0 panel_background_id = 3 @@ -145,17 +145,18 @@ launcher_tooltip = 1 #------------------------------------- # Clock -time1_format = %a/%b %d/%m/%Y %H:%M:%S -time2_format = +time1_format = %H:%M:%S +time2_format = %a/%b %d/%m/%Y time1_font = Dina 8 time1_timezone = time2_timezone = +time2_font = Dina 6 clock_font_color = #93a1a1 100 -clock_padding = 0 0 +clock_padding = 2 0 clock_background_id = 0 clock_tooltip = clock_tooltip_timezone = -clock_lclick_command = +clock_lclick_command = gsimplecal clock_rclick_command = clock_mclick_command = clock_uwheel_command = @@ -163,11 +164,13 @@ clock_dwheel_command = #------------------------------------- # Battery -battery_tooltip = 0 -battery_low_status = 0 -battery_low_cmd = -battery_font_color = #ffffff 100 -battery_padding = 0 0 +battery_tooltip = 1 +battery_low_status = 5 +battery_low_cmd = notify-send -u critical "Battery low" +bat1_font = Dina 8 +bat2_font = Dina 6 +battery_font_color = #93a1a1 100 +battery_padding = 2 0 battery_background_id = 0 battery_hide = 101 battery_lclick_command = @@ -182,10 +185,33 @@ ac_disconnected_cmd = # Separator 1 separator = new separator_background_id = 0 -separator_color = #000000 0 -separator_style = empty -separator_size = 15 -separator_padding = 0 0 +separator_color = #268db2 100 +separator_style = line +separator_size = 1 +separator_padding = 5 0 + +#------------------------------------- +# Executor 1 +execp = new +execp_command = ~/bin/i3status-tint2 cpu +execp_interval = 0 +execp_has_icon = 0 +execp_cache_icon = 1 +execp_continuous = 2 +execp_markup = 1 +execp_tooltip = +execp_lclick_command = +execp_rclick_command = +execp_mclick_command = +execp_uwheel_command = +execp_dwheel_command = +execp_font = Dina 8 +execp_font_color = #93a1a1 100 +execp_padding = 2 0 +execp_background_id = 0 +execp_centered = 1 +execp_icon_w = 0 +execp_icon_h = 0 #------------------------------------- # Tooltip