arcolinux使用i3wm窗口管理器

2023-05-16

arcolinux使用i3wm窗口管理器

i3wm手册

安装i3 一条命令

sudo pacman -S i3

然后在arcolinux里面自己选择窗口管理器。

arcolinux的文件管理器默认是 dolphin

Dolphin使用就是直接

Dolphin <目标目录>
# 就会自动用类似windows macos 文件管理器打开

1. i3wm配置

arcolinux 使用 ctrl+; 会调出剪贴版历史

archwiki-i3wm

1.1 安装依赖

安装edge浏览器 (使用这个浏览器是因为安装相应插件更快)

yay -S microsoft-edge-dev-bin
# i3 默认启动软件器
sudo pacman -S dmenu
# 启动器类似utool,mac alfred
sudo pacman -S rofi
# install alacritty terminal
sudo pacman -S alacritty	

sample .vimrc

在linux中修改文件是离不开vim,那么我们就需要使用一个好的配置

syntax on
set nu
set rnu
set hlsearch
set incsearch
set ignorecase
set noswapfile
set so=8
set mouse=a

let mapleader=" "
set timeoutlen=500

" I hate click this key
nnoremap H ^
nnoremap L $
vnoremap H ^
vnoremap L $
nnoremap > >>
nnoremap < <<

nnoremap Y y$
nnoremap <leader>h :nohl<cr>
nnoremap <leader>q :qa!<cr>

" use system clipboard
nnoremap <leader>Y "+Y
nnoremap <leader>P "+P
nnoremap <leader>y "+y
nnoremap <leader>p "+p

" auto change input method fcitx5
autocmd InsertLeave * :silent !fcitx5-remote -c " 退出插入模式时禁用输入法
autocmd BufCreate *  :silent !fcitx5-remote -c " 创建 Buf 时禁用输入法
autocmd BufEnter *  :silent !fcitx5-remote -c " 进入 Buf 时禁用输入法
autocmd BufLeave *  :silent !fcitx5-remote -c " 离开 Buf 时禁用输入法

1.3 配置文件

i3wm 配置在 ~/.config/i3/config

# 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 https://i3wm.org/docs/userguide.html for a complete reference!

# mod4 is windows in linux is super
# mod1 is alt
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.
# make this font larger
font pango:monospace 12

# 设置壁纸(根据时间自动更换)
exec_always --no-startup-id ~/feh/feh.sh

# 系统闲置333秒后灭屏,666秒后系统挂起。
exec --no-startup-id xset dpms 333 666
# 登录自动启动软件
# fcitx5输入法
exec --no-startup-id fcitx5
# 终端透明
exec --no-startup-id picom

#设置窗口边框等等
new_window none
new_float normal
hide_edge_borders both

#设置窗口间距
gaps inner 9
gaps outer 10

# 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

# Start XDG autostart .desktop files using dex. See also
# https://wiki.archlinux.org/index.php/XDG_Autostart
exec --no-startup-id dex --autostart --environment i3

# The combination of xss-lock, nm-applet and pactl is a popular choice, so
# they are included here as an example. Modify as you see fit.

# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the
# screen before suspend. Use loginctl lock-session to lock your screen.
exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork

# NetworkManager is the most popular way to manage wireless networks on Linux,
# and nm-applet is a desktop environment-independent system tray GUI for it.
exec --no-startup-id nm-applet

# Use pactl to adjust volume in PulseAudio.
set $refresh_i3status killall -SIGUSR1 i3status
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status

# 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 alacritty

# kill focused window
bindsym $mod+Shift+q kill

# start dmenu (a program launcher)
bindsym $mod+d exec --no-startup-id dmenu_run
# A more modern dmenu replacement is rofi:
# bindcode $mod+40 exec "rofi -modi drun,run -show drun"
# There also is i3-dmenu-desktop which only displays applications shipping a
# .desktop file. It is a wrapper around dmenu, so you need that installed.
# bindcode $mod+40 exec --no-startup-id i3-dmenu-desktop

# change focus
bindsym $mod+h focus left
bindsym $mod+j focus down
bindsym $mod+k focus up
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+h move left
bindsym $mod+Shift+j move down
bindsym $mod+Shift+k move up
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 (like vim vsplit)
bindsym $mod+v split h

# split in vertical orientation (like vim hsplit)
bindsym $mod+g split v

# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen toggle

# use rofi serach exit window application
bindsym $mod+w exec rofi -show window
# use rofi as swicth windows tool
bindsym $mod+s exec "rofi -modi drun,run -show drun"
# use super+space like macos afried
bindsym Mod4+space exec "rofi -modi drun,run -show drun"

# use flameshot to screenshot
bindsym $mod+Shift+a exec "flameshot gui"


# use alt tab to switch recent workspace
bindsym $mod+Tab workspaceback_and_forth

# change container layout (stacked, tabbed, toggle split)
# 上下标签栏(推叠式)
bindsym $mod+Shift+t layout stacking
# 左右标签栏(标签式)
bindsym $mod+t layout tabbed
# 启动i3分屏
bindsym $mod+e layout toggle split

# toggle tiling / floating
bindsym $mod+Shift+f floating toggle

# change focus between tiling / floating windows
# 平铺桌面和浮动桌面进行切换 user super+space
bindsym $mod+space focus mode_toggle

# focus the parent container
bindsym $mod+a focus parent

# focus the child container
#bindsym $mod+d focus child

# Define names for default workspaces for which we configure key bindings later on.
# We use variables to avoid repeating the names in multiple places.
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 number $ws1
bindsym $mod+2 workspace number $ws2
bindsym $mod+3 workspace number $ws3
bindsym $mod+4 workspace number $ws4
bindsym $mod+5 workspace number $ws5
bindsym $mod+6 workspace number $ws6
bindsym $mod+7 workspace number $ws7
bindsym $mod+8 workspace number $ws8
bindsym $mod+9 workspace number $ws9
bindsym $mod+0 workspace number $ws10

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

# 指定在指定窗口启动
assign [class="firefox"] $ws9


# 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 h resize shrink width 10 px or 10 ppt
        bindsym j resize grow height 10 px or 10 ppt
        bindsym k resize shrink height 10 px or 10 ppt
        bindsym l resize grow width 10 px or 10 ppt

        # same bindings, but for the arrow keyshhh
        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 or $mod+r
        bindsym Return mode "default"
        bindsym Escape mode "default"
        bindsym $mod+r 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
        # set i3status on top
        position top
        # set i3status color
        colors {
        background #000000
        statusline #ffffff

        focused_workspace  #ffffff #285577
        active_workspace   #ffffff #333333
        inactive_workspace #888888 #222222
        urgent_workspace   #ffffff #900000
}
}

2. i3status

archwiki-i3status
i3status的配置在 ~/.config/i3status/config

3. rofi

rofi 是一个启动软件用来快速启动应用。

3.1 Install

sudo pacman -S rofi

4. ploybar

5. feh (i3wm 配置壁纸)

feh是个设置桌面壁纸的程序,默认的i3是没有壁纸实在是太难看了,看不下去。

  • install
sudo pacman -S feh

写一个脚本fech.sh脚本来执行自动更换壁纸

#!/bin/sh

while true; do
	find ~/feh-picture -type f \( -name '*.jpg' -o -name '*.png' \) -print0 |
		shuf -n1 -z | xargs -0 feh --bg-scale
	sleep 15m
done

上面的15m是15分钟,你也可以设置15s为15秒。
创建好之后,设置权限。

chmode +x ./feh.sh

然后在i3配置文件里加上这一句:

exec_always --no-startup-id ~/feh/feh.sh

路径就是脚本的路径

两种方法最后都使用$mod+shift+r重启i3就可以了

6. picom 终端透明渲染工具

archwiki-picom

6.1 Install

sudo pacman -S picom

6.2 配置 picom

他的默认配置位置在/etc/xdg/picom.conf,你要先用默认配置可以先:

cp ~/etc/xdg/picom.conf ~/.config/picom/picom.conf

然后在i3的配置文件里加上这么一行,配置自启动。

exec_always --no-startup-id picom 

7. 参考博客

  • ArchLinux下i3wm简单配置和美化
  • i3status配置笔记
  • i3wm美化与配置之使用feh进行随机壁纸的配置并透明化终端
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

arcolinux使用i3wm窗口管理器 的相关文章

随机推荐

  • HTML复选框--checkbox

    在公司实际开发中 xff0c 会经常遇到复选框全选 多选 统计选中个数的情况 xff0c 所以总结研究了一些大神的帖子 xff0c 汇总学习一下 xff01 1 统计被选中复选框的个数 2 点击复选框 xff0c 执行对应函数 3 获取复选
  • 在Ubuntu14.04不能添加PPA源到apt源的问题解决方法

    在Ubuntu14 04使用apt get 更新Git 时 xff0c 需要更新apt源 xff0c 添加一个带有最新Git的源 xff0c 如下命令 xff1a sudo add apt repository ppa git core p
  • android 12 framework开发第53节-Activity的reLaunch及onConfigurationChanged android源码分析

    hi xff0c 同学们大家好 xff01 1 Configuration应用开发背景 今天要给大家分享内容就是我们应用开发时候经常会遇到问题 xff0c 那就是如果系统一些属性变化了 xff0c 比如语言 xff0c 横竖屏幕 xff0c
  • QT 线程,实现生产者-消费者模式

    一 两种启动线程方式 xff1a 1 QThread 2 QObject moveToThread 函数 可以让 调用者的 槽中的代码 xff0c 在单独的线程执行 注 xff1a 如果该对象有 父对象 xff0c 那么它无法被移动 二 线
  • 【easyui学习笔记】3.easyui布局之边框布局

    学习参考 xff1a EasyUI 为网页创建边框布局 建设稍微实用点的界面都离不开布局 xff08 layout xff09 xff0c 我们先来了解最简单的一种布局 xff1a 边框布局 xff08 border layout xff0
  • Android的四种启动模式以及onNewIntent方法

    前言 想起来写这个是因为之前在开发过程中遇到在onStart 方法中使用getIntent 方法无法获取到启动activity时传入的数据 xff0c 也是纳闷了很久 xff0c 然后就决定好好看一下这个地方 xff0c 本文章会结合简单的
  • selenium webdriver 页面css和xpath定位

    对于html来说 xff0c 不管用什么浏览器打开 xff0c 他的架构是不变的 xff0c 所以对于编写自动化测试程序来说 xff0c 基于什么浏览器开发 xff0c 差异不大 xff0c 所以这里推荐使用chrome 65或以后版本浏览
  • Ubuntu 18.04 +Nvidia gtx 1650 显卡驱动安装

    1 Adding this PPA to your system You can update your system with unsupported packages from this untrusted PPA by adding
  • 详解https请求Nginx转发tomcat变成http问题

    概述 分享一个最近处理的nginx转发问题 xff0c 简单记录下 一 问题现象 简单架构为nginx做负载均衡 xff0c 后端用tomcat做容器 浏览器和 Nginx 之间走的 HTTPS 通讯 xff0c 而 Nginx 到 Tom
  • Zookeeper启动出现闪退问题解决

    1 检查环境变量是否配置了JAVA HOME xff0c 若是没有配置 xff0c 需配置才可以 xff08 由于zkEnv cmd文件中使用了JAVA HOME xff09 2 打开zkEnv cmd文件 xff0c 加上pause xf
  • WIN10下全新的部署和映像处理工具DISM

    DISM xff08 Deployment Image Servicing and Management xff09 就是部署映像服务和管理 DISM exe 用于安装 卸载 配置和更新脱机 Windows R 映像和脱机 Windows
  • 富文本显示不全自动省略

    使用富文本时 xff0c 文字一行 xff08 n行 xff09 显示不全 xff0c 末尾文字省略 简介 CGSize maxSize 61 CGSizeMake MAX MAXFLOAT 调整行间距 NSMutableParagraph
  • 普通用户安装管理Keepalived

    普通用户安装管理Keepalived 介绍安装授权给普通用户修改配置文件keepalived 配置检测脚本配置普通用户启动keepalived 介绍 负载均衡 Load Balance xff0c 简称LB 是一种服务或基于硬件设备等实现的
  • Arch Linux 安装小记

    Arch Linux 安装小记 这只是一篇随笔 xff0c 用来记录从全新安装 Arch Linux 开始 xff0c 到在使用过程中各种软件配置的过程 其实对于 Arch Linux 这样滚动更新的 Linux xff0c 很少需要重新安
  • Java Collections的min和max方法

    方法一 public static lt T extends Object amp Comparable lt super T gt gt T min Collection lt extends T gt coll 此方法需要传入一个实现了
  • 【高效工作】Sublime Text 3 美化

    参考 xff1a 炫酷的sublime text3主题 准备一个良好的工作环境会让人更加乐于工作 xff0c 现代的程序猿都有一颗geek的心 xff0c 谁能忍受整天在一个丑陋的UI下coding xff1f xff01 所以今天就简单介
  • oom killer &lmkd killer

    目录 oom killer amp reaper task 进程内存回收 杀进程内存回收 lmkd killer psi vmpressure 事件通知 内核psi 实现 内核vmpressure oom killer amp reaper
  • O 上新增 TaskSnapshot

    任务快照 https source android google cn devices tech perf task snapshots examples and source android P https developer andro
  • 2021.08.29_Android_设备配置改变和Activity处理

    Android设备那些配置会改变 xff1f 34 mcc 34 IMSI 移动国家 地区代码 MCC 发生了变化 检测到了 SIM 并更新了 MCC 34 mnc 34 IMSI 移动网络代码 MNC 发生了变化 检测到了 SIM 并更新
  • arcolinux使用i3wm窗口管理器

    arcolinux使用i3wm窗口管理器 i3wm手册 安装i3 一条命令 sudo pacman S i3 然后在arcolinux里面自己选择窗口管理器 arcolinux的文件管理器默认是 dolphin Dolphin使用就是直接