精华内容
下载资源
问答
  • Ubuntu安装i3wm Ubuntu i3wm安装中文输入法

    Ubuntu安装i3wm

    1. 添加最新稳定版的i3wm软件源信息
      在这里插入图片描述
    ~$ su -
    
    ~# /usr/lib/apt/apt-helper download-file https://debian.sur5r.net/i3/pool/main/s/sur5r-keyring/sur5r-keyring_2020.02.03_all.deb keyring.deb SHA256:c5dd35231930e3c8d6a9d9539c846023fe1a08e4b073ef0d2833acd815d80d48
    
    ~# dpkg -i ./keyring.deb 
    
    ~# echo "deb https://debian.sur5r.net/i3/ $(grep '^DISTRIB_CODENAME=' /etc/lsb-release | cut -f2 -d=) universe" >> /etc/apt/sources.list.d/sur5r-i3.list
    
    1. 更新ubuntu本地源信息
      在这里插入图片描述
    ~#apt update
    
    1. 安装i3wm
      在这里插入图片描述
    ~#apt install i3
    
    1. 进入i3wm
      1. 执行reboot重启系统
      2. 选择i3wm作为桌面系统
        在这里插入图片描述

    首次进行效果:
    在这里插入图片描述

    展开全文
  • <p>I attach ~/.xsession-errors</code> generated file <a href="https://github.com/unix121/i3wm-themer/files/2340138/xsession-errors.zip">xsession-errors.zip</a>. <p>It seems a weird error of <code>...
  • 安装的视频教程:https://www.bilibili.com/video/av60766315/​www.bilibili.com成品展示安装 i3wm$ /usr/lib/apt/apt-helper download-file ...

    159909b1c56d041cfdd1c49f919dd310.png

    安装的视频教程:

    https://www.bilibili.com/video/av60766315/www.bilibili.com

    成品展示

    2ad269debbbbea0776da42a913867f73.png

    安装 i3wm

    $ /usr/lib/apt/apt-helper download-file http://debian.sur5r.net/i3/pool/main/s/sur5r-keyring/sur5r-keyring_2019.02.01_all.deb keyring.deb SHA256:176af52de1a976f103f9809920d80d02411ac5e763f695327de9fa6aff23f416
    # dpkg -i ./keyring.deb
    # echo "deb http://debian.sur5r.net/i3/ $(grep '^DISTRIB_CODENAME=' /etc/lsb-release | cut -f2 -d=) universe" >> /etc/apt/sources.list.d/sur5r-i3.list
    # apt update
    # apt install i3

    美化 i3

    美化效果是使用 Github 的一个项目i3-gaps

    项目地址: https://github.com/Airblader/i3

    所需要到的各种依赖

    sudo apt install libxcb1-dev libxcb-keysyms1-dev libpango1.0-dev libxcb-util0-dev libxcb-icccm4-dev libyajl-dev libstartup-notification0-dev libxcb-randr0-dev libev-dev libxcb-cursor-dev libxcb-xinerama0-dev libxcb-xkb-dev libxkbcommon-dev libxkbcommon-x11-dev autoconf xutils-dev libtool 

    安装 i3-gaps 命令

    cd /tmp
    git clone https://www.github.com/Airblader/i3 i3-gaps
    cd i3-gaps
    git checkout gaps && git pull
    autoreconf --force --install
    rm -rf build
    mkdir build
    cd build
    ../configure --prefix=/usr --sysconfdir=/etc
    make
    sudo make install

    期间你可能会遇到缺少 lib 的情况,我把我遇到的问题,还有解决方式说明一下

    Can't exec "aclocal": No such file or directory at /usr/share/autoconf/Autom4te/FileUtils.pm line 326.
    autoreconf: failed to run aclocal: No such file or directory

    解决方式:

    sudo apt-get install automake
    No package 'xcb-xrm' found

    解决方式:

    sudo apt-get install libxcb-xrm-dev
    no Package xcb-shape

    解决方式:

    sudo apt install libxcb-shape0-dev
    No package 'libpcre' found

    解决方式:

    sudo apt-get install libpcre3-dev
    No package 'cairo' found

    解决方式:

    sudo apt-get install libcairo2-dev
    No package 'pangocairo' found

    解决方式:

    sudo apt-get install libpango1.0-dev 

    以下是我的 i3个人配置

    配置地址:https://github.com/itgoyo/i3

    # 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 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 Mod1
    
    # Font for window titles. Will also be used by the bar unless a different font
    # is used in the bar {} block below.
    font pango:monospace 8
    
    # 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.
    
    # 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 layout tabbed exec xfce4-terminal  #支持透明背景,打开即为tabbed布局
    bindsym $mod+Return exec xfce4-terminal  #支持透明背景
    bindsym $mod+control+t exec xfce4-terminal  #支持透明背景
    
    # 快速打开ncmpcpp
    bindsym $mod+n exec xfce4-terminal -e ncmpcpp  #支持透明背景
    # 快速shutter截图
    
    bindsym $mod+control+a exec xfce4-terminal -e shutter  #支持透明背景
    
    
    # kill focused window
    bindsym $mod+Shift+q kill
    
    # start dmenu (a program launcher)
    bindsym $mod+Shift+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
    
    #Rofi启动器
    bindsym $mod+Tab exec --no-startup-id rofi -show window
    bindsym $mod+d exec --no-startup-id rofi -show drun -theme andrea.rasi
    
    bindsym $mod+g exec google-chrome --proxy-server='127.0.0.1:8080'
    
    # 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
    
    # 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+1 move container to workspace 1
    #bindsym $mod+Shift+2 move container to workspace 2
    #bindsym $mod+Shift+3 move container to workspace 3
    #bindsym $mod+Shift+4 move container to workspace 4
    #bindsym $mod+Shift+5 move container to workspace 5
    #bindsym $mod+Shift+6 move container to workspace 6
    #bindsym $mod+Shift+7 move container to workspace 7
    #bindsym $mod+Shift+8 move container to workspace 8
    #bindsym $mod+Shift+9 move container to workspace 9
    #bindsym $mod+Shift+0 move container to workspace 10
    
    
    
    # #---Workspace Bindings---# #
    #bindsym $mod+Home		workspace $ws1
    #bindsym $mod+Shift+Home		move container to workspace $ws1
    #bindsym $mod+End		workspace $ws10
    #bindsym $mod+Shift+End		move container to workspace $ws10
    #bindsym $mod+Prior		workspace prev
    #bindsym $mod+Shift+Prior	move container to workspace prev
    #bindsym $mod+Next		workspace next
    #bindsym $mod+Shift+Next		move container to workspace next
    #bindsym $mod+Tab		workspace back_and_forth
    #bindsym $mod+XF86Back		workspace prev
    #bindsym $mod+Shift+XF86Back	move container to workspace prev
    #bindsym $mod+XF86Forward	workspace next
    #bindsym $mod+Shift+XF86Forward	move container to workspace next
    #bindsym $mod+semicolon		workspace next
    #bindsym $mod+apostrophe		split horizontal ;; exec $term
    #bindsym $mod+slash		split vertical ;; exec $term
    #bindsym $mod+Shift+slash	kill
    #bindsym $mod+backslash		workspace back_and_forth
    
    
    #set $ws1 "1"
    #set $ws2 "2"
    #set $ws3 "3"
    #set $ws4 "4"
    #set $ws5 "5"
    #set $ws6 "6"
    #set $ws7 "7"
    #set $ws8 "8"
    #set $ws9 "9"
    #set $ws10 "10"
    
     set $ws1 "1:"
     set $ws2 "2:"
     set $ws3 "3:"
     set $ws4 "4:"
     set $ws5 "5:"
     set $ws6 "6:"
     set $ws7 "7:"
     set $ws8 "8:"
     set $ws9 "9:"
     set $ws10 "10:"
    
    
    # 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+0		workspace $ws10
    
    
    # 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+0		workspace $ws10
    
    # 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+8	move container to workspace $ws8
    bindsym $mod+Shift+9	move container to workspace $ws9
    bindsym $mod+Shift+0	move container to workspace $ws10
    
    # #---Media Keys---# #
    
    
    # for sound control
    #bindsym XF86AudioRaiseVolume exec amixer set Master playback 5+
    #bindsym XF86AudioLowerVolume exec amixer set Master playback 5-
    #bindsym XF86AudioMute exec amixer set Master toggle
    
    
    bindsym $mod+o exec amixer set Master playback 5-
    bindsym $mod+p exec amixer set Master playback 5+
    #bindsym $mod+o exec amixer set Master toggle
    #bindsym $mod+p exec amixer set PCM toggle
    
    
    
    #打开软件时自动移至相应工作区
    assign [class="i3-sensible-terminal"] $WS1
    assign [class="Firefox"] $WS2
    assign [class="google-chrome"] $W2
    assign [class="google-chrome-stable"] $WS2
    assign [class="chrome"] $WS2
    assign [class="ieaseMusic"] $WS6
    #assign [class="Firefox"] $WS2
    #assign [class="vim"] $WS4
    
    
    
    
    
    # open terminal
    
    #bindsym $mod+Control+t exec i3-sensible-terminal
    
    # ranger  -e  do commands
    bindsym $mod+Control+r exec i3-sensible-terminal -e ranger
    
    # 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 pptobs
            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"
    
    # Start i3bar to display a workspace bar (plus the system information i3status
    # finds out, if available)
    # ******************************************************
    # 系统最早的头部状态
    #bar {
    #        status_command i3status
    #        tray_output primary
    #	position top
    #}
    #********************************************i3-gaps*********************************
    for_window [class="^.*"] border pixel 2
    
    gaps inner 8
    gaps outer 6
    set $mode_gaps Gaps: (o) outer, (i) inner
    set $mode_gaps_outer Outer Gaps: +|-|0 (local), Shift + +|-|0 (global)
    set $mode_gaps_inner Inner Gaps: +|-|0 (local), Shift + +|-|0 (global)
    bindsym $mod+Shift+g mode "$mode_gaps"
    
    mode "$mode_gaps" {
            bindsym o      mode "$mode_gaps_outer"
            bindsym i      mode "$mode_gaps_inner"
            bindsym Return mode "default"
            bindsym Escape mode "default"
    }
    
    mode "$mode_gaps_inner" {
            bindsym plus  gaps inner current plus 1
            bindsym minus gaps inner current minus 1
            bindsym 0     gaps inner current set 0
    
            bindsym Shift+plus  gaps inner all plus 1
            bindsym Shift+minus gaps inner all minus 1
            bindsym Shift+0     gaps inner all set 0
    
            bindsym Return mode "default"
            bindsym Escape mode "default"
    }
    mode "$mode_gaps_outer" {
            bindsym plus  gaps outer current plus 1
            bindsym minus gaps outer current minus 1
            bindsym 0     gaps outer current set 0
    
            bindsym Shift+plus  gaps outer all plus 1
            bindsym Shift+minus gaps outer all minus 1
            bindsym Shift+0     gaps outer all set 0
    
            bindsym Return mode "default"
            bindsym Escape mode "default"
    }
    
    set $mode_power power
    bindsym Mod1+Control+l mode "$mode_power"
    mode "$mode_power" {
        #bindsym l mode "default", exec --no-startup-id /home/itgoyo/.config/i3/i3exit lock
        bindsym l mode "default", exec i3lock-fancy -g
        bindsym e mode "default", exec --no-startup-id /home/itgoyo/.config/i3/i3exit logout
        bindsym s mode "default", exec --no-startup-id /home/itgoyo/.config/i3/i3exit suspend
        bindsym h mode "default", exec --no-startup-id /home/itgoyo/.config/i3/i3exit hibernate
        bindsym r mode "default", exec --no-startup-id /home/itgoyo/.config/i3/i3exit reboot
        bindsym p mode "default", exec --no-startup-id /home/itgoyo/.config/i3/i3exit shutdown
    
        bindsym Return mode "default"
        bindsym Escape mode "default"
    }
    
    
    # Set Xresources colors:
    set_from_resource $darkblack	color0  #000000
    set_from_resource $black	color8  #000000
    set_from_resource $darkred	color1  #000000
    set_from_resource $red		color9  #000000
    set_from_resource $darkgreen	color2  #000000
    set_from_resource $green	color10 #000000
    set_from_resource $darkyellow	color3  #000000
    set_from_resource $yellow	color11 #000000
    set_from_resource $darkblue	color4  #000000
    set_from_resource $blue		color12 #000000
    set_from_resource $darkmagenta	color5  #000000
    set_from_resource $magenta	color13 #000000
    set_from_resource $darkcyan	color6  #000000
    set_from_resource $cyan		color14 #000000
    set_from_resource $darkwhite	color7  #000000
    set_from_resource $white	color15 #000000
    set $transparent		#00000000
    
    #
    #                      #BORDER          BACKGROUND      TEXT            INDICATOR   CHILD_BORDER
    #client.focused          $red            $red            $magenta        $darkmagenta            $darkblue
    #client.unfocused        $transparent    $blue           $white          $darkblue               $darkblack
    #client.focused_inactive $transparent    $blue           $white          $darkblue               $darkblack
    #client.urgent           $darkred        $darkred        $black          $darkred                $darkred
    #client.background $black
    
    
    set $background #10101000
    set $foreground #ffffff
    set $gray       #d0d0d0
    set $secondary  #79D4D5
    set $additional #26CE8D
    set $warning    #E7176A
    
    #set $primary    #F58E8E
    #set $tertiary   #7AABD4
    
    set $primary    #F99157
    set $tertiary   #5c4d4d
    # colors                BORDER      BACKGROUND TEXT        INDICATOR
    client.focused          $primary    $primary   $foreground $primary
    client.focused_inactive $secondary  $secondary $foreground $secondary
    client.unfocused        $tertiary   $tertiary  $background $tertiary
    #client.urgent           $gray       $gray      $foreground $gray
    client.urgent           $darkred        $darkred        $black          $darkred                $darkred
    
    
    
    bar {
    
    
    	font pango:mono 10
    	colors {
    			background $darkblack
    			statusline $darkwhite
    			separator $cyan
    			focused_workspace  $blue $darkblue $darkblack
            		active_workspace   $blue $blue $darkwhite
          			inactive_workspace $darkblack $darkblack $white
            		urgent_workspace   $darkblack $darkblack $white
    		}
    	status_command i3blocks
    	position top
    	mode dock
    	modifier None
    }
    
    
    bar {
      i3bar_command i3bar -t
        height 28
        #禁止systemtray
        tray_output none
        # i3bar调用
        status_command ~/.config/i3/jconky
        # 显示位置top/bottom
        position top
        # 是否隐藏
        #  mode hide
        # 拆解工作区名(隐藏前面的1:2:3:……)
        # strip_workspace_numbers no
        # 定义分隔符∥
        separator_symbol "    "
    
    
    }
    
    
    bindsym $mod+Shift+Escape       exec --no-startup-id prompt "Exit i3?" "i3-msg exit"
    
    # bindsym $mod+BackSpace
    bindsym $mod+Shift+BackSpace    exec --no-startup-id prompt "Reboot computer?" "$reboot"
    
    # compton
    # auto start commands
    exec --no-startup-id fcitx -r
    #exec --no-startup-id fcitx-qimpanel
    exec --no-startup-id sogou-qimpanel
    exec --no-startup-id compton -b
    
    #bindsym $mod+Control+Return exec urxvt -sh 40 #透明参数0-100
    
    
    exec --no-startup-id fcitx-sogoupingyin
    
    
    #Background
    #exec --no-startup-id feh --bg-fill /home/itgoyo/cgi_lib.jpg
    exec --no-startup-id feh --bg-fill /home/itgoyo/图片/bg04.jpg
    #caps:swapescape
    
    
    #开机修改键盘映射
    exec --no-startup-id setxkbmap -option caps:swapescape
    展开全文
  • ubuntu系统配置i3wm窗口管理器

    千次阅读 2019-07-08 23:40:22
    文章目录ubuntu系统配置i3wm窗口管理器前言i3wm的安装i3wm的配置i3wm快捷键配置介绍i3wm配置文件i3configi3status_config 前言 ubuntu系统默认安装的桌面环境是gnome,但是我想换一个窗口管理器,主要是为了好玩,...

    我的简书:https://www.jianshu.com/p/81917864271e

    ubuntu系统配置i3wm窗口管理器

    前言

    ubuntu系统默认安装的桌面环境是gnome,但是我想换一个窗口管理器,主要是为了好玩,如果能将桌面改造的好看一点就更好了。因此我希望选择一些高定制的窗口管理器,例如i3wm,hvwm,awesome等,桌面环境不变 。最后肯定是像标题说的那样选择了i3wm,因为awesome配置比i3wm复杂一些,i3wm也比awesome主流一些,至于hvwm,这个用的人更少了,而且这个窗口管理器也很少更新,所以暂时选择i3wm练手。

    i3wm的安装

    i3wm的安装比较简单,我主要安装了xfce4,i3和lightdm(登录管理)

    sudo apt-get install xfce4
    sudo apt-get install i3
    sudo apt-get install lightdm
    

    经过配置后的桌面效果大致如图所示:
    在这里插入图片描述在这里插入图片描述

    i3wm的配置

    i3wm快捷键配置介绍

    设置windows键为mod键,i3wm中默认Mod1为Alt,Mod4为windows键,如果想让windows键为mod键,可以在配置文件前加一句:set $mod Mod4。我是直接用Mod4配置的一些快捷键。以下是一些常用的快捷键:

    • win+d:打开dmenu
    • win+Enter:新建一个Terimal
    • win+f:窗口全屏
    • win+r:存在多个窗口时,调整窗口大小
    • win+t:新建窗口有标签栏
    • win+y:新建窗口有边框
    • win+u:新建窗口无标签栏无边框
    • win+num:跳转到工作区num
    • win+h:光标移到右边的窗口
    • win+j:光标移到下面的窗口
    • win+k:光标移到上面的窗口
    • win+l:光标移到左边的窗口
    • win+Shift+num:将当前窗口转移到工作区num
    • win+Shift+h:将光标所在的窗口移到右边
    • win+Shift+j:将光标所在的窗口移到下面
    • win+Shift+k:将光标所在的窗口移到上面
    • win+Shift+l:将光标所在的窗口移到左边
    • win+Shift+r:重启i3wm
    • win+Shift+c:重新加载i3wm配置文件
    • win+Shift+e:退出i3wm
    • win+Shift+q:关闭当前窗口
    • win+Shift+f:打开firefox浏览器
    • win+Ctrl+h:下一次新建窗口时,水平分割窗口
    • win+Ctrl+v:下一次新建窗口时,垂直分割窗口
    • Fn+volume+:加音量
    • Fn+volume-:减音量
    • Fn+volumemute:静音

    i3wm配置文件

    i3config

    # i3 config file (v4)
    #
    # Please see https://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.
    font pango:monospace 8
    
    # 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.
    
    # 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+Mod4 to drag floating windows to their wanted position
    floating_modifier Mod4
    
    hide_edge_borders both 
    # start a terminal
    # bindsym Mod4+Return exec i3-sensible-terminal
    # bindsym Mod4+Shift+Return exec i3-sensible-terminal -e ranger
    bindsym Mod4+Return exec alacritty 
    bindsym Mod4+Shift+Return exec alacritty -e ranger
    
    # ==============设置窗口边框=============
    new_window none                         # 普通窗口无边框无标签栏
    # for_window [class=".*"] border pixel 10
    new_float none                          # 悬浮窗口无边框无标签栏
    bindsym Mod4+t border normal 
    bindsym Mod4+y border pixel 10
    bindsym Mod4+u border none
    for_window [window_role="pop-up"] floating enable       # 让弹窗以浮动窗口打开
    for_window [window_role="task_dialog"] floating enable
    # hide_edge_borders both
    
    # kill focused window
    bindsym Mod4+Shift+q kill
    
    # start dmenu (a program launcher)
    # bindsym Mod4+d exec dmenginxnu_run
    bindsym Mod4+d exec --no-startup-id 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 Mod4+d exec --no-startup-id i3-dmenu-desktop
    
    # change focus
    bindsym Mod4+$left focus left
    bindsym Mod4+$down focus down
    bindsym Mod4+$up focus up
    bindsym Mod4+$right focus right
    
    # alternatively, you can use the cursor keys:
    bindsym Mod4+Left focus left
    bindsym Mod4+Down focus down
    bindsym Mod4+Up focus up
    bindsym Mod4+Right focus right
    
    # move focused window
    bindsym Mod4+Shift+$left move left
    bindsym Mod4+Shift+$down move down
    bindsym Mod4+Shift+$up move up
    bindsym Mod4+Shift+$right move right
    
    # alternatively, you can use the cursor keys:
    bindsym Mod4+Shift+Left move left
    bindsym Mod4+Shift+Down move down
    bindsym Mod4+Shift+Up move up
    bindsym Mod4+Shift+Right move right
    
    # split in horizontal orientation
    bindsym Mod4+Ctrl+h split h
    
    # split in vertical orientation
    bindsym Mod4+Ctrl+v split v
    
    # enter fullscreen mode for the focused container
    bindsym Mod4+f fullscreen toggle
    
    # change container layout (stacked, tabbed, toggle split)
    bindsym Mod4+s layout stacking
    bindsym Mod4+w layout tabbed
    bindsym Mod4+e layout toggle split
    
    # toggle tiling / floating
    bindsym Mod4+Shift+space floating toggle
    
    # change focus between tiling / floating windows
    bindsym Mod4+space focus mode_toggle
    
    # focus the parent container
    bindsym Mod4+a focus parent
    
    # focus the child container
    #bindsym Mod4+d focus child
    
    # move the currently focused window to the scratchpad
    bindsym Mod4+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 Mod4+minus scratchpad show
    
    # switch to workspace
    bindsym Mod4+1 workspace "1:Terminal"
    bindsym Mod4+2 workspace "2:Web" 
    bindsym Mod4+3 workspace "3:WPS" 
    bindsym Mod4+4 workspace "4:Spyder" 
    bindsym Mod4+5 workspace "5:MATLAB" 
    bindsym Mod4+6 workspace "6:Other" 
    bindsym Mod4+7 workspace 7
    bindsym Mod4+8 workspace 8
    bindsym Mod4+9 workspace 9 
    bindsym Mod4+0 workspace 10
    
    # move focused container to workspace
    bindsym Mod4+Shift+1 move container to workspace "1:Terminal"
    bindsym Mod4+Shift+2 move container to workspace "2:Web" 
    bindsym Mod4+Shift+3 move container to workspace "3:WPS" 
    bindsym Mod4+Shift+4 move container to workspace "4:Spyder" 
    bindsym Mod4+Shift+5 move container to workspace "5:MATLAB" 
    bindsym Mod4+Shift+6 move container to workspace "6:Other" 
    bindsym Mod4+Shift+7 move container to workspace 7
    bindsym Mod4+Shift+8 move container to workspace 8
    bindsym Mod4+Shift+9 move container to workspace 9
    bindsym Mod4+Shift+0 move container to workspace 10
    
    # =============指定程序打开后出现在指定工作区===============
    assign [class="Firefox"] "2:Web"
    assign [class="(?i)wps"] "3:WPS"
    assign [class="Spyder"] "4:Spyder"
    assign [class="MATLAB"] "5:MATLAB"
    # ===================快捷键启动程序=======================
    bindsym Mod4+Shift+f exec firefox
    bindsym Mod4+Shift+a exec "shutter -s"
    bindsym Mod4+Shift+m exec bash /usr/local/MATLAB/R2018b/bin/matlab -desktop
    bindsym Mod4+Shift+s exec spyder3
    bindsym Mod4+Shift+w exec "wps &"
    bindsym Mod4+Shift+p exec bash ~/Pictures/wallpapers/wallpaper.sh
    # reload the configuration file
    bindsym Mod4+Shift+c reload
    # restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
    bindsym Mod4+Shift+r restart
    # exit i3 (logs you out of your X session)
    bindsym Mod4+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'"
    
    # ========volume control===================
    bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 +5% #increase sound volume
    bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -5% #decrease sound volume
    bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle # mute sound
    
    # 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 $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 Mod4+r mode "resize"
    
    # Start i3bar to display a workspace bar (plus the system information i3status
    # finds out, if available)
    bar {
    #        status_command i3status
    #   i3bar_command i3bar -t
        position top
            status_command i3status --config ~/.i3/i3status/config
        colors {
            background #000000
            statusline #00FF00
    #       separator #B8F788
            separator #00FFFF
            focused_workspace #B8F788 #000000AA
            active_workspace #FFFFFF #FFFFFFAA
            inactive_workspace #AAAAAA #000000AA #AAAAAA
            urgent_workspace #E57B85 #000000AA
        }
    
    }
    
    #######################################################################
    # automatically start i3-config-wizard to offer the user to create a
    # keysym-based config which used their favorite modifier (alt or windows)
    #
    # i3-config-wizard will not launch if there already is a config file
    # in ~/.i3/config.
    #
    # Please remove the following exec line:
    #######################################################################
    # 关闭屏保
    exec --no-startup-id xset s 0
    exec --no-startup-id xset dpms 0 0 0
    # exec_always --no-startup-id xcompmgr -Fcf -nc -t -5 &
    # exec_always --no-startup-id compton
    exec_always compton -b
    # exec_always --no-startup-id feh --bg-fill ~/Pictures/wallpapers/wallpaper02.jpeg
    exec_always --no-startup-id bash ~/Pictures/wallpapers/wallpaper.sh
    exec i3-config-wizard
    
    

    xcompmgr是一个使终端半透明的插件。(gnome自带的Terimal也可以设置透明效果)

    feh是一个图片查看工具,也可以设置壁纸。

    i3status_config

    i3status是桌面顶端的长条状态栏(默认在桌面下方,可设置为上方)

    # i3status configuration file.
    # see "man i3status" for documentation.
    
    # It is important that this file is edited as UTF-8.
    # The following line should contain a sharp s:
    # ß
    # If the above line is not correctly displayed, fix your editor first!
    
    general {
            colors = true
    		color_good = "#1793D0"
    		color_degraded = "#006298"
    		color_bad = "#FF00FF"
            interval = 5
    }
    
    # order += "ipv6"
    order += "disk /"
    order += "wireless _first_"
    order += "ethernet _first_"
    order += "battery all"
    order += "load"
    order += "tztime local"
    
    wireless _first_ {
            format_up = "W: (%quality at %essid) %ip"
            format_down = "W: down"
    }
    
    ethernet _first_ {
            # if you use %speed, i3status requires root privileges
            format_up = "E: %ip (%speed)"
            format_down = "E: down"
    }
    
    battery all {
            format = "%status %percentage %remaining"
    #        format = "%status %percentage"
    }
    
    tztime local {
            format = "%Y-%m-%d %H:%M:%S"
    }
    
    load {
            format = "%1min"
    }
    
    disk "/" {
            format = "%avail / %total"
    #        format = "%free / %total"
    }
    

    随机壁纸

    我自己写了一个比较简单的脚本来从我的壁纸库中随机抽取一张图片作为我的壁纸。因为我壁纸库里的图片都是我自己从网上下载的一些我比较喜欢的图片,因此下载的时候我把图片都命名成了wallpaper+数字+后缀名的形式(wallpaper01.jpg),这样方便我写脚本。目前我壁纸库里有九张壁纸,编号从01-09,所以我新建一个wallpaper.sh的脚本文件,内容如下:

    #!/bin/bash
    
    N=9
    var=wallpaper0$[RANDOM%$N+1].jpg
    feh --bg-fill ~/Pictures/wallpapers/$var
    

    然后我在我i3的config文件中写入以下两条命令:

    bindsym Mod4+Shift+p exec bash ~/Pictures/wallpapers/wallpaper.sh
    exec_always --no-startup-id bash ~/Pictures/wallpapers/wallpaper.sh
    

    这样我每次开机或者按下win+Shift+p就会运行wallpaper.sh这个文件,并为我选取一张幸运壁纸。

    亮度调节

    我安装了一些插件像xbacklight,xfce4-power-manager等,但是都不好使。但是想调节亮度的话也是有办法的。

    # 查看电脑的最大亮度值,我的是800多。不同电脑max_brightness的路径可能不一样,但是一般都在/sys/class/backlight/里面
    cat /sys/class/backlight/intel_backlight/max_brightness
    # 设置你认为合适的亮度值
    sudo tee /sys/class/backlight/intel_backlight/brightness <<< 100
    

    本来写了个脚本来调节亮度,但是绑定键位不成功,也不知道为什么,不过脚本还是可用的。

    # ========================= brightnessUp.sh==============================
    #!/bin/bash
    var1=+50
    var1=$(($var1 + $(cat /sys/class/backlight/intel_backlight/brightness)))
    sudo tee /sys/class/backlight/intel_backlight/brightness <<< $var1
    # ========================= brightnessDown.sh==============================
    #!/bin/bash
    var1=-50
    var1=$(($var1 + $(cat /sys/class/backlight/intel_backlight/brightness)))
    sudo tee /sys/class/backlight/intel_backlight/brightness <<< $var1
    

    ranger文件管理器

    对,下面这个图就是ranger,它可以帮你很快的预览文件
    ranger可以预览文本文件的内容
    wallpaper.sh也可以打开图片
    wallpaper刚开始ranger打开图片大小可能不合适,需要你手动去调节(按上下键)。但是我觉得这样太傻了,如果你想让你的ranger打开图片时像上面那样,刚好可以看清整张图片,你可以修改ranger的配置文件。将图片打开尺寸设置为你电脑屏幕分辨率的一半就可以了。

    ranger --copy-config=all
    cd ~/.config/ranger
    vi rifle.conf
    

    将rifle.conf里的mime ^image, has feh, X, flag f = feh -- "$@"修改为
    mime ^image, has feh, X, flag f = feh -g 683x384 -- "$@"
    因为我电脑屏幕的分辨率为1366x768,所以我设置683x384。

    展开全文
  • ubuntu+i3wm桌面

    万次阅读 2017-01-16 18:37:54
    某天突然看到i3wm,简洁的桌面让我心头激动。 平铺式、全键盘、这感觉应该要飞起来。一、换源emacs /etc/apt/sources.list 中国源sudo apt update二、卸载unity桌面:sudo apt-get remove ubuntu-desktopsudo apt-...

    某天突然看到i3wm,简洁的桌面让我心头激动。
    平铺式、全键盘、这感觉应该要飞起来。

    一、换源

    emacs /etc/apt/sources.list
    中国源

    sudo apt update

    二、卸载unity桌面:

    sudo apt-get remove ubuntu-desktop
    
    sudo apt-get remove unity
    
    sudo apt-get remove  unity-asset-pool 
    
    sudo apt-get remove unity*
    

    三、安装i3wm

    安装xfce4只安装了其核心,提供一些X11基本功能
    sudo apt-get install xfce4
    sudo apt-get install i3
    
    
    登录管理安装:
    sudo apt-get install lightdm

    设置屏幕分辨率(根据自己的喜好)
    xrandr -s 1280x800

    壁纸: feh
    界面字体:lxappearance

    安装字体:

    mkdir -p /etc/share/fonts/<new-dir>
    cp <your font>.ttf /etc/share/fonts/<new-dir> 
    fc-cache -fv

    四、安心写代码吧,这个界面就是干净

    参考网址
    i3wm使用
    i3安装
    debian i3wm可以参考

    展开全文
  • dotfiles:Ubuntu上的i3wm(xubuntumint)
  • Ubuntu20.04+i3wm折腾笔记

    2020-11-27 10:04:20
    最近出差,没事折腾了一下笔记本直接装成了Ubuntu 20.04,顺带研究了下Rime输入法和i3桌面环境,记录一下填坑的过程 触摸板tap-to-click 真不知道该咋翻译这个tap-to-click,反正就是在默认的Gnome环境下,使用触摸板...
  • ubuntu i3wm(初稿)

    2017-07-07 13:57:09
    i3wm快捷键 a Mod d 运行程序,调用 dmenu Mod Enter 创建一个新终端 Mod num 切换到不同工作区 Mod Shift num 后加数字,移动一个窗口到指定工作区 Mod j/k/l/; 移动窗口 Mod Shift j/k/l切换不同窗口位置 Mod r
  • apt-get install xfce4apt-get install i3apt-get install lightdmchoose lightdmreboot and change logon methodfirst time login need to setup mod key, by default is wininstalled all doneKeys to ...
  • Regolith-Desktop-Environment:Ubuntu上基于i3wm的桌面环境

空空如也

空空如也

1 2 3 4 5 ... 7
收藏数 129
精华内容 51
关键字:

i3wmubuntu