arcolinux使用i3wm窗口管理器
生活随笔
收集整理的這篇文章主要介紹了
arcolinux使用i3wm窗口管理器
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
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 alacrittysample .vimrc
在linux中修改文件是離不開vim,那么我們就需要使用一個好的配置
syntax on set nu set rnu set hlsearch set incsearch set ignorecase set noswapfile set so=8 set mouse=alet 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 pptbindsym j resize grow height 10 px or 10 pptbindsym k resize shrink height 10 px or 10 pptbindsym l resize grow width 10 px or 10 ppt# same bindings, but for the arrow keyshhhbindsym Left resize shrink width 10 px or 10 pptbindsym Down resize grow height 10 px or 10 pptbindsym Up resize shrink height 10 px or 10 pptbindsym Right resize grow width 10 px or 10 ppt# back to normal: Enter or Escape or $mod+rbindsym 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 topposition top# set i3status colorcolors {background #000000statusline #fffffffocused_workspace #ffffff #285577active_workspace #ffffff #333333inactive_workspace #888888 #222222urgent_workspace #ffffff #900000 } }2. i3status
archwiki-i3status
i3status的配置在 ~/.config/i3status/config
3. rofi
rofi 是一個啟動軟件用來快速啟動應用。
3.1 Install
sudo pacman -S rofi4. ploybar
5. feh (i3wm 配置壁紙)
feh是個設置桌面壁紙的程序,默認的i3是沒有壁紙實在是太難看了,看不下去。
- install
寫一個腳本fech.sh腳本來執行自動更換壁紙
#!/bin/shwhile true; dofind ~/feh-picture -type f \( -name '*.jpg' -o -name '*.png' \) -print0 |shuf -n1 -z | xargs -0 feh --bg-scalesleep 15m done上面的15m是15分鐘,你也可以設置15s為15秒。
創建好之后,設置權限。
然后在i3配置文件里加上這一句:
exec_always --no-startup-id ~/feh/feh.sh路徑就是腳本的路徑
兩種方法最后都使用$mod+shift+r重啟i3就可以了
6. picom 終端透明渲染工具
archwiki-picom
6.1 Install
sudo pacman -S picom6.2 配置 picom
他的默認配置位置在/etc/xdg/picom.conf,你要先用默認配置可以先:
cp ~/etc/xdg/picom.conf ~/.config/picom/picom.conf然后在i3的配置文件里加上這么一行,配置自啟動。
exec_always --no-startup-id picom7. 參考博客
- ArchLinux下i3wm簡單配置和美化
- i3status配置筆記
- i3wm美化與配置之使用feh進行隨機壁紙的配置并透明化終端
總結
以上是生活随笔為你收集整理的arcolinux使用i3wm窗口管理器的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 语音处理入门——语音的声学处理
- 下一篇: 广联达文件被锁怎么修复_事无巨细的绕过A