Browse Source

i3: startup progs, i3blocks, redshift bindings

Also updated NZXT-terminator and background for i3.
red-hat-laptop
Kevin Mok 7 years ago
parent
commit
d4d44555ca
  1. 2
      .vimrc
  2. 22
      NZXT-terminator
  3. 5
      aliases/.bash_aliases
  4. 140
      i3.conf
  5. 156
      i3blocks.conf
  6. 5
      set-from-git.sh

2
.vimrc

@ -23,7 +23,7 @@ set timeoutlen=300
" }}} set x=y "
autocmd VimResized * wincmd =
autocmd BufNewFile,BufRead .*_aliases set syntax=sh
autocmd BufNewFile,BufRead .* set syntax=sh
" vim-plug {{{ "
" plug auto-install

22
NZXT-terminator

@ -1,22 +1,12 @@
[global_config]
borderless = True
focus = mouse
inactive_color_offset = 1.0
tab_position = hidden
title_font = Noto Sans 10
title_hide_sizetext = True
title_transmit_bg_color = "#3d3d3d"
[keybindings]
close_term = <Primary>w
cycle_next = <Shift>Tab
go_down = <Primary>j
go_left = <Primary>h
go_right = <Primary>l
go_up = <Primary>k
new_tab = <Primary>t
new_window = <Primary><Shift>n
resize_down = <Primary><Shift>j
resize_left = <Primary><Shift>h
resize_right = <Primary><Shift>l
resize_up = <Primary><Shift>k
split_horiz = <Primary><Shift>i
split_vert = <Primary><Shift>o
[layouts]
[[default]]
[[[child1]]]
@ -28,13 +18,13 @@
[plugins]
[profiles]
[[default]]
background_darkness = 0.89
background_darkness = 0.88
background_image = None
background_type = transparent
copy_on_selection = True
cursor_color = "#b9b9b9"
custom_command = env TERM=xterm-256color bash
font = Ubuntu Mono 10
font = Ubuntu Mono 11
foreground_color = "#0077ff"
palette = "#000000:#aa0000:#00aa00:#aa5500:#0000aa:#aa00aa:#00aaaa:#aaaaaa:#555555:#ff5555:#55ff55:#ffff55:#5555ff:#ff55ff:#55ffff:#ffffff"
scrollbar_position = hidden

5
aliases/.bash_aliases

@ -11,9 +11,10 @@ alias l='ls -a'
alias ll='ls -alF'
alias cs='printf "\033c"'
shopt -s dotglob
alias reb="sudo shutdown -r 0"
alias sd="sudo shutdown 0"
alias lo="i3-msg exit"
alias s="systemctl suspend"
alias sd="sudo shutdown 0"
alias reb="sudo shutdown -r 0"
alias hst="history"
alias topo="top -o %MEM"
alias rmsw="rm .sw*"

140
i3.conf

@ -1,54 +1,46 @@
# 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).
#
# applications {{{ #
# startup {{{ #
exec redshift -O 4000
exec_always feh --bg-scale ~/Pictures/Backgrounds/samurai-astronaut.jpg
exec imwheel
exec terminator
exec google-chrome
# }}} startup #
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
set $mod Mod1
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
font pango:ubuntu mono 10
# 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+control+Return exec gnome-terminal
# kill focused window
# bindsym $mod+Shift+w kill
bindsym control+x kill
bindsym $mod+control+Return exec i3-sensible-terminal
bindsym Mod4+c exec google-chrome
# redshift {{{ #
bindsym $mod+Mod4+2 exec redshift -O 2000
bindsym $mod+Mod4+3 exec redshift -O 3000
bindsym $mod+Mod4+4 exec redshift -O 4000
bindsym $mod+Mod4+5 exec redshift -O 5000
# }}} redshift #
# menu {{{ #
# start dmenu (a program launcher)
bindsym Mod4+Return exec dmenu_run
# 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
# }}} menu #
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# }}} applications #
# changing/focusing/moving windows {{{ #
# change focus
bindsym control+h focus left
bindsym control+j focus down
bindsym control+k focus up
bindsym control+l focus right
# move workspace to other monitor
bindsym $mod+h move workspace to output left
bindsym $mod+l move workspace to output right
# alternatively, you can use the cursor keys:
bindsym $mod+Left focus left
bindsym $mod+Down focus down
@ -68,11 +60,13 @@ bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
# split in horizontal orientation
bindsym $mod+h split h
bindsym $mod+b split h
# split in vertical orientation
bindsym $mod+v split v
# }}} changing/focusing/moving windows #
# container display {{{ #
# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen toggle
@ -92,38 +86,54 @@ bindsym $mod+a focus parent
# focus the child container
#bindsym $mod+d focus child
# }}} container display #
# workspace {{{ #
# switch to workspace
bindsym $mod+1 workspace 1
bindsym $mod+2 workspace 2
bindsym $mod+3 workspace 3
bindsym $mod+4 workspace 4
set $ws1 "1: "
set $ws2 "2"
set $ws3 "3"
set $ws4 "4"
# ws bindings {{{ #
bindsym $mod+1 workspace $ws1
bindsym $mod+2 workspace $ws2
bindsym $mod+3 workspace $ws3
bindsym $mod+4 workspace $ws4
bindsym $mod+5 workspace 5
bindsym $mod+6 workspace 6
bindsym $mod+7 workspace 7
bindsym $mod+8 workspace 8
bindsym $mod+9 workspace 9
bindsym $mod+0 workspace 10
# }}} ws bindings #
# move container to ws {{{ #
# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace 1
bindsym $mod+Shift+2 move container to workspace 2
bindsym $mod+Shift+3 move container to workspace 3
bindsym $mod+Shift+4 move container to workspace 4
bindsym $mod+Shift+1 move container to workspace $ws1; workspace $ws1
bindsym $mod+Shift+2 move container to workspace $ws2; workspace $ws2
bindsym $mod+Shift+3 move container to workspace $ws3; workspace $ws3
bindsym $mod+Shift+4 move container to workspace $ws4; workspace $ws4
bindsym $mod+Shift+5 move container to workspace 5
bindsym $mod+Shift+6 move container to workspace 6
bindsym $mod+Shift+7 move container to workspace 7
bindsym $mod+Shift+8 move container to workspace 8
bindsym $mod+Shift+9 move container to workspace 9
bindsym $mod+Shift+0 move container to workspace 10
# }}} move container to ws #
# }}} workspace #
# reload the configuration file
bindsym $mod+Shift+c reload
# reload config/computer {{{ #
bindsym $mod+Shift+s exec systemctl suspend
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+control+r restart
# reload the configuration file
bindsym $mod+Shift+c reload
# 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'"
# }}} reload config #
# resizing windows {{{ #
# resize window (you can also use the mouse for that)
mode "resize" {
# These bindings trigger as soon as you enter the resize mode
@ -147,12 +157,46 @@ mode "resize" {
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym control+r mode "resize"
# }}} resizing windows #
# status bar {{{ #
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
bar {
status_command i3status
font pango:System San Francisco Display 12
status_command i3blocks -c ~/.config/i3blocks/i3blocks.conf
tray_output primary
}
# }}} status bar #
# mod key/font {{{ #
set $mod Mod1
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
font pango:System San Francisco Display 10
# 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.
# }}} mod key/font #
# media keys {{{ #
# Pulse Audio controls
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 +5% #increase sound volume
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -5% #decrease sound volume
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle # mute sound
# Media player controls
bindsym XF86AudioPlay exec playerctl play
bindsym XF86AudioPause exec playerctl pause
bindsym XF86AudioNext exec playerctl next
bindsym XF86AudioPrev exec playerctl previous
# }}} media keys #

156
i3blocks.conf

@ -0,0 +1,156 @@
# i3blocks config file
#
# Please see man i3blocks for a complete reference!
# The man page is also hosted at http://vivien.github.io/i3blocks
#
# List of valid properties:
#
# align
# color
# command
# full_text
# instance
# interval
# label
# min_width
# name
# separator
# separator_block_width
# short_text
# signal
# urgent
# Global properties
#
# The top properties below are applied to every block, but can be overridden.
# Each block command defaults to the script name to avoid boilerplate.
command=/usr/share/i3blocks/$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
# Date Time
#
[time]
label=
command=date '+%H:%M.%m-%d'
interval=5
[load_average]
label=
interval=5
# CPU usage
#
# The script may be called with -w and -c switches to specify thresholds,
# see the script for details.
[cpu_usage]
# [cpu_usage -w 50 -c 80]
label=
interval=5
min_width=CPU: 100.00%
#separator=false
# Memory usage
#
# The type defaults to "mem" if the instance is not specified.
[memory]
label=
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
# Battery indicator
#
# The battery instance defaults to 0.
[battery]
label=BAT
#label=⚡
#instance=1
interval=30
# 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
# OpenVPN support
#
# Support multiple VPN, with colors.
#[openvpn]
#interval=20
# Temperature
#
# Support multiple chips, though lm-sensors.
# The script may be called with -w and -c switches to specify thresholds,
# see the script for details.
#[temperature]
#label=TEMP
#interval=10
# Key indicators
#
# Add the following bindings to i3 config file:
#
# bindsym --release Caps_Lock exec pkill -SIGRTMIN+11 i3blocks
# bindsym --release Num_Lock exec pkill -SIGRTMIN+11 i3blocks
#[keyindicator]
#instance=CAPS
#interval=once
#signal=11
#[keyindicator]
#instance=NUM
#interval=once
#signal=11

5
set-from-git.sh

@ -10,15 +10,12 @@ done
# config files
dot_dir=~/linux-config
config_dir=~/.config
config_files="neofetch/config.conf i3/config"
config_files="neofetch/config.conf i3/config i3blocks/i3blocks.conf"
for file in $config_files; do
rm $config_dir/$file
ln -s $dot_dir/$(echo $file | cut -d'/' -f 1).conf $config_dir/$file
# echo $(echo $file | cut -d'/' -f 1)
done
# old code
# neofetch_dir=~/.config/neofetch
# ln -s $dot_dir/neofetch.conf $config_dir/neofetch/config.conf
# terminator
dot_dir=~/linux-config

Loading…
Cancel
Save