پیکربندی:
Shell: Bash
Wm: i3
Distribution: Arch Linux
Terminal: Urxvt
Music Player: Cmus and Moc
Bar: i3blocks
FileManager: Ranger
محتویات فایل کانفیگ:
# i3wm config file (~/.i3/config)
# Mod (Super)
set $mod Mod4
# Font
font pango:Comic Sans MS 10
# Work spaces VAR
set $workspace1 "1: Browser "
set $workspace2 "2: Coding "
set $workspace3 "3: FileManager "
set $workspace4 "4: VirtualMachine "
set $workspace5 "5: Media "
set $workspace6 "6:"
set $workspace7 "7"
set $workspace8 "8"
set $workspace9 "9"
set $workspace10 "10"
# Programs run as which Workspace
assign [class="Firefox"] $workspace1
assign [class="Spyder"] $workspace2
assign [class="Thunar"] $workspace3
assign [class="VirtualBox"] $workspace4
assign [class="Nautilus"] $workspace4
#assign [class="URxvt" instance="Ranger"] $workspace4
#assign [class="URxvt" instance="Mocp"] $workspace5
assign [class="Vlc"] $workspace5
# Floating modifier
floating_modifier $mod
# Terminal emulater
bindsym $mod+Return exec urxvt -bg grey17 -fg grey67 -fn "xft:Mono Space:pixelsize=16" +sb -depth 32 -pr white -uc -bc -sl 100000
# Kill
bindsym $mod+Shift+q kill
# Launcher
bindsym $mod+d exec dmenu_run -i -p RUN -sb '#d64937' -nb '#2D2D2D' -fn "-misc-droid sans-medium-r-normal-*-15-*-*-*-*-*-iso10646-*"
bindsym $mod+Shift+f exec rofi -show run -lines 6 -eh 2 -width 1366 -padding 300 -opacity 80 -bw 30 -bc "#2f343f" -bg "#2f343f" -fg "#f2f1f4" -hlbg "#2f343f" -hlfg "#887AAC" -font "Comic Sans MS 12"
#ff0000
# Change focus
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# Move window
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
# Horizontal split
bindsym $mod+h split h
# Vertical split
bindsym $mod+v split v
# Fullscreen
bindsym $mod+f fullscreen toggle
# Container layout
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
# Screen brightness controls
bindsym XF86MonBrightnessUp exec "xbacklight -inc 10"
bindsym XF86MonBrightnessDown exec "xbacklight -dec 10"
# lock
bindsym $mod+i exec i3lock-fancy
# Toggle tiling / floating
bindsym $mod+Shift+space floating toggle
# Some App Shortcuts
bindsym $mod+F1 exec urxvt -bg grey17 -fg grey67 -fn "xft:Mono Space:pixelsize=18" +sb -depth 32 -pr white -uc -bc -sl 100000 -e ranger
bindsym $mod+F2 exec urxvt -bg grey17 -fg grey67 -fn "xft:Mono Space:pixelsize=18" +sb -depth 32 -pr white -uc -bc -sl 100000 -e mocp -T darkdot_theme
# Change focus between tiling / floating windows
bindsym $mod+space focus mode_toggle
# switch to workspace
bindsym $mod+1 workspace $workspace1
bindsym $mod+2 workspace $workspace2
bindsym $mod+3 workspace $workspace3
bindsym $mod+4 workspace $workspace4
bindsym $mod+5 workspace $workspace5
bindsym $mod+6 workspace $workspace6
bindsym $mod+7 workspace $workspace7
bindsym $mod+8 workspace $workspace8
bindsym $mod+9 workspace $workspace9
bindsym $mod+0 workspace $workspace10
# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace $workspace1
bindsym $mod+Shift+2 move container to workspace $workspace2
bindsym $mod+Shift+3 move container to workspace $workspace3
bindsym $mod+Shift+4 move container to workspace $workspace4
bindsym $mod+Shift+5 move container to workspace $workspace5
bindsym $mod+Shift+6 move container to workspace $workspace6
bindsym $mod+Shift+7 move container to workspace $workspace7
bindsym $mod+Shift+8 move container to workspace $workspace8
bindsym $mod+Shift+9 move container to workspace &workspace9
bindsym $mod+Shift+0 move container to workspace $workspace10
#screenshot
bindsym --release Print exec scrot $HOME/Pictures/screenshot-$(date +%Y-%m-%d_%H-%M-%S).jpg
bindsym --release Shift+Print exec scrot -s $HOME/Pictures/screenshot-$(date +%Y-%m-%d_%H-%M-%S).jpg)
# Reload configuration
bindsym $mod+Shift+c reload
# Inplace restart
bindsym $mod+Shift+r restart
# Exit
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m '' -b 'Exit i3' 'i3-msg exit' -b 'Shutdown' 'shutdown now' -b 'Reboot' 'reboot'"
# My shortcuts
bindsym $mod+Shift+s exec "~/bin/i3-prompt-shortcuts"
# Color Class Border BG FG
client.focused #1793D0 #1793D0 #FFFFFF
client.focused_inactive #000000 #333333 #FFFFFF
client.unfocused #000000 #333333 #FFFFFF
client.urgent #FF0000 #FF0000 #FF0000
# bar.focused #1793D0 #000000 #FFFFFF
# bar.unfocused #333333 #000000 #FFFFFF
# bar.urgent #FF0000 #000000 #FF0000
# Resize
mode "resize" {
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"
# Bar...
bar {
font pango:Comic Sans MS 10
mode dock
# colors {
# background #000000
# statusline #ffffff
# separator #00ffff
#
# focused_workspace #3d3d3d #3d3d3d #ffffff
# active_workspace #000000 #0000ff #222222
# inactive_workspace #000000 #000000 #888888
# urgent_workspace #2f343a #900000 #ffffff
# binding_mode #2f343a #900000 #ffffff
# }
strip_workspace_numbers yes
separator_symbol "❮"
# !REQUIRES i3blocks
status_command i3blocks
position top
colors {
background #2d2d2d
statusline #dedede
#separator #2d2d2d
separator #fff000
focused_workspace #357AC3 #357AC3 #dedede
active_workspace #2d2d2d #5f676a #dedede
inactive_workspace #2d2d2d #2d2d2d #888888
urgent_workspace #2d2d2d #2d2d2d #888888
}
}
# For Window ...
new_window pixel 1
for_window [class="Telegram"] floating enable; resize shrink width 10000px; resize grow width 300px; resize shrink height 10000px; resize grow height 400px;
# Startup programs
#exec --no-startup-id
exec --no-startup-id nm-applet
exec --no-startup-id feh --bg-fill /http___www.wallpaperfool.com_wp-content_uploads_Art-0002_girl walking on a beach anime.jpg
exec --no-startup-id setxkbmap -layout us,ir -option 'grp:alt_shift_toggle'
exec_always compton -b --config /home/hossein/.config/compton.conf
exec --no-startup-id parcellite
#exec --no-startup-id jupyter-notebook
# Pulse Audio controls
bindsym XF86AudioRaiseVolume exec --no-startup-id amixer set 'Master' 5%+
bindsym XF86AudioLowerVolume exec --no-startup-id amixer set 'Master' 5%-
bindsym XF86AudioMute exec --no-startup-id amixer sset Master toggle
محتویات i3blocks:
# i3blocks config file
command=/usr/lib/i3blocks/$BLOCK_NAME
separator_block_width=15
markup=none
[memory]
label=MEM
separator=true
interval=30
[memory]
label=SWAP
instance=swap
separator=true
interval=30
[iface]
instance=wlan0
color=#00FF00
interval=10
separator=true
[wifi]
label=WIFI
instance=wlp3s0
interval=10
separator=true
[bandwidth]
instance=enp2s0
interval=5
[battery]
label=⚡
command=echo "$(upower -i /org/freedesktop/UPower/devices/battery_BAT0 | grep -E "percentage" | rev | cut -d' ' -f1 | rev)"
interval=30
separator_block_width=14
[disk-root]
label=:
command=/usr/lib/i3blocks/disk /
interval=30
color=#1793D1
#[disk-home]
#label=:
#command=/usr/lib/i3blocks/disk $HOME
#interval=30
#color=#859900
[ssid]
label=
command=echo "$(iw dev wlo1 link | grep SSID | cut -d " " -f 2-)"
color=#d33682
interval=5
[wireless]
instance=wlo1
command=/usr/lib/i3blocks/iface
color=#00FF00
interval=10
[strength]
command=echo "$(iw dev wlo1 link | grep signal | cut -d " " -f 2-)"
interval=10
color=#cb4b16
[temp]
label=
command=echo "$(sensors coretemp-isa-0000 | awk '/Physical/ {print $4}')"
interval=10
color=#b58900
[battery]
command=~/.i3/battery BAT0
interval=30
[load]
label=
command=/usr/lib/i3blocks/load_average
interval=10
color=#6c71c4
[volume]
label=♪
command=/usr/lib/i3blocks/volume
interval=2
signal=10
color=#d70a53
[time]
label=
command=date '+%a %m-%d-%y %l:%M %p'
interval=5
color=#50C878
محتویات bashrc:
#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
alias urxvt='urxvt -bg grey17 -fg grey67 -fn "xft:Mono Space:pixelsize=18" +sb -depth 32 -pr white -uc -bc -sl 100000'
alias ls='ls --color=auto'
alias mocp='mocp -T darkdot_theme'
PS1='[\u@\h \W]\$ '
محتویات Xdefaults:
URxvt.transparent: true
URxvt.tintColor: white
URxvt.shading: 15