arch mac : 初期設定 #3 install gui

arch

arch mac : #2 初期設定 まで設定を終わらせてから実行

NetworkManager setting

pacman -S network-manager-applet

一般ユーザーで設定

su username

X11 display

sudo pacman -S xorg-server

xorg-xinit のインストール

sudo pacman -S xorg-xinit

startx で必要

fcitx mozc 日本語環境のインストール

sudo pacman -S fcitx fcitx-gtk3 fcitx-qt5 fcitx-configtool fcitx-mozc

sudo micro /etc/X11/xinit/xinitrc

exec xterm -geometry 80x66+0+0 -name login

↓

# exec xterm -geometry 80x66+0+0 -name login

fcitx &
nm-applet &
exec qtile

一番最後の行を変更 + 追加

fcitx-configtool をクリックするにはshift + クリックで変更可能

startx

この設定を行う事で 一般ユーザーでログインした時に自動で i3 が立ち上がるようになります。

bashについて bashの優先順位について

sudo nano .bash_profile

[[ -f ~/.bashrc ]] && . ~/.bashrc

↓

light -S 10 &

[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && exec startx

light -S 10 & の部分は起動したら、brithtnessを 10% にする

.bash_profile はユーザーがログインした時にだけ実行されるコマンド。この場合は一般ユーザー user がログインした際 bash_profile は startx を実行

xclip

sudo pacman -S xclip

clipbaard

ターミナル sakura terminal

sudo pacman -S sakura

Ctrl <> Cap 変更 (任意)

reference

sudo micro ~/.Xmodmap

remove Lock = Caps_Lock
keysym Caps_Lock = Control_L
add Control = Control_L

caps lock を Ctrl へ変更

キーボード設定

sudo micro /etc/X11/xorg.conf.d/10-keyboard.conf

日本語キーコンフィグをロード

Section "InputClass"
        Identifier "system-keyboard"
        MatchIsKeyboard "on"
        Option "XkbLayout"   "jp,us"
        Option "XkbModel"    "jp106"
EndSection

音量調整 alsa-utils

sudo pacman -S alsa-utils

amixer sset Master mute

ミュート

amixer sset Master unmute

ミュート解除

amixer sset Master 4%-

音量 を 4% 下げる

amixer sset Master 3%+

音量 を 3% 下げる

タッチパッド 3本指ドラック

yay -S xf86-input-mtrack

1

y

N

y

sudo gpasswd -a username input

とても大事 再起動後にも機能を継続

sudo micro /usr/share/X11/xorg.conf.d/50-mtrack.conf

Section "InputClass"
        MatchIsTouchpad "on"
        Identifier      "Touchpads"
        MatchDevicePath "/dev/input/event*"
        Driver          "mtrack"
        # Tweak cursor movement speed with this
        Option          "Sensitivity" "0.10"
        # Pressure at which a finger is detected as a touch
        Option          "FingerHigh" "10"
        # Pressure at which a finger is detected as a release
        Option          "FingerLow" "10"
        # I often use thumb to press down the physical button, so let's not ignore it
        Option          "IgnoreThumb" "true"
        Option          "ThumbRatio" "70"
        Option          "ThumbSize" "25"
        # Ignore palm, with palm takes up to 30% of your touchpad
        Option          "IgnorePalm" "true"
        Option          "PalmSize" "30"
        # Trigger mouse button when tap: 1 finger - left click, 2 finger - right click, 3 - middle click
        Option          "TapButton1" "1"
        Option          "TapButton2" "3"
        Option          "TapButton3" "2"
        Option          "TapButton4" "0"
        Option          "ClickTime" "25"
        Option          "EdgeBottomSize" "25"
        # Disable tap-to-drag, we're using three finger drag instead
        Option          "TapDragEnable" "false"
        # While touching the touchpad with fingers, press the touchpad physical click button
        Option          "ClickFinger0" "1"
        Option          "ClickFinger1" "1"
        Option          "ClickFinger2" "3"
        Option          "ClickFinger3" "2"
        Option          "ButtonMoveEmulate" "false"
        Option          "ButtonIntegrated" "true"
        # The momentum after scroll fingers released
        Option          "ScrollCoastDuration" "300"
        Option          "ScrollCoastEnableSpeed" ".1"
        # scrolling with two fingers
        Option          "ScrollSmooth" "true"
        Option          "ScrollUpButton" "4"
        Option          "ScrollDownButton" "5"
        Option          "ScrollLeftButton" "6"
        Option          "ScrollRightButton" "7"
        # Tweak scroll sensitivity with ScrollDistance, don't touch ScrollSensitivity
        Option          "ScrollDistance" "150"
        Option          "ScrollClickTime" "10"
        # Three finger drag
        Option          "SwipeDistance" "1"
        Option          "SwipeLeftButton" "1"
        Option          "SwipeRightButton" "1"
        Option          "SwipeUpButton" "1"
        Option          "SwipeDownButton" "1"
        Option          "SwipeClickTime" "0"
        Option          "SwipeSensitivity" "1000"
        # Four finger swipe, 8 & 9 are for browsers navigating back and forth respectively
        Option          "Swipe4LeftButton" "9"
        Option          "Swipe4RightButton" "8"
        # Mouse button >= 10 are not used by Xorg, so we'll map them with xbindkeys and xdotool later
        Option          "Swipe4UpButton" "11"
        Option          "Swipe4DownButton" "10"
        # Mouse buttons triggered by 2-finger pinching gesture
        Option          "ScaleDistance" "300"
        Option          "ScaleUpButton" "12"
        Option          "ScaleDownButton" "13"
        # Mouse buttons trigger by 2-finger rotating gesture, disabled to enhance the pinch gesture
        Option          "RotateLeftButton" "0"
        Option          "RotateRightButton" "0"
EndSection

reference

install VScode (任意)

sudo pacman -S code

設定 qtile

公式ドキュメント チートシート

sudo pacman -S qtile

時刻

widget を使うには

sudo pacman -S archlinux-keyring

鍵の更新

qtile を使うには必須

sudo pacman -S python-pip

pip install psutil

qtilebar cpu memory info graph を使う場合必須

mv .config/qtile/config.py .config/qtile/config.py-orgn

もしも qtile に不具合が発生した場合は config.py-orgnconfig.py へ rename

micro ~/.config/qtile/config.py

# qtile 2020/Dec prototype
# http://docs.qtile.org/en/latest/manual/config/keys.html

from typing import List  # noqa: F401

from libqtile import bar, layout, widget
from libqtile.config import Click, Drag, Group, Key, Screen
from libqtile.lazy import lazy
from libqtile.utils import guess_terminal

mod = "mod4"
terminal = guess_terminal()

keys = [
    # Switch between windows in current stack pane
    Key([mod], "Left", lazy.layout.down(),
        desc="Move focus down in stack pane"),
    Key([mod], "Right", lazy.layout.up(),
        desc="Move focus up in stack pane"),
    # Move windows up or down in current stack
    Key([mod, "control"], "Down", lazy.layout.shuffle_down(),
        desc="Move window down in current stack "),
    Key([mod, "control"], "Up", lazy.layout.shuffle_up(),
        desc="Move window up in current stack "),

    # Toggle app
    Key([mod], "Return", lazy.spawn(terminal), desc="Launch terminal"),
    Key([mod, "shift", "control"], "z", lazy.spawn("code")),
    Key([mod, "shift", "control"], "x", lazy.spawn("vivaldi-stable")),
    Key([mod, "shift", "control"], "c", lazy.spawn("thunar")),  

    # Toggle control
    Key([mod], "z", lazy.spawn("amixer sset Master 3%-")),
    Key([mod], "x", lazy.spawn("amixer sset Master 3%+")),
    Key([mod, "shift"], "z", lazy.spawn("amixer set Master mute")),
    Key([mod, "shift"], "x", lazy.spawn("amixer set Master unmute")),

    Key([mod], "c", lazy.spawn("light -U 3")),
    Key([mod], "v", lazy.spawn("light -A 3")),
    Key([mod, "shift"], "c", lazy.spawn("kbdlight down")),
    Key([mod, "shift"], "v", lazy.spawn("kbdlight up")),

    # Switch window focus to other pane(s) of stack
    Key([mod], "space", lazy.layout.next(),
        desc="Switch window focus to other pane(s) of stack"),
    # Toggle between different layouts as defined below
    Key([mod], "Tab", lazy.next_layout(), desc="Toggle between layouts"),
    Key([mod], "Left", lazy.window.toggle_fullscreen(), desc="Toggle between layouts"),
    Key([mod], "Right", lazy.window.toggle_floating(), desc="Toggle between layouts"),

    # Toggle quit
    Key([mod], "q", lazy.restart(), desc="Restart qtile"),
    Key([mod, "shift"], "q", lazy.window.kill(), desc="Kill focused window"),
    Key([mod, "shift", "control"], "q", lazy.shutdown(), desc="Shutdown qtile"),
]

groups = [Group(i) for i in "asdfg"]

for i in groups:
    keys.extend([
        # mod1 + letter of group = switch to group
        Key([mod], i.name, lazy.group[i.name].toscreen(),
            desc="Switch to group {}".format(i.name)),

        # mod1 + shift + letter of group = switch to & move focused window to group
        Key([mod, "shift"], i.name, lazy.window.togroup(i.name, switch_group=True),
            desc="Switch to & move focused window to group {}".format(i.name)),
        # Or, use below if you prefer not to switch to that group.
        # # mod1 + shift + letter of group = move focused window to group
        # Key([mod, "shift"], i.name, lazy.window.togroup(i.name),
        #     desc="move focused window to group {}".format(i.name)),
    ])

layouts = [
    layout.Max(),
    # layout.Stack(num_stacks=2),
    # Try more layouts by unleashing below layouts.
    # layout.Bsp(),
    # layout.Columns(),
    # layout.Matrix(),
    # layout.MonadTall(),
    # layout.MonadWide(),
    # layout.RatioTile(),
    layout.Tile(),
    # layout.TreeTab(),
    # layout.VerticalTile(),
    # layout.Zoomy(),
]

widget_defaults = dict(
    font='hackgen-r',
    fontsize=12,
    padding=3,
)
extension_defaults = widget_defaults.copy()

screens = [
    Screen(
        bottom=bar.Bar(
            [
                widget.CurrentLayout(),
                widget.GroupBox(),
                widget.Prompt(),
                widget.WindowName(),
                widget.TextBox("default config", name="default"),
                widget.Volume(name="vol"),
                widget.Backlight(backlight_name="intel_backlight"),
                widget.Net(interface="wlp3s0"),
                widget.CPUGraph(),
                widget.MemoryGraph(),
                widget.Battery(),
                widget.Systray(),
                widget.Clock(format='%k:%M.%S(%a)%d/%b/%y'),
                # widget.QuickExit(),
            ],
            24,
        ),
    ),
]

# Drag floating layouts.
mouse = [
    Drag([mod], "Button1", lazy.window.set_position_floating(),
        start=lazy.window.get_position()),
    Drag([mod], "Button3", lazy.window.set_size_floating(),
        start=lazy.window.get_size()),
    Click([mod], "Button2", lazy.window.bring_to_front())
]

dgroups_key_binder = None
dgroups_app_rules = []  # type: List
main = None  # WARNING: this is deprecated and will be removed soon
follow_mouse_focus = True
bring_front_click = False
cursor_warp = False
floating_layout = layout.Floating(float_rules=[
    # Run the utility of `xprop` to see the wm class and name of an X client.
    {'wmclass': 'confirm'},
    {'wmclass': 'dialog'},
    {'wmclass': 'download'},
    {'wmclass': 'error'},
    {'wmclass': 'file_progress'},
    {'wmclass': 'notification'},
    {'wmclass': 'splash'},
    {'wmclass': 'toolbar'},
    {'wmclass': 'confirmreset'},  # gitk
    {'wmclass': 'makebranch'},  # gitk
    {'wmclass': 'maketag'},  # gitk
    {'wname': 'branchdialog'},  # gitk
    {'wname': 'pinentry'},  # GPG key password entry
    {'wmclass': 'ssh-askpass'},  # ssh-askpass
])
auto_fullscreen = True
focus_on_window_activation = "smart"

# XXX: Gasp! We're lying here. In fact, nobody really uses or cares about this
# string besides java UI toolkits; you can see several discussions on the
# mailing lists, GitHub issues, and other WM documentation that suggest setting
# this string if your java app doesn't work correctly. We may as well just lie
# and say that we're a working one by default.
#
# We choose LG3D to maximize irony: it is a 3D non-reparenting WM written in
# java that happens to be on java's whitelist.
wmname = "LG3D"

qtile チートシート

## move Tile | タイル移動
com + a                | move tile a | タイル移動
com + s                | move tile s | タイル移動
com + d                | move tile d | タイル移動
com + f                | move tile f | タイル移動
com + g                | move tile g | タイル移動
com + Ctrl + [asdfg]   | move app    | 選択アプリを移動 

## app  | アプリ
com + q                | Reload qtile | リロード Qtile
com + Shift + q        | Close app    | アプリ終了
com + Shift + Ctrl + q | Sign out     | サインアウト

com + Enter            | Start Sakura editor | ターミナル起動
com + Shift + Ctrl + z | Start VScode        | VScode起動
com + Shift + Ctrl + x | Start Vivaldi       | Vivaldi起動
com + Shift + Ctrl + c | Start Thunar        | ファイル起動

## Volume brightness
com + z                | Volume Down             | 音量ダウン
com + x                | Volume UP               | 音量アップ
com + Shift + z        | Volume mute             | 消音
com + Shift + x        | Volume Unmute           | 消音解除
com + c                | Backlight Down          | バックライト光度ダウン
com + v                | Backlight UP            | バックライト光度アップ
com + Shift + z        | Keyboard Backlight Down | キーボードバックライト光度ダウン
com + Shift + x        | Keyboard Backlight UP   | キーボードバックライト光度アップ

## app movement
com + tab                | Chenge fullscreen and Tile | フルスクリーン/タイルモード
com + ↓                  | Switch app Down            | 同タイル内での選択アプリ変更
com + ↑                  | Switch app Up              | 同タイル内での選択アプリ変更
com + Ctrl + ↓           | Move app Down              | 同タイル内でのアプリ変更
com + Ctrl + ↑           | Move app Up                | 同タイル内でのアプリ変更
com + Ctrl + ←           | app Fullscreen             | 選択アプリをフルスクリーン
com + Ctrl + →           | app Floating               | 選択アプリをフローティング
com + mouse press + move | app Floating               | 選択アプリをフローティング

Install thunar

sudo pacman -S thunar

.ssh 設定 (任意)

sudo pacman -S openssh

/dev/sda4 .ssh を ドキュメントルートにコピー (Only for me)

chmod -R u+xr,go-rwx ~/.ssh

Font hackgen

hackgen info

git clone https://github.com/yuru7/HackGen.git

sudo mkdir /usr/share/font/hackgen

sudo cp HackGen/build/HackGenConsole-Regular.ttf /usr/share/fonts/hackgen/hackgen-r.ttf

sudo cp HackGen/build/HackGenConsole-Bold.ttf /usr/share/fonts/hackgen/hackgen-b.ttf

vivaldi インストール (任意)

yay -S vivaldi

7 ttf-ibm-plex

font (後で消します)

y

font 削除

vivaldi をインストールしたら

cd /usr/share/fonts/

sudo rm -r ****

hackgen 以外の全てのfont を削除

バックアップ (任意)

Arch linux バックアップ

thank you

最後までご覧いただきありがとうございました。参考になれば幸いです

いつも助けてくださってありがとうございます

amazon ギフト券 買って助けてあげるよリンク

これからもお役に立てる情報を更新します。皆さんのお助けに飛び跳ねて喜びます。ありがとうございます。