Commit 98e56e41 authored by peacerebel's avatar peacerebel
Browse files

Add i3 config

parent fc2b43a3
# This fil/ 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
set $alt Mod1
# Setting colors
client.focused #000000 #000000 #ff0000 #dddddd
client.focused_inactive #333333 #333333 #888888 #292d2e
client.unfocused #333333 #333333 #888888 #292d2e
client.urgent #2f343a #900000 #ffffff #900000
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
font pango:Hack, Font Awesome 5 Free 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:Monospace 7
# 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.
new_window pixel 1
# Smart borders
hide_edge_borders smart
#Naming Workspaces
workspace "Coding" output eDP-1
workspace "Internet" output eDP-1
workspace "Chat" output eDP-1
workspace "Entertainment" output HDMI-1
workspace "Office" output eDP-1
workspace "Terminal" output eDP-1
workspace "Gaming" output eDP-1
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# start a terminal
bindsym $mod+Return exec terminator
# list open windows to switch to
bindsym $alt+Tab exec rofi -show window
# kill focused window
bindsym $mod+Shift+q kill
# start dmenu (a program launcher)
#bindsym $mod+d 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
#bindsym $mod+d exec --no-startup-id rofi -show drun
bindsym $mod+d exec --no-startup-id "rofi -show drun"
# 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
set $ws1 1: Coding
set $ws2 2: Browse
set $ws3 3: Chat
set $ws4 4: Terminal
set $ws5 5: Office
set $ws6 6: A/V
set $ws7 7: Gaming
set $ws8 8: Downloads
set $ws9 9: Mail
# switch to workspace
bindsym $mod+1 workspace $ws1
bindsym $mod+2 workspace $ws2
bindsym $mod+3 workspace $ws3
bindsym $mod+4 workspace $ws4
bindsym $mod+5 workspace $ws5
bindsym $mod+6 workspace $ws6
bindsym $mod+7 workspace $ws7
bindsym $mod+8 workspace $ws8
bindsym $mod+9 workspace $ws9
bindsym $mod+Tab workspace back_and_forth
# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace $ws1
bindsym $mod+Shift+2 move container to workspace $ws2
bindsym $mod+Shift+3 move container to workspace $ws3
bindsym $mod+Shift+4 move container to workspace $ws4
bindsym $mod+Shift+5 move container to workspace $ws5
bindsym $mod+Shift+6 move container to workspace $ws6
bindsym $mod+Shift+7 move container to workspace $ws7
bindsym $mod+Shift+asterisk move container to workspace $ws8
bindsym $mod+Shift+parenleft move container to workspace $ws9
bindsym $mod+Shift+parenright move container to workspace $ws10
#Assigning programs to workspaces
assign [class="(?i)terminator"] $ws4
for_window [class="(?i)terminator"] focus
assign [class="(?i)emacs"] $ws1
for_window [class="(?i)emacs"] focus
assign [class="(?i)firefox"] $ws2
for_window [class="(?i)firefox"] focus
assign [class="(?i)tor browser"] $ws2
for_window [class="(?i)tor browser"] focus
assign [class="(?i)transmission"] $ws8
for_window [class="(?i)transmission"] focus
assign [class="(?i)clementine"] $ws6
for_window [class="(?i)clemetine"] focus
assign [class="(?i)vlc"] $ws6
for_window [class="(?i)vlc"] focus
assign [class="(?i)Element"] $ws3
for_window [class="(?i)Element"] focus
assign [class="(?i)thunderbird"] $ws9
for_window [class="(?i)thunderbird"] focus
assign [class="(?i)libreoffice"] $ws5
for_window [class="(?i)libreoffice"] focus
assign [class="(?i)evince"] $ws5
for_window [class="(?i)evince"] focus
assign [class="(?i)steam"] $ws7
for_window [class="(?i)steam"] focus
for_window [class="(?i)Yad"] floating enable
# 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"
set $mode_system System (l) lock, (e) logout, (h) hibernate, (r) reboot, (Shift+s) shutdown
mode "$mode_system" {
bindsym l exec --no-startup-id ~/.config/i3/i3exit.sh lock, mode "default"
bindsym e exec --no-startup-id ~/.config/i3/i3exit.sh logout, mode "default"
bindsym h exec --no-startup-id ~/.config/i3/i3exit.sh hibernate, mode "default"
bindsym r exec --no-startup-id ~/.config/i3/i3exit.sh reboot, mode "default"
bindsym Shift+s exec --no-startup-id ~/.config/i3/i3exit.sh shutdown, mode "default"
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+Delete mode "$mode_system"
#exec " i3blocks/shutdown_menu/shutdown_menu -c; echo Quit"
#trigger lockscreen - i3lock
#bindsym $mod+z exec "i3lock -i ~/Pictures/free-your-soul-wallpaper.png"
bindsym $mod+z exec "i3lock-fancy -g"
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
# bar {
# #status_command i3blocks -c ~/.config/i3/i3blocks.conf
# status_command polybar i3
# position bottom
# #tray_output primary
# colors {
# background #121212
# separator #969696
# focused_workspace #e80404 #e80404 #eeeeee
# }
#}
#exec --no-startup-id killall -q polybar
exec_always --no-startup-id sh ~/.config/i3/polybar_startup.sh &
exec --no-startup-id nm-applet
exec --no-starup-id ~/.config/ranger/scope.sh
exec --no-startup-id feh --bg-fill ~/Pictures/calm_dark.jpg
# Bind music keys in keyboard to media control
#bindsym XF86AudioMute exec "pactl set-sink-mute 0 toggle && pkill -SIGRTMIN+10 i3blocks"
#bindsym XF86AudioRaiseVolume exec "pactl set-sink-volume 0 +5% && pkill -SIGRTMIN+10 i3blocks"
#bindsym XF86AudioLowerVolume exec "pactl set-sink-volume 0 -5% && pkill -SIGRTMIN+10 i3blocks"
#bindsym XF86AudioLowerVolume exec --no-startup-id "pactl set-sink-volume 0 -5%"
bindsym XF86AudioLowerVolume exec --no-startup-id "amixer set Master 5%- unmute"
#bindsym XF86AudioRaiseVolume exec --no-startup-id "pactl set-sink-volume 0 +5%"
bindsym XF86AudioRaiseVolume exec --no-startup-id "amixer set Master 5%+ unmute"
#bindsym XF86AudioMute exec --no-startup-id "pactl set-sink-mute 0 toggle"
bindsym XF86AudioMute exec --no-startup-id "amixer set Master toggle"
#Thinkpad Mic On/Off
bindsym XF86AudioMicMute exec --no-startup-id "amixer set Capture toggle"
#bindsym XF86AudioMicMute exec --no-startup-id "pactl set-source-mute 1 toggle"
#Enable Redshift
#bindsym $mod+XF86MonBrightnessUp exec --no-startup-id "redshift -c ~/.config/redshift/config &"
#Disable Redshift
#bindsym $mod+XF86MonBrightnessDown exec --no-startup-id "killall redshift &"
#Disable to use key for beyboard backlight
#screenshot using PrtSc
set $scrot_capture scrot 'screenshot-%Y-%m-%d_%H-%M.png' -e 'mv $f ~/Pictures/'
set $scrot_region scrot -s 'screenshot-%Y-%m-%d_%H-%M.png'-e 'mv $f ~/Pictures/'
set $mode_screenshot Screenshot (Enter), Full Screenshot, (S) Select Region
mode "$mode_screenshot" {
bindsym Return exec --no-startup-id $scrot_capture && notify-send -t 2000 "Screenshot saved in your Pictures folder", mode "default"
bindsym --release s exec --no-startup-id $scrot_region && notify-send -t 2000 "Screenshot saved in your Pictures folder", mode "default"
bindsym Escape mode "default"
}
bindsym Print mode "$mode_screenshot"
#Brightness control using light
bindsym XF86MonBrightnessUp exec light -A 5
bindsym XF86MonBrightnessDown exec light -U 5
#Bright control using xbacklight
#bindsym XF86MonBrightnessUp exec xbacklight -inc 5
#bindsym XF86MonBrightnessDown exec xbacklight -dec 5
#Brightness control using light
bindsym $mod+XF86MonBrightnessUp exec --no-startup-id "brightnessctl --device='tpacpi::kbd_backlight' set 50%+"
bindsym $mod+XF86MonBrightnessDown exec --no-startup-id "brightnessctl --device='tpacpi::kbd_backlight' set 50%-"
#Window settings
floating_maximum_size 1366 x 768
# force floating for all new windows
#for_window [class="[.]*"] floating enable
# browser pop-ups
for_window [window_role="pop-up"] floating enable
i3blocks @ 13e46dc0
Subproject commit 13e46dc0f31dd5ed889025161a930db951011522
# 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=10
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=IEC958
#instance=PCM
interval=once
signal=10
command=~/.config/i3/i3blocks/volume/$BLOCK_NAME
# Memory usage
#
# The type defaults to "mem" if the instance is not specified.
[memory]
command=~/.config/i3/i3blocks/memory/$BLOCK_NAME
label=MEM
interval=5
# 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=wlp2s0
#interval=10
#separator=false
#[bandwidth]
#color=#FF0000
#interval=1
[bandwidth2]
label=
command=~/.config/i3/i3blocks/bandwidth2/$BLOCK_NAME #-w 307200:30720 -c 512000:51200
interval=persist
markup=pango
color=#FF0000
# 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=5
#min_width=CPU:50.00%
color=#47e0bf
separator=false
[temperature]
label=
interval=10
#[load_average]
#interval=10
# Battery indicator
#
# The battery instance defaults to 0.
#[battery]
#label=BAT
#label=⚡
#interval=20
[battery2]
command=~/.config/i3/i3blocks/battery2/$BLOCK_NAME
interval=5
markup=pango
# Date Time
#
# Displaying date and time
#[date]
#command=date '+%d-%m-%Y' #'+%a, %d %b %y'
#label=
#interval=1
#separator=false
#[time]
#command=date '+%H:%M:%S'
#label=
#interval=1
#color=#FFEB3B
[calendar]
command=~/.config/i3/i3blocks/calendar/$BLOCK_NAME -f '+%d-%m-%Y %H:%M:%S'
label=
interval=1
color=#FFEB3B
# User
#
# Display logged in user
[user]
command=echo "${USER}"
label=👤
interval=once
color=#CDDC39
#!/bin/sh
lock() {
i3lock
}
case "$1" in
lock)
i3lock-fancy -g
;;
logout)
i3-msg exit
;;
suspend)
lock && systemctl suspend
;;
hibernate)
lock && systemctl hibernate
;;
reboot)
systemctl reboot
;;
shutdown)
systemctl poweroff
;;
*)
echo "Usage: $0 {lock|logout|suspend|hibernate|reboot|shutdown}"
exit 2
esac
exit 0
#!/usr/bin/env sh
# Terminate already running bar instances
killall -q polybar
# Wait until the processes have been shut down
while pgrep -x polybar >/dev/null; do sleep 1; done
for m in $(polybar --list-monitors | cut -d":" -f1); do
WIRELESS=$(ls /sys/class/net/ | grep ^wl | awk 'NR==1{print $1}') MONITOR=$m polybar --reload i3 &
done
# # Launch polybar
# polybar i3 &
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment