i3 improved tiling wm - upravené konfigurační soubory
Upravená konfigurace pro vývojovou verzi: i3 version 4.1-98-g356d80c (2011-11-27, branch "next").
Vývoj i3wm můžete sledovat na adrese http://code.stapelberg.de/git/i3/log/?h=next
Konfigurace byla testována na distribuci ArchLinux a využívá i3, i3status, i3lock, dmenu, ... Základní informace můžete najít v článku i3 improved tiling wm. Obsah tohoto článku se bude průběžně aktualizovat. Rád přijmu nové nápady a zlepšováky: radek(at)fastlinux(dot)eu.
Užitečné informace:
Uživatelská příručka vývojové verze.
Howto - manuální kompilace i3.
Backtrace Howto.
Konfigurační soubory:
- ~/
~/.Xresources
! --------------------------------------------------------------------- ! Configuration file to set X resources for X client applications. ! Modified: 25.11.2011 : mseed : http://www.fastlinux.eu ! --------------------------------------------------------------------- ! cursor theme ! Xcursor.theme: ComixCursors-Blue-Small URxvt*termName: rxvt ! borderless and no scrollbar URxvt*scrollBar_right: false URxvt*scrollBar: false ! pruhlednost URxvt*inheritPixmap: true URxvt*tintColor: white URxvt*shading:30 ! geometry a font URxvt*font: xft:Terminus:pixelsize=14:style=Regular Urxvt*boldFont: xft:Terminus:pixelsize=14:style=Bold ! klavesy (home a end) URxvt.keysym.Home: \033[1~ URxvt.keysym.End: \033[4~ ! URxvt.urgentOnBell: true ! change default colors (barvy) URxvt*background: #000000 URxvt*foreground: #FFFFFF URxvt*color0: #000000 URxvt*color1: #9e1828 URxvt*color2: #aece92 URxvt*color3: #968a38 URxvt*color4: #0000a8 URxvt*color5: #963c59 URxvt*color6: #418179 URxvt*color7: #bebebe URxvt*color8: #666666 URxvt*color9: #cf6171 URxvt*color10: #c5f779 URxvt*color11: #fff796 URxvt*color12: #4186be URxvt*color13: #cf9ebe URxvt*color14: #71bebe URxvt*color15: #ffffff URxvt.perl-ext-common: default,selection,mark-yank-urls URxvt.urlLauncher: /usr/bin/firefox URxvt.keysym.M-u: perl:mark-yank-urls:activate_mark_mode URxvt.underlineURLs: true xterm*metaSendsEscape: true
› zpět
~/.xinitrc
#!/bin/sh
# This file will be processed after X.Org start
#
# Modified: 27.11.2011 : mseed : http://www.fastlinux.eu
#############
# RESOURCES #
#############
user_resources=$HOME/.Xresources
user_modmap=$HOME/.Xmodmap
sys_resources=/etc/X11/xinit/.Xresources
sys_modmap=/etc/X11/xinit/.Xmodmap
## Merge in defaults and keymaps
[ -f $sys_resources ] && /usr/bin/xrdb -merge $sys_resources
[ -f $sys_modmap ] && /usr/bin/xmodmap $sys_modmap
[ -f $user_resources ] && /usr/bin/xrdb -merge $user_resources
[ -f $user_modmap ] && /usr/bin/xmodmap $user_modmap
## Disable screensaver
xset s off &
## Disable beeps
xset -b &
#########
# FONTS #
#########
## Fonts for X (terminus)
if [ -d /usr/share/fonts/terminus ]; then
xset fp+ /usr/share/fonts/terminus &
elif [ -d /usr/share/fonts/local ]; then
xset fp+ /usr/share/fonts/local &
fi
######################
# KEYBOARD AND MOUSE #
######################
## Keybord layout setting
setxkbmap -layout us,cz -option grp:alt_shift_toggle &
#setxkbmap -layout us,cz -variant qwerty -option grp:alt_shift_toggle &
## C-A-Backspace to kill X
#setxkbmap -option terminate:ctrl_alt_bksp &
## Mouse pointer
#xsetroot -cursor_name left_ptr &
## Turns on the numlock key in X11
numlockx on &
## Hide mousepointer after specified idle time
unclutter -idle 2 &
########
# MISC #
########
## Enable/Disable DPMS for monitor
#xset -dpms
## DPMS monitor setting (standby -> suspend -> off) (seconds)
#xset dpms 300 600 900
## Set LCD brightness to 80%
#xbacklight -set 80 &
## Gamma correction through the X server
#xgamma -gamma 1.1 &
## Desktop background color
#xsetroot -solid '#008282' &
## Composite manager
#xcompmgr -cf -r 0 -D 6 &
## synchronizes the two copy/paste buffers mainly used by X applications
autocutsel -selection PRIMARY -fork
autocutsel -selection SECONDARY -fork
autocutsel -selection CLIPBOARD -fork
############
# WM START #
############
WM="i3"
[[ -n $1 ]] && session=$1 || session=$WM
case $session in
i3)
exec i3;;
i3-debug)
exec /usr/bin/i3 -V -d all > ~/.i3/i3log-$(date +'%F-%k-%M-%S') 2>&1;;
i3-xinerama)
exec i3 --force-xinerama;;
i3-session)
exec ck-launch-session i3;;
openbox)
exec openbox-session;;
*)
exec $session;;
esac
› zpět
~/.xsession
#!/bin/sh # # ~/.xsession # # Executed by xdm/gdm/kdm at login # /bin/bash --login -i ~/.xinitrc
› zpět
~/.zshrc
### ~/.zshrc configuration file
## chsh -s $(which zsh)
# Modified: 29.11.2011 - mseed : http://www.fastlinux.eu
#############
# VARIABLES #
#############
#export LANG=en_US.UTF-8
#export LC_CTYPE=en_US.UTF-8
#export LC_COLLATE=en_US.UTF-8
export EDITOR="geany"
export BROWSER="xxxterm"
export PATH="${PATH}:${HOME}/bin"
#################
# SHELL OPTIONS #
#################
## type the name of a directory -> it will become the current directory
setopt autocd
## lets files beginning with a . be matched without explicitly specifying the dot
setopt globdots
## spelling correction for executed commands
setopt correct
## spelling correction for all arguments
#setopt correctall
## don't beep on errors
setopt nobeep
#################
# SHELL HISTORY #
#################
## location of history
HISTFILE=~/.zsh_histfile
## number of lines kept in history
HISTSIZE='40000'
## number of lines saved in the history after logout
SAVEHIST="${HISTSIZE}"
## prevents the current line from being saved in the history if it is the same as the previous one
setopt histignoredups
## delete duplicates from history when adding new command
#setopt histignorealldups
## prevents the current line from being saved if it begins with a space
setopt histignorespace
## incrementally append history lines
setopt incappendhistory
##########
# PROMPT #
##########
## substitution in the prompt (parameter and arithmetic expansion)
setopt promptsubst
## Automatic prompt configuration - Prompt Themes
#autoload -U promptinit
#promptinit
#prompt walters
## Manual prompt configuration (Load colors and configure prompt)
autoload -U colors
colors
## [user@machine]% dir[~] jobs[0]
if [ $(whoami) = "root" ] ; then
PROMPT="%{$fg_bold[blue]%}[%{$reset_color%}%{$fg_bold[red]%}%n%{$reset_color%}%{$fg_bold[white]%}@%{$reset_color%}%{$fg_bold[blue]%}%m%{$reset_color%}%{$fg_bold[blue]%}]%{$reset_color%}%# "
RPROMPT="%{$fg_bold[blue]%}[%{$reset_color%}%{$fg_bold[blue]%}%~%{$reset_color%}%{$fg_bold[blue]%}]%{$reset_color%} %{$fg_bold[yellow]%}[%{$reset_color%}%{$fg_bold[yellow]%}%j%{$reset_color%}%{$fg_bold[yellow]%}]%{$reset_color%}"
else
PROMPT="%{$fg_bold[blue]%}[%{$reset_color%}%{$fg_bold[green]%}%n%{$reset_color%}%{$fg_bold[white]%}@%{$reset_color%}%{$fg_bold[blue]%}%m%{$reset_color%}%{$fg_bold[blue]%}]%{$reset_color%}%# "
RPROMPT="%{$fg_bold[blue]%}[%{$reset_color%}%{$fg_bold[blue]%}%~%{$reset_color%}%{$fg_bold[blue]%}]%{$reset_color%} %{$fg_bold[yellow]%}[%{$reset_color%}%{$fg_bold[yellow]%}%j%{$reset_color%}%{$fg_bold[yellow]%}]%{$reset_color%}"
fi
##################
# TAB COMPLETION #
##################
## Initialize completion
autoload -U compinit
compinit
## don't cycle completions
#setopt noautomenu
## compact completion lists
#setopt listpacked
## show types in completion
#setopt listtypes
## Take the first part of the path to be exact, and to avoid partial globs.
## (speedup)
#zstyle ':completion:*' accept-exact '*(N)'
## Cache for packages, ...
## (speedup)
#zstyle ':completion:*' use-cache on
#zstyle ':completion:*' cache-path ~/.zsh/cache
## all completion have menu
zstyle ':completion:*:*:*:*:*' menu select
## kill/killall tab completion
zstyle ':completion:*:*:kill:*' menu yes select
zstyle ':completion:*:kill:*' force-list always
## Fuzzy matching of completions for when you mistype them
zstyle ':completion:*' completer _complete _match _approximate
zstyle ':completion:*:match:*' original only
zstyle ':completion:*:approximate:*' max-errors 1 numeric
## cd not select parent dir
#zstyle ':completion:*:cd:*' ignore-parents parent pwd
## completion for pacman (Arch Linux)
zstyle ':completion:*:pacman:*' force-list always
zstyle ':completion:*:*:pacman:*' menu yes select
####################
# JOBS (PROCESSES) #
####################
## display PID on suspend
setopt longlistjobs
## alert if something failed
setopt printexitvalue
## report background processes events immediately
setopt notify
## report background processes status when closing a shell
#setopt nocheckjobs
## don't kill background processes when closing a shell
#setopt nohup
################
# KEY BINDINGS #
################
bindkey "^[[7~" beginning-of-line # Home
bindkey "^[[8~" end-of-line # End
bindkey "^[[3~" delete-char # Del
bindkey "^[[5~" history-beginning-search-backward # PageUp
bindkey "^[[6~" history-beginning-search-forward # PageDown
bindkey "^[[A" up-line-or-history # Up Arrow
bindkey "^[[B" down-line-or-history # Down Arrow
bindkey "^[Oc" forward-word # control + right arrow
bindkey "^[Od" backward-word # control + left arrow
bindkey "^H" backward-kill-word # control + backspace
bindkey "^[[3^" kill-word # control + delete
bindkey "^R" history-incremental-pattern-search-backward # control + r
bindkey "^S" history-incremental-pattern-search-forward # control + s
# completion in the middle of a line
bindkey '^i' expand-or-complete-prefix
###########
# ALIASES #
###########
alias ..='cd ..'
alias ls='ls --color=auto --human-readable --group-directories-first --classify'
alias lsd='ls -ld *(-/DN)'
alias lsa='ls -ld .*'
alias dir='ls -1'
alias cp='nocorrect cp -iv' # no spelling correction
alias mv='nocorrect mv -iv' # no spelling correction
alias rm='nocorrect rm -iv' # no spelling correction
alias mkdir='nocorrect mkdir' # no spelling correction
alias man='nocorrect man' # no spelling correction
alias chmod="chmod -c"
alias chown="chown -c"
alias grep='grep --colour=auto'
alias p='ps -A f -o user,pid,priority,ni,pcpu,pmem,args'
alias mem="free -m"
alias f='find |grep'
alias c="clear"
alias hist="grep '$1' ~/.zsh_histfile"
alias rcp='rsync -v --progress'
alias rmv='rsync -v --progress --remove-source-files'
alias clean='yaourt -Qdt'
alias cleanpkg='yaourt -Scc'
## Auto extension stuff
alias -s html=$BROWSER
alias -s php=$BROWSER
alias -s png=feh
alias -s jpg=feh
alias -s gif=feh
alias -s xls=libreoffice
alias -s doc=libreoffice
alias -s gz='tar -xzvf'
alias -s bz2='tar -xjvf'
alias -s txt=$EDITOR
alias -s PKGBUILD=$EDITOR
› zpět
~/.i3/config
#### Configuration file for i3 window manager (4.x) - next branch ### http://i3wm.org/ ## Please see http://i3wm.org/docs/userguide.html for a complete reference! # Modified: 27.11.2011 : mseed : http://www.fastlinux.eu ################### # GENERAL OPTIONS # ################### ## variables set $mod Mod4 ## font for window titles. ISO 10646 = Unicode #font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1 font -xos4-terminus-*-*-*-*-14-*-*-*-*-*-iso10646-1 #font -misc-fixed-bold-r-normal-*-15-140-75-75-c-90-iso10646-1 ## use Mouse+$mod to drag floating windows to their wanted position floating_modifier $mod ## orientation for new workspacesdefault_orientation horizontal ## workspace Layout workspace_layout default ## focus follows mouse focus_follows_mouse no ## border style for new windows new_window 1pixel ## border style for for floating windows new_float 1pixel ## Automatic back-and-forth when switching to the current workspace workspace_auto_back_and_forth yes ## NOT IMPLEMENTED YET #stack-limit cols 2 ################## # WM KEYBINDINGS # ################## ## 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 exit ## restore saved JSON layout #bindsym $mod+i restore ~/.i3/layout.json ################### # APP KEYBINDINGS # ################### ## start a terminal bindsym $mod+Return exec --no-startup-id urxvt ## start dmenu (a program launcher) bindsym $mod+d exec dmenu_run -nb '#000000' -nf '#ffffff' -sb '#000000' -sf '#1793d0' -p 'Run: ' -fn '-misc-fixed-bold-r-normal-*-15-140-75-75-c-90-iso10646-1' bindsym $mod+x exec dmenu_run -nb '#000000' -nf '#ffffff' -sb '#000000' -sf '#1793d0' -p 'Run: ' -fn '-xos4-terminus-*-*-*-*-20-*-*-*-*-*-iso10646-1' ## start myGtkMenu bindsym Mod1+a exec mygtkmenu ~/.i3/configs/menu ## start session menu bindsym $mod+q exec ~/.i3/scripts/dmenu_session.sh ## take screenshot bindsym Print exec ~/.i3/scripts/screenshot.sh ## OpenVPN connect bindsym $mod+o exec --no-startup-id urxvt -e ~/.i3/scripts/openvpn_start.sh ## open clipbord in editor #bindsym $mod+c exec ~/.i3/scripts/clipper.sh ## mark/goto bindsym $mod+m exec ~/.i3/scripts/dmenu_marks.sh mark bindsym $mod+g exec ~/.i3/scripts/dmenu_marks.sh goto ## volume control #bindsym XF86AudioLowerVolume exec amixer -q set Master 2- unmute #bindsym XF86AudioRaiseVolume exec amixer -q set Master 2+ unmute #bindsym Mod4+XF86AudioLowerVolume exec amixer -q set PCM 2- unmute #bindsym Mod4+XF86AudioRaiseVolume exec amixer -q set PCM 2+ unmute ######### # RULES # ######### ## obxprop | grep WM_CLASS assign [class="Gajim.py"] 2: net for_window [class="Gcolor2"] floating enable for_window [instance="qjackctl"] floating enable for_window [class="qsynth"] floating enable for_window [class="lxappearance"] floating enable for_window [class="Audacious"] floating enable for_window [instance="TeamViewer.exe"] floating enable ###################################### # WORKSPACE KEYBINDINGS AND SETTINGS # ###################################### ## automatically putting workspaces on specific screens workspace "1: term" output LVDS1 workspace "2: net" output LVDS1 workspace "3: work" output VGA1 workspace "4: dev" output VGA1 #workspace 5 output VGA1 #workspace 6 output VGA1 #workspace 7 output VGA1 #workspace 8 output VGA1 #workspace 9 output VGA1 #workspace 10 output LVDS1 ## switch to workspace bindsym $mod+1 workspace 1: term bindsym $mod+2 workspace 2: net bindsym $mod+3 workspace 3: work bindsym $mod+4 workspace 4: dev 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 ## move focused container to workspace bindsym $mod+Shift+exclam move workspace 1: term bindsym $mod+Shift+at move workspace 2: net bindsym $mod+Shift+numbersign move workspace 3: work bindsym $mod+Shift+dollar move workspace 4: dev bindsym $mod+Shift+percent move workspace 5 bindsym $mod+Shift+asciicircum move workspace 6 bindsym $mod+Shift+ampersand move workspace 7 bindsym $mod+Shift+asterisk move workspace 8 bindsym $mod+Shift+parenleft move workspace 9 bindsym $mod+Shift+parenright move workspace 10 ## switch between the current and the previously focused one bindsym Mod1+Tab workspace back_and_forth ## switch to next/prev workspace #bindsym Mod1+Right workspace next #bindsym Mod1+Left workspace prev ###################### # CLIENT KEYBINDINGS # ###################### ## kill focused window bindsym $mod+Shift+Q kill bindsym $mod+c kill ## 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+colon 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 horizontal ## split in vertical orientation bindsym $mod+v split vertical ## enter fullscreen mode for the focused container bindsym $mod+f fullscreen ## change container layout (stacked, tabbed, default) bindsym $mod+s layout stacking bindsym $mod+w layout tabbed bindsym $mod+e layout default ## toggle tiling / floating bindsym $mod+Shift+space floating toggle ## change focus between tiling / floating windows bindsym $mod+space focus mode_toggle ## focus parent container bindsym $mod+u focus parent ## focus the child container #bindcode $mod+d focus child ## focus last floating/tiling container bindsym $mod+Tab focus mode_toggle ## switch between the current and the previously focused one bindsym $mod+b workspace back_and_forth ## resize window (you can also use the mouse for that) mode "resize" { # These bindings trigger as soon as you enter the resize mode # They resize the border in the direction you pressed, e.g. # when pressing left, the window is resized so that it has # more space on its left bindsym j resize shrink left 10 px or 10 ppt bindsym Shift+J resize grow left 10 px or 10 ppt bindsym k resize shrink down 10 px or 10 ppt bindsym Shift+K resize grow down 10 px or 10 ppt bindsym l resize shrink up 10 px or 10 ppt bindsym Shift+L resize grow up 10 px or 10 ppt bindsym semicolon resize shrink right 10 px or 10 ppt bindsym Shift+colon resize grow right 10 px or 10 ppt # same bindings, but for the arrow keys bindsym Left resize shrink left 10 px or 10 ppt bindsym Shift+Left resize grow left 10 px or 10 ppt bindsym Down resize shrink down 10 px or 10 ppt bindsym Shift+Down resize grow down 10 px or 10 ppt bindsym Up resize shrink up 10 px or 10 ppt bindsym Shift+Up resize grow up 10 px or 10 ppt bindsym Right resize shrink right 10 px or 10 ppt bindsym Shift+Right resize grow right 10 px or 10 ppt # back to normal: Enter or Escape bindsym Return mode "default" bindsym Escape mode "default" } bindsym $mod+r mode "resize" ## client border switching bindsym Mod1+t border normal bindsym Mod1+y border 1pixel bindsym Mod1+u border none bindsym Mod1+b border toggle ######### # i3bar # ######### bar { ## Path to i3bar binary #i3bar_command /home/user/bin/i3bar ## Font font -xos4-terminus-*-*-*-*-14-*-*-*-*-*-iso10646-1 #font -misc-fixed-bold-r-normal-*-15-140-75-75-c-90-iso10646-1 ## Display mode #mode hide ## Position position top ## Output(s)
› zpět
~/.i3/configs/conkyrc
### Conky configuration file ## Output is printed to the console -> i3bar # Modified: 27.11.2011 - mseed : http://www.fastlinux.eu ## No output to Xout_to_x no ## Create own window to draw own_window no ## Print everything to console? out_to_console yes ## Use double buffering (reduces flicker, not needed for console output) double_buffer no ## Set to yes if you want Conky to be forked in the background background no ## Update interval in seconds update_interval 5.0 ## This is the number of times Conky will update before quitting. ## Set to zero to run forever. total_run_times 0 ## Shortens units to a single character (kiB->k, GiB->G, etc.). Default is off. short_units yes ## How strict should if_up be when testing an interface for being up? ## The value is one of up, link or address, to check for the interface ## being solely up, being up and having link or being up, having link ## and an assigned IP address. if_up_strictness address ## Add spaces to keep things from moving about? This only affects certain objects. ## use_spacer should have an argument of left, right, or none use_spacer left ## Force UTF8? note that UTF8 support required XFT override_utf8_locale no ## number of cpu samples to average ## set to 1 to disable averaging cpu_avg_samples 2 ## Sensors examples # Top Process: ${top name 1} # Root: {fs_used /}/${fs_size /} /home ${fs_free /home} /${fs_size /home} # Load: ${loadavg 1} ${loadavg 2} ${loadavg 3} # Load: $loadavg # Swap: ${swap}/${swapmax} (${swapperc}%) # Processes: ${running_processes} / ${processes} # CPU: $cpu% # HDD: $diskio_read :Read $diskio_write :Write # Temp: Core0: ${exec sensors | awk '/Core 0/ {print $3}'} Core1: ${exec sensors | awk '/Core 1/ {print $3}'} # Freq: ${freq cpu0}Mhz # Uptime: $uptime # Kernel:$kernel on $machine # Name: $nodename - $sysname # Battery: ${battery_percent BAT0}% ## Stuff after 'TEXT' will be formatted on screen TEXT CPU: ${cpu cpu}% | RAM:$mem/${memmax} ($memperc%) ${if_up eth0}| LAN: ${downspeed eth0} ${upspeed eth0} IP: ${addr eth0} ${endif} | Batt: ${battery_percent BAT0}% | ${time %a %d.%m.%y} ${time %H:%M}
› zpět
~/.i3/configs/i3status
### Configuration file for i3status
## http://i3wm.org/i3status/
# Modified: 15.11.2011 : mseed : http://www.fastlinux.eu
###################
# GENERAL OPTIONS #
###################
general {
colors = true
interval = 5
}
###################
# START AND ORDER #
###################
order += "cpu_usage"
order += "load"
order += "cpu_temperature 0"
order += "run_watch VPN"
order += "wireless wlan0"
order += "ethernet eth0"
order += "volume master"
order += "battery 0"
order += "time"
#order += "ipv6"
#order += "disk /"
#order += "disk /home"
#order += "run_watch DHCP"
###################
# SENSORS SETTING #
###################
## CPU sensor
cpu_usage {
format = "%usage"
}
## system load sensor
load {
format = "%1min"
}
## CPU temperature sensor
cpu_temperature 0 {
format = "T: %degrees °C"
}
## VPN sensor
run_watch VPN {
pidfile = "/var/run/vpnc/pid"
}
## wlan sensor
wireless wlan0 {
format_up = "W: (%quality at %essid) %ip"
format_down = "W: down"
}
## ethernet sensor
ethernet eth0 {
# if you use %speed, i3status requires root privileges
#format_up = "E: %ip (%speed)"
format_up = "E: %ip"
format_down = "E: down"
}
## battery sensor
battery 0 {
format = "%status %percentage %remaining"
last_full_capacity = true
}
## DHCP sensor
run_watch DHCP {
pidfile = "/var/run/dhclient*.pid"
}
## time format
time {
format = "%d.%m.%Y %H:%M"
}
## HDD sensor
disk "/" {
format = "%free"
}
## HDD sensor
disk "/home" {
format = "%free"
}
## audio volume sensor
volume master {
format = "♪: %volume"
device = "default"
mixer = "Master"
mixer_idx = 0
}
› zpět
~/.i3/scripts/clipper.sh
#!/bin/bash # # Simple function that copy clipboard to specified editor # Modified: 28.10.2011 EDITOR="geany" cp /dev/null /tmp/xclipboard && xclip -o > /tmp/xclipboard && $EDITOR /tmp/xclipboard
› zpět
~/.i3/scripts/dmenu_marks.sh
#!/bin/bash
#
# Simple i3wm mark/goto function thrue dmenu and i3-msg
#
# Modified: 27.10.2011 : mseed : http://www.fastlinux.eu
DMENU='dmenu -i -b -nb #000000 -nf #999999 -sb #000000 -sf #31658C -fn -misc-fixed-medium-r-normal-*-*-200-75-75-*-*-iso8859-2'
if [ "$1" == "mark" ]; then
CMD=`$DMENU -p "MARK:" <<< "$name"`
i3-msg mark $CMD
elif [ "$1" == "goto" ]; then
MARKS=`i3-msg -t get_marks | sed -e 's/,/\n/g' -e 's/"//g' -e 's/\[//g' -e 's/\]//g' | $DMENU -p "GOTO:"`
i3-msg [con_mark=\"$MARKS\"] focus
fi
› zpět
~/.i3/scripts/dmenu_session.sh
#!/bin/bash # # Show session menu DMENU='dmenu -i -b -nb #000000 -nf #999999 -sb #000000 -sf #31658C -fn -misc-fixed-medium-r-normal-*-*-200-75-75-*-*-iso8859-2' choice=$(echo -e "lock\nlogout\nsuspend\nreboot\nshutdown" | $DMENU) case "$choice" in lock) i3lock -c 000000 -i ~/.i3/images/login.png & ;; logout) i3-msg exit & ;; suspend) sudo pm-suspend & ;; reboot) sudo /sbin/reboot & ;; shutdown) sudo /sbin/poweroff & ;; esac
› zpět
~/.i3/scripts/dual_monitor.sh
#!/bin/bash # # Dual monitor support if xrandr | grep -q 'VGA1 connected' then xrandr --output LVDS1 --mode 1366x768 --output VGA1 --mode 1920x1080 --right-of LVDS1 fi
› zpět
~/.i3/scripts/openvpn_start.sh
#!/bin/bash # # Openvpn connection terminal sudo /usr/sbin/openvpn --config /etc/openvpn/client.ovpn
› zpět
~/.i3/scripts/screenshot.sh
#!/bin/bash
#
# Take screenshot to specified directory in user home directory and show it thrue image editor
# Modified: 28.10.2011 : mseed : http://www.fastlinux.eu
DIR="Screenshots"
VIEWER="mirage"
if [ ! -d $HOME"/"$DIR ] ; then
mkdir $HOME"/"$DIR
fi
scrot 'shot_%d.%m.%Y_%H.%M.%S.png' -e 'mv $f '$HOME'/'$DIR'/; '$VIEWER' '$HOME'/'$DIR'/$f'
› zpět






















