错误原因

错误原因

我正在尝试安装 的某个配置i3,但步骤不清楚(什么都不起作用!!)。由于我不是 Ubuntu 的常规用户,所以我需要一点帮助。字体真的很棒,但很难安装:http://dotshare.it/dots/1011/

有人有时间在这一点上帮助我吗?

错误 :

ERROR: CONFIG: Expected one of these tokens: <end>, '#', 'set', 'bindsym', 'bindcode', 'bind', 'bar', 'font', 'mode', 'floating_minimum_size', 'floating_maximum_size', 'floating_modifier', 'default_orientation', 'workspace_layout', 'new_window', 'new_float', 'hide_edge_borders', 'for_window', 'assign', 'no_focus', 'focus_follows_mouse', 'mouse_warping', 'force_focus_wrapping', 'force_xinerama', 'force-xinerama', 'workspace_auto_back_and_forth', 'fake_outputs', 'fake-outputs', 'force_display_urgency_hint', 'focus_on_window_activation', 'show_marks', 'workspace', 'ipc_socket', 'ipc-socket', 'restart_state', 'popup_during_fullscreen', 'exec_always', 'exec', 'client.background', 'client.focused_inactive', 'client.focused', 'client.unfocused', 'client.urgent', 'client.placeholder'
ERROR: CONFIG: (in file /home/jeremie/.config/i3/config)
ERROR: CONFIG: Line  43:     set 12 12
ERROR: CONFIG: Line  44:     set 0 0
ERROR: CONFIG: Line  45:     gaps inner 12
ERROR: CONFIG:               ^^^^^^^^^^^^^
ERROR: CONFIG: Line  46:     gaps outer 0
ERROR: CONFIG: Line  47: 
ERROR: CONFIG: Expected one of these tokens: <end>, '#', 'set', 'bindsym', 'bindcode', 'bind', 'bar', 'font', 'mode', 'floating_minimum_size', 'floating_maximum_size', 'floating_modifier', 'default_orientation', 'workspace_layout', 'new_window', 'new_float', 'hide_edge_borders', 'for_window', 'assign', 'no_focus', 'focus_follows_mouse', 'mouse_warping', 'force_focus_wrapping', 'force_xinerama', 'force-xinerama', 'workspace_auto_back_and_forth', 'fake_outputs', 'fake-outputs', 'force_display_urgency_hint', 'focus_on_window_activation', 'show_marks', 'workspace', 'ipc_socket', 'ipc-socket', 'restart_state', 'popup_during_fullscreen', 'exec_always', 'exec', 'client.background', 'client.focused_inactive', 'client.focused', 'client.unfocused', 'client.urgent', 'client.placeholder'
ERROR: CONFIG: (in file /home/jeremie/.config/i3/config)
ERROR: CONFIG: Line  44:     set 0 0
ERROR: CONFIG: Line  45:     gaps inner 12
ERROR: CONFIG: Line  46:     gaps outer 0
ERROR: CONFIG:               ^^^^^^^^^^^^
ERROR: CONFIG: Line  47: 
ERROR: CONFIG: Line  48:     set I I
ERROR: FYI: You are using i3 version 4.12 (2016-03-06, branch "4.12")
ERROR: You did not specify required configuration option "font"
ERROR: Received ConfigureNotify for unknown window 0x00600000
ERROR: Received ExposeEvent for unknown window 0x00600000
ERROR: Received ExposeEvent for unknown window 0x00600000
ERROR: Received ExposeEvent for unknown window 0x00600000
ERROR: Received ConfigureNotify for unknown window 0x00600000
ERROR: Received ConfigureNotify for unknown window 0x00600003
ERROR: Received ExposeEvent for unknown window 0x00600003
ERROR: Received ConfigureNotify for unknown window 0x00600003

我的.config/i3/config文件:

# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
#
# This config file uses keycodes (bindsym) and was written for the QWERTY
# layout.
#
# To get a config file with the same key positions, but for your current
# layout, use the i3-config-wizard
#

# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
# 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.

### THEME ###

set $FOCUS #989898
set $UNFOCUS #3c3b37

# Layout colors         bord    bg      text    indicator (split)
client.focused          $FOCUS $FOCUS $FOCUS $FOCUS
client.focused_inactive $UNFOCUS $UNFOCUS $UNFOCUS $UNFOCUS
client.unfocused        $UNFOCUS $UNFOCUS $UNFOCUS $UNFOCUS
client.urgent           $FOCUS $FOCUS $FOCUS $FOCUS
client.background       $UNFOCUS

### Borders ###
new_window pixel 4
new_float pixel 4

focus_follows_mouse no

### Gaps ###
set $default_gaps_inner 12
set $default_gaps_outer 0
gaps inner $default_gaps_inner
gaps outer $default_gaps_outer

set $ws1 I
set $ws2 II
set $ws3 III
set $ws4 IV
set $ws5 V
set $ws6 VI
set $ws7 VII
set $ws8 VIII
set $ws9 IX
set $ws10 X


# use these keys for focus, movement, and resize directions when reaching for
# the arrows is not convenient
set $up k
set $down j
set $left h
set $right l

# use Mouse+Mod1 to drag floating windows to their wanted position
floating_modifier Mod1

# start a terminal
bindsym Mod1+Return exec --no-startup-id urxvt

# kill focused window
bindsym Mod1+q kill

# start dmenu (a program launcher)
#bindsym Mod1+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 Mod1+d exec --no-startup-id i3-dmenu-desktop

# change focus
bindsym Mod1+$left focus left
bindsym Mod1+$down focus down
bindsym Mod1+$up focus up
bindsym Mod1+$right focus right

# alternatively, you can use the cursor keys:
bindsym Mod1+Left focus left
bindsym Mod1+Down focus down
bindsym Mod1+Up focus up
bindsym Mod1+Right focus right

# move focused window
bindsym Mod1+Shift+$left move left
bindsym Mod1+Shift+$down move down
bindsym Mod1+Shift+$up move up
bindsym Mod1+Shift+$right move right

# alternatively, you can use the cursor keys:
bindsym Mod1+Shift+Left move left
bindsym Mod1+Shift+Down move down
bindsym Mod1+Shift+Up move up
bindsym Mod1+Shift+Right move right

# split in horizontal orientation
bindsym Mod1+c split h

# split in vertical orientation
bindsym Mod1+v split v

# enter fullscreen mode for the focused container
bindsym Mod1+f fullscreen

# change container layout (stacked, tabbed, toggle split)
bindsym Mod1+s layout stacking
bindsym Mod1+w layout tabbed
bindsym Mod1+e layout toggle split

# toggle tiling / floating
bindsym Mod1+Shift+space floating toggle

# change focus between tiling / floating windows
bindsym Mod1+space focus mode_toggle

# focus the parent container
bindsym Mod1+a focus parent

# focus the child container
#bindsym Mod1+d focus child

# move the currently focused window to the scratchpad
bindsym Mod1+Shift+minus move scratchpad

# Show the next scratchpad window or hide the focused scratchpad window.
# If there are multiple scratchpad windows, this command cycles through them.
bindsym Mod1+minus scratchpad show

# switch to workspace
bindsym Mod1+1 workspace $ws1
bindsym Mod1+2 workspace $ws2
bindsym Mod1+3 workspace $ws3
bindsym Mod1+4 workspace $ws4
bindsym Mod1+5 workspace $ws5
bindsym Mod1+6 workspace $ws6
bindsym Mod1+7 workspace $ws7
bindsym Mod1+8 workspace $ws8
bindsym Mod1+9 workspace $ws9
bindsym Mod1+0 workspace $ws10

# move focused container to workspace
bindsym Mod1+Shift+1 move container to workspace $ws1
bindsym Mod1+Shift+2 move container to workspace $ws2
bindsym Mod1+Shift+3 move container to workspace $ws3
bindsym Mod1+Shift+4 move container to workspace $ws4
bindsym Mod1+Shift+5 move container to workspace $ws5
bindsym Mod1+Shift+6 move container to workspace $ws6
bindsym Mod1+Shift+7 move container to workspace $ws7
bindsym Mod1+Shift+8 move container to workspace $ws8
bindsym Mod1+Shift+9 move container to workspace $ws9
bindsym Mod1+Shift+0 move container to workspace $ws10

# reload the configuration file
bindsym Mod1+Shift+c reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym Mod1+Shift+r restart
# exit i3 (logs you out of your X session)
bindsym Mod1+Shift+e exec --no-startup-id  "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 down will grow the window’s height.
    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

# 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 Mod1+r mode "resize"

### Shortcuts ###
bindsym XF86AudioRaiseVolume exec --no-startup-id amixer -c 1 sset 'Master' 5%+
bindsym XF86AudioLowerVolume exec --no-startup-id amixer -c 1 sset 'Master' 5%-
bindsym XF86AudioMute exec --no-startup-id amixer sset 'Master' toggle
bindsym XF86AudioPlay exec --no-startup-id playcontrols toggle
bindsym XF86AudioStop exec --no-startup-id playcontrols stop
bindsym XF86AudioPrev exec --no-startup-id playcontrols prev
bindsym XF86AudioNext exec --no-startup-id playcontrols next
bindsym XF86Calculator exec --no-startup-id gnome-calculator 
bindsym XF86TouchpadToggle exec --no-startup-id /home/luca/Documenti/toggletouchpad

bindsym Mod4+F12 exec --no-startup-id amixer -c 1 sset 'Master' 5%+
bindsym Mod4+F11 exec --no-startup-id amixer -c 1 sset 'Master' 5%-
bindsym Mod4+F10 exec --no-startup-id amixer sset 'Master' toggle
bindsym Mod4+Down exec --no-startup-id playcontrols toggle
bindsym Mod4+Up exec --no-startup-id playcontrols stop
bindsym Mod4+Left exec --no-startup-id playcontrols prev
bindsym Mod4+Right exec --no-startup-id playcontrols next
bindsym Mod4+KP_Enter exec --no-startup-id gnome-calculator 
bindsym Mod4+F9 exec --no-startup-id /home/luca/Documenti/toggletouchpad

bindsym Mod1+shift+g exec --no-startup-id geany
bindsym Mod1+p exec --no-startup-id pcmanfm
bindsym Mod1+shift+a exec --no-startup-id audacious
bindsym Mod1+shift+n exec --no-startup-id urxvt -name ncmpcpp -e ncmpcpp -s playlist 
bindsym Mod1+shift+f exec --no-startup-id urxvt -name ranger -e ranger
bindsym Mod1+shift+v exec --no-startup-id vlc
bindsym Mod1+shift+s exec --no-startup-id spotify --ui.track_notifications_enabled=false
bindsym Mod1+shift+i exec --no-startup-id icedove
bindsym Mod1+shift+b exec --no-startup-id iceweasel
bindsym Mod1+shift+p exec --no-startup-id urxvt -name games-launcher -e /home/luca/Documenti/games.sh
bindsym Mod1+Print exec --no-startup-id scrot 'Schermata%Y-%m-%d-%T.png' -e 'mv $f ~/Immagini/'

assign [class="Audacious"] $ws6
assign [class="Vlc"] $ws6
assign [class="Iceweasel"] $ws1
assign [class="Telegram"] $ws2
assign [class="Spotify"] $ws6
assign [class="pidgin"] $ws2
assign [class="URxvt" instance="ncmpcpp"] $ws3
assign [class="URxvt" instance="tty-clock"] $ws3
assign [class="URxvt" instance="mcabber"] $ws2


### floating windows ###
for_window [class="Steam"] floating enable
for_window [class="Gimp"] floating enable
for_window [class="PlayOnLinux"] floating enable
for_window [class="URxvt" instance="games-launcher$"] move to workspace $ws5, floating enable , move absolute position 400px 200px


### Exec ###
exec --no-startup-id compton -bG --config ~/.config/compton.conf 

exec --no-startup-id iceweasel 
exec --no-startup-id conky -c ~/.config/panel/empty_conky 
exec --no-startup-id i3-msg 'workspace $ws3'
exec --no-startup-id mkfontdir ~/.local/share/fonts && xset +fp ~/.local/share/fonts && xset fp rehash && ~/.config/panel/bar_config
exec --no-startup-id ~/Telegram
exec --no-startup-id sh ~/.fehbg
exec --no-startup-id mpd
exec --no-startup-id urxvt -name ncmpcpp -e ncmpcpp -s playlist
exec --no-startup-id urxvt -name tty-clock -e tty-clock -C 2 -c -d 20000000000
exec --no-startup-id xinput disable 'ETPS/2 Elantech Touchpad' 
exec --no-startup-id xinput set-prop 'USB Optical Mouse' 261 0.8
exec --no-startup-id sleep 3 && urxvt -name mcabber -e mcabbert

谢谢!

答案1

错误原因

似乎您正在尝试使用配置文件i3-间隙带有“香草”i3i3-间隙i3,其主要特点是能够在平铺窗口之间留有间隙。为了实现这一点,i3-间隙gaps配置设置等。当然,这个设置在官方版本中是没有的i3,因此出现错误消息。

如果你i3-wm从 Ubuntu 存储库或上文提到的某个存储库安装i3 主页,然后你就得到了正式版的i3

快速解决方案

如果您只想摆脱错误消息,基本上有两种方法可以做到这一点:

  • 删除/注释掉这五行

    ### Gaps ###
    set $default_gaps_inner 12
    set $default_gaps_outer 0
    gaps inner $default_gaps_inner
    gaps outer $default_gaps_outer
    

    结果应该与官方版本兼容i3但它可能看上去并不像预期的那样。

  • 安装i3-间隙,在 Ubuntu 上可能意味着你必须自己编译。看看i3-gaps 维基百科了解更多信息。

选择哪一个取决于您对窗口之间留有间隙有多重要。如果您真的不需要它们,我建议安装i3来自上述稳定的 Ubuntu 存储库这里

较慢(但可能更好)的解决方案

我个人建议不要使用外国i3配置文件(或任何其他程序)没有至少很好地查看过它们,原因如下:

  • 安全/保障: i3具有使用 运行任意命令的内置能力exec。例如:您复制的配置文件尝试禁用某种类型的触摸板:

    exec --no-startup-id xinput disable 'ETPS/2 Elantech Touchpad'
    

    如果您的触摸板具有相同的名称但您实际上想要使用它,这可能会带来不便。

  • 依赖项:作为i3只是一个窗口管理器,人们倾向于用各种工具来补充它。例如,上面的配置尝试直接或通过快捷方式加载以下程序:amixer,,,,,,,,,,,,,,,,,,,,,,。playcontrolsgnome-calculatorgeanypcmanfmaudaciousncmpcppvlcurxvtspotifyicedoveiceweaselscrotconkyTelegrammpdmcabbertty-clockcompton

    您的机器上可能没有安装其中任何一个。即使安装了,您也可能实际上不想启动它们。compton例如,甚至可能导致某些显卡和/或驱动程序出现问题。

  • 可用性 i3配置往往非常个性化。对别人有用的东西,对你来说可能几乎用不了。i3配置不仅仅是主题;它们还定义快捷方式,可以为程序配置默认工作区,并且 - 如前所述 - 可以自动启动其他应用程序。此外,在大多数情况下i3没有默认行为,最值得注意的是每个快捷方式都需要在配置中定义。此外i3-酒吧,通常会列出所有工作区,需要明确启用。

我建议从原始配置文件开始,看一下i3用户手册然后修改配置直到i3(或者 *i3-gaps,如果您愿意)可以工作并且看起来就像您想要的那样。i3有很多功能,其中许多功能甚至在默认配置中都没有启用(或者就此而言,上面的例子)。当然,没有理由不看看其他人的配置文件以获得一些灵感(甚至可能复制一些部分彻底地)。

相关内容