Skip to content

Latest commit

 

History

History
784 lines (715 loc) · 25 KB

ubuntu.md

File metadata and controls

784 lines (715 loc) · 25 KB

ubuntu

.

  • ubuntu 22
  • ubuntu 24 (current)

settings

appearance

  • config
    • style dark
    • wallpaper jelly fish in black background

ubuntu desktop

  • config
    • desktop icons off
    • auto hide dock on
    • panel mode off
    • icon size max
    • configure dock behavior
      • show trash off
  • config dock pins
    • chromium
    • thunderbird
    • code
    • goldendict
    • solanum
  • config dock application icon
    • -> extensions > ubuntu dock > more > settings > launchers
    • show application icon off

apps

  • -> default apps
  • web chromium web browser
  • mail thunderbird mail
  • calendar calendar
  • music vlc media player
  • video vlc media player
  • photos image viewer

displays

  • desktop icons off
sudo apt install gnome-shell-extension-prefs
  • config
    • nightlight 0 to 0

keyboard

  • use shortcuts
    • close window ctrl q
    • go to home folder super e
    • take screenshot prsc
    • toggle fullscreen f11
    • open terminal ctrl alt t
    • open quick settings super s
    • switch apps super tab
    • switch windows alt tab
    • switch windows in app super backquote

multitasking

  • config
    • workspaces dynamic workspaces
    • number of workspaces 1
    • app switching include apps from the current workspace only
  • use shortcuts
    • switch between workspaces ctrl alt left ctrl alt right
    • move current app between workspaces ctrl shift alt left ctrl shift alt right

date&time

  • config lang en
    sudo localectl set-locale lc_time=en_us.utf8
    

users

  • remove password
    • -> admin:///etc/polkit-1/localauthority/50-local.d/nopw.pkla
      sudo visudo `fira all=(all) nopasswd:all`
      
      [no password prompt]
      identity=unix-group:sudo
      action=*
      resultactive=yes
      
  • disable keyring popup

sound

  • system sound off
  • config
    • alert sound none

power

  • power mode performance
  • automatic screen brightness off
  • dim screen on
  • screen blank 5 min
  • automatic power saver off
  • automatic suspend 20min off
  • power button behavior power off
  • show battery percentage off

privacy

  • -> tmpfile&trash
  • config auto delete files after 30days

fonts

  • install fonts
    • -> git/fonts
  • config preferred cjk fonts
    • (ubuntu 22) -> admin:///etc/fonts/conf.d/64-language-selector-prefer.conf
    • (ubuntu 24) -> admin:///etc/fonts/conf.d/64-language-selector-cjk-prefer.conf
      <?xml version="1.0"?>
      <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
      <fontconfig>
        <alias>
          <family>sans-serif</family>
          <prefer>
            <family>Noto Sans CJK SC</family>
            <family>Noto Sans CJK JP</family>
            <family>Noto Sans CJK KR</family>
            <family>Noto Sans CJK TC</family>
            <family>Noto Sans CJK HK</family>
          </prefer>
        </alias>
        <alias>
          <family>serif</family>
          <prefer>
            <family>Noto Serif CJK SC</family>
            <family>Noto Serif CJK JP</family>
            <family>Noto Serif CJK KR</family>
            <family>Noto Serif CJK TC</family>
          </prefer>
        </alias>
        <alias>
          <family>monospace</family>
          <prefer>
            <family>Noto Sans Mono CJK SC</family>
            <family>Noto Sans Mono CJK JP</family>
            <family>Noto Sans Mono CJK KR</family>
            <family>Noto Sans Mono CJK TC</family>
            <family>Noto Sans Mono CJK HK</family>
          </prefer>
        </alias>
      </fontconfig>

terminal

  • install oh-my-zsh
  • set default sudo chsh -s /bin/zsh

software & updates

  • config source
    • -> /etc/apt/sources.list.d/
  • disable software updater popup
    sudo apt-get remove update-notifier
    
  • disable auto update
    • -> softwares & updates > other softwares
    • * off

software(flatpak)

  • disable auto update
    • -> preferences
    • software updates manual

gnome tweaks

  • config fonts
    • interface text ubuntu sans
    • document text noto sans cjk sc
    • monospace text fira code
  • config mouse and touchpad
    • mouse middle click paste off
    • accelerations on
  • config appearance
    • styles yaru
    • background jellyfish
  • config windows
    • titlebar actions
      • double click toggle maximize
      • middle click none
      • secondary click menu
    • titlebar buttons
      • maximize off
        • use super up or double click instead
      • minimize on
      • placement right
    • click actions
      • attach modal dialogs on
      • center new windows on
      • window action key super
      • resize with secondary click off
    • window click to focus
  • config startup applications
    • chromium
      • env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/chromium_chromium.desktop /snap/bin/chromium %U
    • code
      • /usr/share/code/code %F
    • fcitx5
      • /usr/bin/fcitx5
    • vlc media player
      • env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/vlc_vlc.desktop /snap/bin/vlc %U
    • solanum
      • flatpak run org.gnome.Solanum

backup

  • config
    • storage /backup
    • schedule
      • -> preferences
      • backup automatically on
      • frequency daily
      • keep forever

files

  • add templates
    • -> templates
    • markdown.md
    • cpp.cpp

solanum

  • install
    sudo flatpak install flathub org.gnome.Solanum
    
  • config
    • -> ctrl ,
    • lap length 20
    • short break length 5
    • long break length 40
    • sessions until long break 4

evince(document viewer)

  • use shortcuts
    • f5 toggle presentation mode
    • f9 toggle sidebar
    • d toggle dual page view
    • f fit page
    • w fit width
    • h prev page
    • l next page
    • j scroll page forward
    • k scroll page backward

chromium

code

  • install
    • fix fcitx compatibilty issue
      sudo snap remove code
      curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg
      sudo install -o root -g root -m 644 packages.microsoft.gpg /usr/share/keyrings/
      sudo sh -c 'echo "deb [arch=amd64 signed-by=/usr/share/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'
      sudo apt install apt-transport-https
      sudo apt update
      sudo apt install code
      
  • install theme
  • install extensions
    • wakatime
      • add api key
    • eslint
    • prettier
    • javascript snippets
    • javascript (es6) code snippets
    • markdown all in one
    • code runner
    • wikitext
  • config appearance
    • -> view > appearance
    • menu & status & ... bar off
    • minimap off
    • render control characters off
    • sticky scroll off
    • toggle bread crumbs off
  • config behavior
    • -> file > preferences > settings
    • auto save after delay
      • after delay 100
    • font family "Fira Code", "Noto Sans CJK SC", monospace
    • font ligatures on
    • font size 16
    • git:enabled off
    • lightbulb off
    • render whitespace none
    • tab 2 spaces
    • workspace off
    • extensions: auto update none
    • markdown>extension>theming>decoration:render code span off
    • code-runner:run in terminal on
    • code-runner:preserve focus off
    • code runner:executor map (-> settings.json)
      "code-runner.executormap": {
        // "cpp": "cd $dir && g++ $filename -o $filenamewithoutext && $dir$filenamewithoutext",
        "cpp": "cd $dir && g++ \"$filename\" -o \"$filenamewithoutext\" && \"$dir$filenamewithoutext\"",
      }
      
  • config user snippets
    • -> git/blogging/config/config cpp.code-snippets
    • -> file > preferences > configure snippets
  • use shortcuts
    • -> file > preferences > keyboard shortcuts ctrl shift p open keyboard shortcuts json
    • all roads lead to rome
      • do anything ctrl shift p
      • go to file ctrl p
      • go to line ctrl g
      • go to symbol ctrl t
    • toggle visibility
      • open settings ctrl ,
      • toggle nav bar alt
      • toggle side bar ctrl b
      • toggle panel ctrl alt p
      • toggle terminal in panel ctrl backquote
      • toggle explorer ctrl shift e
      • toggle search ctrl shift f
      • toggle extensions ctrl shift x
    • create files
      • new file ctrl n
      • close file ctrl w
      • save as ctrl alt s
    • move cursor
      • move cursor left ctrl h left
      • move cursor right ctrl l right
      • move cursor down ctrl j down
      • quickInput.next ctrl j down
      • move cursor up ctrl k up
      • quickInput.previous ctrl k down
      • move cursor word left ctrl alt h alt h ctrl left
      • move cursor word right ctrl alt l alt l ctrl right
      • add cursor alt click
      • add cursor below ctrl alt j ctrl shift alt j ctrl shift down
      • add cursor above ctrl alt k ctrl shift alt k ctrl shift up
      • reset cursor esc
      • select next suggestion ctrl j
        • when suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus || suggestWidgetVisible && textInputFocus && !suggestWidgetHasFocusedSuggestion
      • select prev suggestion ctrl k
        • when suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus || suggestWidgetVisible && textInputFocus && !suggestWidgetHasFocusedSuggestion
    • select words
      • select left ctrl shift h shift left
      • select right ctrl shift l shift right
      • select down ctrl shift j ctrl shift down
      • select up ctrl shift k ctrl shift up
      • select word left ctrl shift alt h shift alt h ctrl shift left
      • select word right ctrl shift alt l shift alt l ctrl shift right
      • select line (expand line selection) ctrl shift s
    • edit lines
      • duplicate current line or current selection ctrl d
      • insert line below shift enter
      • insert line above ctrl shift enter
      • indent line tab ctrl ]
        • when !hasNextTabstop && !suggestWidgetVisible
      • outdent line shift tab ctrl [
      • move line down alt j alt down
      • move line up alt k alt up
      • delete to word start ctrl backspace
      • delete to word end ctrl delete
    • zoom perspective
      • shrink code (fold) ctrl shift [ ctrl s
      • expand code (unfold) ctrl shift ] ctrl e
      • zoom in ctrl +
      • zoom out ctrl -
      • split screen ctrl \
    • find and replace
      • rename symbol f2
      • find ctrl f
      • replace ctrl h
        • when findInputFocussed
      • find all references ctrl shift r
      • find symbol in current file ctrl shift o
    • comment code
      • toggle comment ctrl /
      • toggle block comment ctrl shift /
      • add jsdoc comment /** enter
    • format code
      • auto indent and remove redundant spaces (format document) ctrl shift i
    • write markdown
      • preview document ctrl shift v
      • toggle math environment ctrl m
      • toggle strike through alt s
      • toggle task list alt c
      • insert snippet ctrl i
    • run code
      • run code ctrl r
      • stop running in terminal ctrl c
  • remove conflicting shortcuts
    • markdown all in one: toggle bold ctrl b
    • select line ctrl l
    • select all matches ctrl shift l
    • delete line ctrl shift k
    • save as ctrl shift s
    • tab tab
    • save ctrl s
    • Markdown All in One: Toggle Italic ctrl i
    • markdown.extension.onBackspaceKey backspace
    • markdown.extension.onTabKey tab
    • markdown.extension.onShiftTabKey shift tab
    • breadcrumbs.toggleToOn breadcrumbs.focusAndSelect ctrl shift < ctrl shift .
    • breadcrumbs.focus ctrl shift ;

git

fcitx5

  • install app
    sudo apt install fcitx5 fcitx5-chinese-addons fcitx5-frontend-gtk4 fcitx5-frontend-gtk3 fcitx5-frontend-gtk2 fcitx5-frontend-qt5
    
  • install dict
    wget https://github.com/felixonmars/fcitx5-pinyin-zhwiki/releases/download/0.2.4/zhwiki-20220416.dict
    mkdir -p ~/.local/share/fcitx5/pinyin/dictionaries/
    mv zhwiki-20220416.dict ~/.local/share/fcitx5/pinyin/dictionaries/
    
  • install another dict
  • config default
    im-config
    
  • config environment variables
    • -> admin:///etc/environment
      GTK_IM_MODULE=fcitx
      QT_IM_MODULE=fcitx
      XMODIFIERS=@im=fcitx
      SDL_IM_MODULE=fcitx
      GLFW_IM_MODULE=fcitx
      
  • disable input method hint
    • -> fcitx5-configtool > global options > behavior
    • show input method infomation off
  • config english
    • -> input method > pinyin > settings icon
    • trigger hint mode empty
    • trigger hint mode one time empty
  • config pinyin
    • -> input method > pinyin > settings icon
    • fuzzy pinyin on
    • prediction off
    • character half-width
    • enable cloud pinyin off
    • action when switching input method commit current preedit
    • remove all punctuation (-> punctuation > - button on the right)
  • config theme
    git clone https://github.com/tonyfettes/fcitx5-nord.git
    mkdir -p ~/.local/share/fcitx5/themes/
    cd fcitx5-nord
    cp -r Nord-Dark/ Nord-Light/ ~/.local/share/fcitx5/themes/
    
    • -> ~/.config/fcitx5/conf/classicui.conf
      Theme=Nord-Dark
      Theme=Default
      
  • use shortcuts
    • clipboard ctrl ;

thunderbird

  • config mail
    • zoho
    • outlook
    • gmail
    • qq
  • config junk

v2raya

wine

  • install
    sudo dpkg --add-architecture i386
    wget -O - https://dl.winehq.org/wine-builds/winehq.key | sudo apt-key add -
    sudo add-apt-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ jammy main'
    sudo apt update
    sudo apt install --install-recommends winehq-stable
    
  • install libraries
    sudo apt install libasound2-dev
    sudo apt install libfontconfig-dev
    
  • config sound library
    sudo apt install winetricks
    winetricks sound=pulse
    
  • config wine
    winecfg
    

obs

  • config source
    • mic/aux(pulseaudio)
    • screen capsule(pipewire)
    • desktop audio
  • config setting/video
    • output resolution 2560x1600
    • frame rate 60fps //or 30fps

goldendict

vlc

  • config
    • -> tools > preferences
    • show settings all
  • config jump length
    • -> interface > hotkeys settings
    • short jump length 5
  • config interface
    • -> interface > main interfaces > qt
    • show notification popup on track change never
    • continue playback never

qbittorrent

  • config trackers
    • -> tools > preferences > bitorrent
    • automatically add these trackers to new downloads config/list_trackers.md

misc

  • install
    sudo apt install git
    git config --global user.name "Fira"
    git config --global user.email "[email protected]"
    git config --global push.autoSetupRemote true
    git config --global credential.helper store
    sudo apt install cbonsai
    sudo apt install cowsay
    sudo apt install figlet
    sudo apt install flatpak
    sudo apt install fortune
    sudo apt install ghostscript
    sudo apt install gnome-software-plugin-flatpak
    sudo apt install gnome-tweaks
    sudo apt install goldendict
    sudo apt install imagemagick
    sudo apt install neofetch
    sudo apt install nodejs
    sudo apt install npm
    sudo apt install python3
    sudo apt install virtualbox
    sudo apt install zsh
    sudo flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
    sudo flatpak install flathub org.gimp.GIMP
    sudo flatpak install flathub org.gnome.Solanum
    sudo flatpak install flathub org.localsend.localsend_app
    sudo npm config set registry https://registry.npmjs.org/
    sudo npm install -g @wenyan/cli
    sudo npm install -g jsdoc
    sudo npm install -g marked
    sudo npm install -g terser
    sudo snap install android-studio
    sudo snap install blender --classic
    sudo snap install chromium --revision 2842
    sudo snap install docker
    sudo snap install firefox
    sudo snap install gnome-boxes
    sudo snap install inkscape
    sudo snap install kdenlive
    sudo snap install kolourpaint
    sudo snap install krita
    sudo snap install obs-studio
    sudo snap install qbittorrent-arnatious
    sudo snap install telegram-desktop
    sudo snap install thunderbird
    sudo snap install v2raya
    sudo snap install vlc
    
  • install code
    sudo snap remove code
    curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg
    sudo install -o root -g root -m 644 packages.microsoft.gpg /usr/share/keyrings/
    sudo sh -c 'echo "deb [arch=amd64 signed-by=/usr/share/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'
    sudo apt install apt-transport-https
    sudo apt update
    sudo apt install code