标签:png scale ble table mono ring ali kill ast
首先增加 vim ~/.xinitrc
[[ -f ~/.Xresources ]] && xrdb -merge ~/.Xresources
# dbus before fcitx
eval `dbus-launch --sh-syntax --exit-with-session`
# use gtk and qt
#export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS=@im=fcitx
# not use gtk and qt
export GTK_IM_MODULE=xim
#export QT_IM_MODULE=xim
#export XMODIFIERS=@im=fcitx
exec i3
然后 查找 i5 480m 属于 gen5, 所以在 make.conf 中增加 VIDEO_CARDS="intel i965", 增加 USE="glamor"
然后 vim /etc/X11/xorg.conf.d/20-modesetting.conf
Section "Device"
Identifier "Intel Graphics"
Driver "modesetting"
Option "AccelMethod" "glamor"
Option "DRI" "3"
EndSection
增加用户到用户组: gpasswd -a ptz video
然后 vim /etc/X11/xorg.conf.d/modesetting.conf
Section "Device"
Identifier "modesetting"
Driver "modesetting"
EndSection
HTML5/VAAPI GPU hangs
Device Drivers --->
[*] IOMMU Hardware Support --->
[*] Support for Intel IOMMU using DMA Remapping Devices
[*] Enable Intel DMA Remapping Devices by default
安装 i3, dmenu, i3status, i3lock, uxvt-unicode, 设置 uxvt-unicode 的 USE=“x11-terms/rxvt-unicode 256-color perl wcwidth xft -vanilla”, google-chrome.
vim ~/.Xresources
! Using XLFD
! URxvt*font: monospace:size=8
! Using Xft
!URxvt*font: xft:wqy-microhei:size=10 monospace:size=8
!URxvt*font: xft:wqy-microhei:size=10
!URxvt*font: xft:Dejavu sans mono:size=10
!URxvt*font: xft:Inconsolata:size=12
!URxvt*font: xft:Inconsolata:size=12:style=Regular:antialias=true, xft:wqy-microhei:size=10:style=Regular:antialias=true
URxvt*font: xft:Inconsolata:size=12:style=Regular:antialias=true, xft:wqy-bitmapsong:size=10:style=Regular:antialias=true
!URxvt*font: xft:Inconsolata:size=12:style=Regular:antialias=true
!URxvt*boldfont: xft:Inconsolata:size=12:style=Bold:antialias=true, xft:wqy-microhei:size=10:style=Bold:antialias=true
URxvt*boldfont: xft:Inconsolata:size=12:style=Bold:antialias=true, xft:wqy-bitmapsong:size=10:style=Bold:antialias=true
Xft.dpi: 96
Xft.antialias: true
Xft.rgba: rgb
Xft.hinting: true
Xft.hintstyle: hintslight
Xft.autohint: false
Xft.lcdfilter: lcddefault
URxvt.scrollBar:true
URxvt.scrollBar_right:true
URxvt.scrollBar_floating:false
URxvt.scrollstyle:rxvt
! input method
URxvt.inputMethod:fcitx
!-*- Perl extensions -*-
URxvt.perl-ext-common: default,selection-to-clipboard,pasta,matcher,keyboard-select
URxvt.keysym.M-u: perl:url-select:select_next
URxvt.url-launcher: /usr/bin/google-chrome-stable
URxvt.underlineURLs: True
URxvt.matcher.button: 1
URxvt.keysym.M-Escape:perl:keyboard-select:activate
URxvt.keysym.Control-Shift-V: perl:pasta:paste
! Comment this if you dont want copy when text is selected
URxvt.clipboard.autocopy: true
! Colors
URxvt*background: #000000
URxvt*foreground: #B2B2B2
! black
URxvt*color0: #000000
URxvt*color8: #686868
! red
URxvt*color1: #B21818
URxvt*color9: #FF5454
! green
URxvt*color2: #18B218
URxvt*color10: #54FF54
! yellow
URxvt*color3: #B26818
URxvt*color11: #FFFF54
! blue
URxvt*color4: #1818B2
URxvt*color12: #5454FF
! purple
URxvt*color5: #B218B2
URxvt*color13: #FF54FF
! cyan
URxvt*color6: #18B2B2
URxvt*color14: #54FFFF
! white
URxvt*color7: #B2B2B2
URxvt*color15: #FFFFFF
vim ~/.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.
#font pango:monospace 8
font pango:wqy-microhei 10
font pango:fontawesome 10
# mod
set $Mod Mod4
# mode
bindsym $Mod+o mode "$mode_launcher"
mode "$mode_launcher" {
bindsym b mode "$mode_browser_launcher"
bindsym e mode "$mode_edit_launcher"
bindsym i mode "$mode_ide_launcher"
bindsym r mode "$mode_read_launcher"
bindsym n mode "$mode_net_launcher"
bindsym f mode "$mode_finance_launcher"
bindsym v mode "$mode_virtual_launcher"
bindsym Escape mode "default"
bindsym Return mode "default"
}
mode "$mode_browser_launcher" {
bindsym c exec google-chrome-stable
bindsym Escape mode "default"
bindsym Return mode "default"
}
mode "$mode_input_launcher" {
bindsym f exec fcitx
bindsym Escape mode "default"
bindsym Return mode "default"
}
mode "$mode_edit_launcher" {
bindsym e exec emacs
bindsym g exec gvim
bindsym l exec libreoffice
bindsym Escape mode "default"
bindsym Return mode "default"
}
mode "$mode_ide_launcher" {
bindsym e exec eclipse-cpp
bindsym q exec qtcreator
bindsym t exec true_studio
bindsym Escape mode "default"
bindsym Return mode "default"
}
mode "$mode_read_launcher" {
bindsym z exec zathura
bindsym Escape mode "default"
bindsym Return mode "default"
}
mode "$mode_net_launcher" {
bindsym i mode "$mode_im_launcher"
bindsym Escape mode "default"
bindsym Return mode "default"
}
mode "$mode_im_launcher" {
bindsym p exec pidgin
bindsym Escape mode "default"
bindsym Return mode "default"
}
mode "$mode_finance_launcher" {
bindsym g exec gnucash
bindsym Escape mode "default"
bindsym Return mode "default"
}
mode "$mode_virtual_launcher" {
bindsym v exec sudo virt-manager
bindsym b exec sudo VirtualBox
bindsym Escape mode "default"
bindsym Return mode "default"
}
# compton
# work with i3 start
exec_always --no-startup-id compton -b
#exec --no-startup-id compton -b
# urxvt daemon
exec_always --no-startup-id urxvtd --quiet --opendisplay --fork
#exec --no-startup-id urxvtd --quiet --opendisplay --fork
# 0-100
bindsym $Mod+Return exec urxvtc -sh 50
#bindsym $Mod+Return exec urxvt
# picture
exec_always --no-startup-id feh --bg-scale "/home/ptz/picture/shortcut_key/emacs_scrot_1.png"
# input
exec_always --no-startup-id fcitx -r
# 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 l
set $down k
set $left j
set $right semicolon
#set $up k
#set $down j
#set $left h
#set $right l
# 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 urxvt
# kill focused window
bindsym $Mod+Shift+q kill
# start dmenu (a program launcher)
bindsym $Mod+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
# change focus
bindsym $Mod+$left focus left
bindsym $Mod+$down focus down
bindsym $Mod+$up focus up
bindsym $Mod+$right 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+$left move left
bindsym $Mod+Shift+$down move down
bindsym $Mod+Shift+$up move up
bindsym $Mod+Shift+$right 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
# move the currently focused window to the scratchpad
bindsym $Mod+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 $Mod+minus scratchpad show
# 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
# 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 $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 $Mod+r mode "resize"
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
bar {
status_command i3status
}
#######################################################################
# 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 i3-config-wizard
vim ~/.bashrc
# /etc/skel/.bashrc
#
# This file is sourced by all *interactive* bash shells on startup,
# including some apparently interactive shells such as scp and rcp
# that can‘t tolerate any output. So make sure this doesn‘t display
# anything or bad things will happen !
# Test for an interactive shell. There is no need to set anything
# past this point for scp and rcp, and it‘s important to refrain from
# outputting anything in those cases.
if [[ $- != *i* ]] ; then
# Shell is non-interactive. Be done now!
return
fi
# Put your fun stuff here.
export PATH="/home/ptz/bin:/home/ptz/opt/gcc-arm-none-eabi/bin:${PATH}"
#export PATH="/home/ptz/bin:${PATH}"
export jlink_path="/home/ptz/opt/JLink_Linux"
export LANG="en_US.UTF-8"
#export LANG="zh_CN.UTF-8"
export LC_CTYPE="zh_CN.UTF-8"
alias rm=‘rm -i‘
alias cp=‘cp -i‘
HISTFILESIZE=2000
HISTSIZE=2000
HISTTIMEFORMAT=‘%F %T ‘
export HISTTIMEFORMAT
# Users that want bash completion with sudo need to run this once.
complete -cf sudo
exec zsh
vim ~/.zshrc
#!/bin/zsh
# https://wiki.gentoo.org/wiki/Zsh/Guide
# Completion
autoload -U compinit
compinit
# improve default completion
zstyle ‘:completion:*:descriptions‘ format ‘%U%B%d%b%u‘
zstyle ‘:completion:*:warnings‘ format ‘%BSorry, no matches for: %d%b‘
# Correction
setopt correctall
# Prompt
autoload -U promptinit
promptinit
prompt gentoo
#export PS1="[%* - %D] %n@%M@%l %d %% "
# History
# include command history support
export HISTSIZE=2000
export HISTFILE="$HOME/.history"
# History won‘t be saved without the following command:
export SAVEHIST=$HISTSIZE
# To prevent history from recording duplicated entries
setopt hist_ignore_all_dups
# A useful trick to prevent particular entries from being recorded into a history by preceding them with at least one space.
setopt hist_ignore_space
# The autocd option can be set to avoid tedious typing of cd command while changing current directory (for example /etc instead of cd /etc).
setopt autocd
# If standard bash-like globbing does not satisfy, extendedglob option may be set to enable extended globbing (one similar to regular expressions).
setopt extendedglob
# https://wiki.gentoo.org/wiki/Zsh
# Enabling Portage completions and Gentoo prompt for zsh
zstyle ‘:completion::complete:*‘ use-cache 1
autoload -U colors && colors
alias rm=‘rm -i‘
alias cp=‘cp -i‘
# https://www.cnblogs.com/bamanzi/p/colorful-shell.html
alias ls=‘ls --color=auto‘
alias grep=‘grep --color=auto‘
# sudo complete
zstyle ‘:completion:*:sudo:*‘ environ PATH="$SUDO_PATH:$PATH"
标签:png scale ble table mono ring ali kill ast
原文地址:https://www.cnblogs.com/ramlife/p/10046842.html