i3wm配置笔记

2023-01-31 03:01:55 配置 笔记 i3wm

Http://i3wm.org/docs/userguide.html  用户手册

~/.config/i3/config



# Make the currently focused window a scratchpad
bindsym $mod+Shift+minus move scratchpad
# Show the first scratchpad window
bindsym $mod+minus scratchpad show

执行Win + Shift + - 号将当前窗口移动到scratchpad中, Win + - 号即可调出scratchpad中第一窗口,

此时执行Win + Shift + Space键即可将其恢复成普通窗口


# 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 somewhen, 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
# font for window titles. ISO 10646 = Unicode
#font -misc-dejavu sans-medium-r-nORMal--12-0-0-0-p-0-iso10646-1
font -misc-ar pl uming cn-light-r-normal--12-0-0-0-p-0-iso10646-1
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# start a terminal
#bindsym $mod+Return exec i3-sensible-terminal
bindsym $mod+Return exec gnome-terminal
# kill focused window
bindsym $mod+Shift+Q kill
# start dmenu (a program launcher)
bindsym $mod+d exec dmenu_run
# change focus
#bindsym $mod+j focus left
bindsym $mod+h focus left
#bindsym $mod+k focus down
bindsym $mod+j focus down
#bindsym $mod+l focus up
bindsym $mod+k focus up
#bindsym $mod+semicolon focus right
bindsym $mod+l 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+H move left
#   bindsym $mod+Shift+K move down
bindsym $mod+Shift+J move down
#   bindsym $mod+Shift+L move up
bindsym $mod+Shift+K move up
#   bindsym $mod+Shift+colon move right
bindsym $mod+Shift+L 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
bindsym $mod+g split h
# split in vertical orientation
bindsym $mod+v split v
# 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 the parent container
bindsym $mod+a focus parent
# focus the child container
#bindcode $mod+d focus child
# switch to workspace
bindsym $mod+1 workspace 1
bindsym $mod+2 workspace 2
bindsym $mod+3 workspace 3
bindsym $mod+4 workspace 4
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 container to workspace 1
bindsym $mod+Shift+at move container to workspace 2
bindsym $mod+Shift+numbersign move container to workspace 3
bindsym $mod+Shift+dollar move container to workspace 4
bindsym $mod+Shift+percent move container to workspace 5
bindsym $mod+Shift+asciicircum move container to workspace 6
bindsym $mod+Shift+ampersand move container to workspace 7
bindsym $mod+Shift+asterisk move container to workspace 8
bindsym $mod+Shift+parenleft move container to workspace 9
bindsym $mod+Shift+parenright move container to workspace 10
# 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
## default setting
# new_window <normal|1pixel|none>
new_window 1pixel
default_orientation auto
workspace_layout tabbed
# colorclass border background text indicator
# 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 h resize shrink width 10 px or 10 ppt
        #bindsym k resize grow height 10 px or 10 ppt
        bindsym j resize grow height 10 px or 10 ppt
        #bindsym l resize shrink height 10 px or 10 ppt
        bindsym k resize shrink height 10 px or 10 ppt
        #bindsym semicolon resize grow width 10 px or 10 ppt
        bindsym l resize grow width 10 px or 10 ppt
        # same bindings, but for the arrow keys
#       bindsym 113 resize shrink width 10 px or 10 ppt
#       bindsym 116 resize grow height 10 px or 10 ppt
#       bindsym 111 resize shrink height 10 px or 10 ppt
#       bindsym 114 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"
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
bar {
        position top
#status_command i3status
        colors {
          # Show status text in light blue color
            statusline #ADD8E6
       }
        status_command conky -c ~/MultiConfigDir/conky/conkyrc_i3
#position top
}
#-------------------------------------------------
#bindsym $mod+r exec gmrun
## launcher app
##
bindsym Mod1+Shift+r exec gmrun
bindsym Mod1+Shift+t exec gnome-terminal
#------------------------------------------
#Alt + [ or ] switch workspace
bindsym Mod1+bracketleft workspace prev
bindsym Mod1+bracketright workspace next
#
#bindsym $mod+bracketleft workspace prev
#bindsym $mod+bracketright workspace next
bindsym $mod+bracketleft focus left
bindsym $mod+bracketright focus right
bindsym $mod+Shift+bracketleft move container to workspace prev
bindsym $mod+Shift+bracketright move container to workspace next
#bindsym $mod+Shift+c kill
#bindsym $mod+c exec chromium
bindsym Mod1+Shift+c exec chromium
bindsym Mod1+Shift+f exec firefox
bindsym $mod+Ctrl+l exec i3lock -c 000000
focus_follows_mouse yes
#focus_follows_mouse no
#force_focus_wrapping yes
force_focus_wrapping no
# Make the currently focused window a scratchpad
bindsym $mod+Shift+minus move scratchpad
# Show the first scratchpad window
bindsym $mod+minus scratchpad show
bindsym Mod1+Tab focus left
bindsym $mod+Tab focus up
# focus the child container
#bindcode $mod+d focus child
bindsym $mod+c focus child
bindsym $mod+b workspace back_and_forth
bindsym $mod+grave workspace back_and_forth
#for_window [title="gmrun"] floating enable
for_window [class="Gmrun"] floating enable
#exec xfce4-panel
exec xmodmap ~/.Xmodmap
exec start-pulseaudio-x11


以下为conky配置


### Conky configuration file
## Output is printed to the console -> i3bar
# Modified: 27.11.2011 - mseed : http://www.fastlinux.eu
# Modified: 10.09.2012 - Sagar Behere
## No output to X <yes/no>
out_to_x no
## Create own window to draw <yes/no>
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 3.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
# Free space on /home
#/home ${fs_free /home}
#${color lightgrey}Uptime:$color $uptime ${color lightgrey}- Load:$color $loadavg
${color lightgrey}Uptime:$color $uptime \
${cpugraph cpu1 25,150 32cd32 228b22} ${alignr}${cpugraph cpu2 25,150 32cd32 228b22} \
# Ethernet status
| eth0 ${if_up eth0}${addr eth0}${endif} | \
Down: ${downspeed eth0} ${offset 70}Up: ${upspeed eth0} \
${downspeedgraph eth0 25,150 ff0000 0000ff} $alignr${color darkgreen}${upspeedgraph eth0 25,150 0000ff ff0000} \
# Wireless status
# wlan0 ${if_up wlan0}${addr wlan0}${endif} | \
# CPU stats
CPU ${cpu cpu1}% ${freq_g 1}GHz ${exec sensors | grep "Core 0"|awk '{print $3}'} | \
# RAM in use
${color lightgrey}RAM :$memperc% $mem/$memmax${alignr} Disk IO: ${diskio}/s  \
${color lightgrey}Swap : $swapperc% ${alignr}$swap/$swapmax \
#BATT ${battery BAT0} |
周${time %a %Y-%m-%d} ${time %H:%M} | \
# Weather temperature
#${exec weather --headers="Temperature" -q | awk '/Temperature/ {print $2}'}°C ${exec weather --headers="Sky conditions" -q | awk '/Sky conditions/ {print $3 " " $4}'} | \
# Volume %
#Vol: ${mixer}
音量 ${exec pactl list sinks | awk '/Volume: 0:/ {print substr($3, 1, index($3, "%") - 1)}'}%


相关文章