AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-282376

kadekai's questions

Martin Hope
kadekai
Asked: 2019-12-19 05:17:08 +0800 CST

从游侠文件管理器中删除最左边的列

  • 4

有一种方法可以删除最右边的列:

# Preview files on the rightmost column?
# And collapse (shrink) the last column if there is nothing to preview?
set preview_files false
set preview_directories false
set collapse_preview true

但是如何删除显示父目录的最左边的列?

我知道我可以set viewmode=multipane用来获取单列。但在这种情况下,当我使用两个选项卡时,我会在同一个屏幕中为两个选项卡获得两列。我希望每个选项卡都有一个屏幕,但我希望每个屏幕都由单列组成。我该如何做到这一点?

ranger
  • 2 个回答
  • 682 Views
Martin Hope
kadekai
Asked: 2019-10-18 19:00:08 +0800 CST

某些工作区快捷方式在 Xfce 中不起作用

  • 2

我有四个工作区和八个更改工作区的快捷方式。快捷键如下。

工作区快捷方式

我在 Xfce 面板中以 2x2 网格排列了四个工作区,如下所示。

工作区和工作区切换器

即使我可以使用 + 和 + 切换工作区,但我无法Super使用←+Super和+切换工作→区Super↑Super↓

如何再次使用快捷方式切换到上下工作区?

keyboard-shortcuts
  • 2 个回答
  • 1003 Views
Martin Hope
kadekai
Asked: 2019-08-25 04:04:30 +0800 CST

使用 xclip 将图像复制到剪贴板无法正常工作

  • 7

所以,我尝试了以下

xclip -se c -t image/png -i imagefile.jpg

这确实将图像复制到剪贴板,我可以将其粘贴到gimp中,或将其粘贴到新的图像文件中,如下所示。

xclip -se c -t image/png -o > newimage.jpg

但是,当我尝试粘贴以这种方式复制的图像时,我无法将其粘贴到 Facebook Messenger 或帖子中。这是为什么?我该如何解决这个问题?

注意我使用 xfce4-screenshooter,它有一个选项可以将屏幕截图保存到剪贴板。如果我使用它,我可以将该图像数据粘贴到 Facebook Messenger 和帖子中。所以,这一定是我的过程或xclip本身的问题。xfce4-screenshooter 使用什么?

images clipboard
  • 1 个回答
  • 2914 Views
Martin Hope
kadekai
Asked: 2019-05-21 05:31:13 +0800 CST

如果在将文件符号链接到该目录时该目录不存在,则创建该目录

  • 1

假设我想像以下命令一样进行符号链接:

ln -s /home/user/dots/cmus/cmus.theme /home/user/cmus/cmus.theme

但是要使上述命令起作用,我需要确保该目录/home/user/cmus已经存在。否则会出错。有没有办法解决这个问题mkdir -p?

为了使我的问题清楚,我将放下我的用例。我想创建一个 shell 脚本,它将我的点文件符号链接到适当的位置。到目前为止,我有以下内容:

DIR=$HOME/projects/dotFiles

DOTFILES=(
    "bin"
    ".bashrc"
    ".bash_profile"
    ".gitconfig"
    ".profile"
    ".tmux.conf"
    ".xinitrc"
    ".config/cmus/cmus.theme"
    ".config/compton.conf"
    ".config/dunst"
    ".config/feh"
    ".config/mpv"
    ".config/nvim"
    ".config/ranger"
    ".local/share/fonts"
)

for dotfile in "${DOTFILES[@]}";do
    rm -rf "${HOME}/${dotfile}"
    ln -sf "${DIR}/${dotfile}" "${HOME}/${dotfile}"
done

但是,我不知道如何在不事先明确创建目录的情况下解决我指定的问题。

symlink
  • 1 个回答
  • 474 Views
Martin Hope
kadekai
Asked: 2019-05-15 06:22:11 +0800 CST

使用 fzf 启动文件的默认应用程序

  • 1

fzf有一些键绑定,下面列出了其中一些作为示例:

  • Alt-C :cd进入所选目录
  • Ctrl-T :选择一个文件

我想添加一个键标,以便我可以使用 fzf 启动选定的文件,也许使用xdg-openor mimeopen。

fzf
  • 1 个回答
  • 567 Views
Martin Hope
kadekai
Asked: 2019-03-04 05:06:02 +0800 CST

拆分 Tmux 窗口模拟 vim 的 nosplitbelow 和 nosplitright 行为

  • 0

Tmux 具有正常的键绑定来水平和垂直拆分终端。但它会在当前活动窗格的右侧和下方拆分。有没有办法拆分当前活动窗格,以便新窗格在当前活动窗格的左侧和上方生成?

tmux split
  • 1 个回答
  • 87 Views
Martin Hope
kadekai
Asked: 2019-03-02 01:21:21 +0800 CST

将字形从另一种字体修补到一种字体中

  • 0

我有一个为我从这个存储库下载的电力线修补的 monaco 字体。现在对于许可问题,此字体没有免费版本。无论如何,我使用 tmuxU+2502作为垂直分割的分隔符。现在,我拥有的 monaco 字体没有这个字形。

我有另一种字体,官方最新版本的Inconsolata,它有一个漂亮的字形版本。不久前我遇到了这篇文章,其中一个答案是使用 fontforge 或类似的字体编辑器手动修补具有该字形的字体。

如何将一个字形从另一种字体添加到一种字体?

fonts unicode
  • 1 个回答
  • 428 Views
Martin Hope
kadekai
Asked: 2019-01-29 06:23:42 +0800 CST

>/dev/null 2>&1 & 和 </dev/null &>/dev/null & 之间的区别

  • 6

我一直在使用以下从终端启动程序:

program_name >/dev/null 2>&1 &

但是最近我遇到了这个网页,推荐了以下方法:

program_name </dev/null &>/dev/null &

现在,我知道第一个是什么意思了。这意味着将stderr 指向stdout 并将stdout 指向/dev/null,即stderr 和stdout 现在都指向null。

但是第二个是什么意思?哪一个更适合从终端无头启动程序?

terminal launcher
  • 2 个回答
  • 5795 Views
Martin Hope
kadekai
Asked: 2019-01-18 05:33:44 +0800 CST

启动应用程序时如何分配 WM_CLASS

  • 0

我正在使用 mupdf-gl,并且使用xprop我没有得到WM_CLASS. 但如果我使用 mupdf-x11,我会得到WM_CLASS.

mupdf-gl 的 xprop 的输出:

_NET_WM_DESKTOP(CARDINAL) = 2
_NET_WM_STATE(ATOM) =
WM_STATE(WM_STATE):
                window state: Normal
                icon window: 0x0
_NET_WM_PID(CARDINAL) = 12656
WM_PROTOCOLS(ATOM): protocols  WM_DELETE_WINDOW
WM_LOCALE_NAME(STRING) = "en_US.UTF-8"
WM_HINTS(WM_HINTS):
                Initial state is Normal State.
WM_NORMAL_HINTS(WM_SIZE_HINTS):
                user specified size: 1088 by 1668
WM_CLIENT_MACHINE(STRING) = "elariel"
WM_ICON_NAME(STRING) = "EEE Transformer CT.pdf - 1 / 4"
WM_NAME(STRING) = "EEE Transformer CT.pdf - 1 / 4"

mupdf-x11 的 xprop 的输出:

WM_STATE(WM_STATE):
                window state: Normal
                icon window: 0x0
_NET_WM_DESKTOP(CARDINAL) = 2
_NET_WM_NAME(UTF8_STRING) = "EEE Transformer CT.pdf - 1/4 (96 dpi)"
WM_LOCALE_NAME(STRING) = "C"
WM_CLIENT_MACHINE(STRING) = "elariel"
WM_ICON_NAME(STRING) = "EEE Transformer CT.pdf - 1/4 (96 dpi)"
WM_NAME(STRING) = "EEE Transformer CT.pdf - 1/4 (96 dpi)"
WM_PROTOCOLS(ATOM): protocols  WM_DELETE_WINDOW
WM_CLASS(STRING) = "mupdf", "MuPDF"
WM_HINTS(WM_HINTS):
                bitmap id # to use for icon: 0x2800091
                bitmap id # of mask for icon: 0x2800093

启动时如何将 WM_CLASS 分配给窗口?

xorg xdotool
  • 2 个回答
  • 4818 Views
Martin Hope
kadekai
Asked: 2018-11-04 19:44:45 +0800 CST

如何在 ST 上自定义键绑定,即简单/无垃圾终端?

  • 5

这是我的相应部分config.h:

/* Internal keyboard shortcuts. */
#define MODKEY Mod1Mask
#define TERMMOD (ControlMask|ShiftMask)

static Shortcut shortcuts[] = {
    /* mask                 keysym          function        argument */
    { XK_ANY_MOD,           XK_Break,       sendbreak,      {.i =  0} },
    { ControlMask,          XK_Print,       toggleprinter,  {.i =  0} },
    { ShiftMask,            XK_Print,       printscreen,    {.i =  0} },
    { XK_ANY_MOD,           XK_Print,       printsel,       {.i =  0} },
    { TERMMOD,              XK_Prior,       zoom,           {.f = +1} },
    { TERMMOD,              XK_Next,        zoom,           {.f = -1} },
    { TERMMOD,              XK_Home,        zoomreset,      {.f =  0} },
    { TERMMOD,              XK_C,           clipcopy,       {.i =  0} },
    { TERMMOD,              XK_V,           clippaste,      {.i =  0} },
    { TERMMOD,              XK_Y,           selpaste,       {.i =  0} },
    { TERMMOD,              XK_Num_Lock,    numlock,        {.i =  0} },
};

现在,专栏的目的是什么argument?

keyboard-shortcuts
  • 1 个回答
  • 3272 Views
Martin Hope
kadekai
Asked: 2018-08-23 09:50:09 +0800 CST

i3wm [官方 ubuntu 版本] 窗口全屏时屏幕随机冻结

  • 2

我在 Ubuntu 18.04 的 i3wm 中使用 compton 与此配置进行合成:

#                            _
#   ___ ___  _ __ ___  _ __ | |_ ___  _ __
#  / __/ _ \| '_ ` _ \| '_ \| __/ _ \| '_ \
# | (__ (_) | | | | | | |_) | |_ (_) | | | |
#  \___\___/|_| |_| |_| .__/ \__\___/|_| |_|
#                     |_|

#################################
#
# Backend
#
#################################

# Backend to use: "xrender" or "glx".
# GLX backend is typically much faster but depends on a sane driver.
backend = "glx";

#################################
#
# GLX backend
#
#################################

glx-no-stencil = true;

# GLX backend: Copy unmodified regions from front buffer instead of redrawing them all.
# My tests with nvidia-drivers show a 10% decrease in performance when the whole screen is modified,
# but a 20% increase when only 1/4 is.
# My tests on nouveau show terrible slowdown.
# Useful with --glx-swap-method, as well.
glx-copy-from-front = false;

# GLX backend: Use MESA_copy_sub_buffer to do partial screen update.
# My tests on nouveau shows a 200% performance boost when only 1/4 of the screen is updated.
# May break VSync and is not available on some drivers.
# Overrides --glx-copy-from-front.
# glx-use-copysubbuffermesa = true;

# GLX backend: Avoid rebinding pixmap on window damage.
# Probably could improve performance on rapid window content changes, but is known to break things on some drivers (LLVMpipe).
# Recommended if it works.
# glx-no-rebind-pixmap = true;


# GLX backend: GLX buffer swap method we assume.
# Could be undefined (0), copy (1), exchange (2), 3-6, or buffer-age (-1).
# undefined is the slowest and the safest, and the default value.
# copy is fastest, but may fail on some drivers,
# 2-6 are gradually slower but safer (6 is still faster than 0).
# Usually, double buffer means 2, triple buffer means 3.
# buffer-age means auto-detect using GLX_EXT_buffer_age, supported by some drivers.
# Useless with --glx-use-copysubbuffermesa.
# Partially breaks --resize-damage.
# Defaults to undefined.
glx-swap-method = "undefined";

#################################
#
# Shadows
#
#################################

# Enabled client-side shadows on windows.
shadow = true;
# Don't draw shadows on DND windows.
no-dnd-shadow = true;
# Avoid drawing shadows on dock/panel windows.
no-dock-shadow = true;
# Zero the part of the shadow's mask behind the window. Fix some weirdness with ARGB windows.
clear-shadow = true;
# The blur radius for shadows. (default 12)
shadow-radius = 5;
# The left offset for shadows. (default -15)
shadow-offset-x = -5;
# The top offset for shadows. (default -15)
shadow-offset-y = -5;
# The translucency for shadows. (default .75)
shadow-opacity = 0.5;

# Set if you want different colour shadows
# shadow-red = 0.0;
# shadow-green = 0.0;
# shadow-blue = 0.0;

# The shadow exclude options are helpful if you have shadows enabled. Due to the way compton draws its shadows, certain applications will have visual glitches
# (most applications are fine, only apps that do weird things with xshapes or argb are affected).
# This list includes all the affected apps I found in my testing. The "! name~=''" part excludes shadows on any "Unknown" windows, this prevents a visual glitch with the XFWM alt tab switcher.
shadow-exclude = [
    "! name~=''",
    "name = 'Notification'",
    "name = 'Plank'",
    "name = 'Docky'",
    "name = 'Kupfer'",
    "name = 'xfce4-notifyd'",
    "name *= 'VLC'",
    "name *= 'compton'",
    "name *= 'Chromium'",
    "name *= 'Chrome'",
    "name *= 'Firefox'",
    "class_g = 'Conky'",
    "class_g = 'Kupfer'",
    "class_g = 'Synapse'",
    "class_g ?= 'Notify-osd'",
    "class_g ?= 'Cairo-dock'",
    "class_g ?= 'Xfce4-notifyd'",
    "class_g ?= 'Xfce4-power-manager'"
];
# Avoid drawing shadow on all shaped windows (see also: --detect-rounded-corners)
shadow-ignore-shaped = false;

#################################
#
# Opacity
#
#################################

menu-opacity = 1;
inactive-opacity = 1;
active-opacity = 1;
frame-opacity = 1;
inactive-opacity-override = false;
alpha-step = 0.06;

# Dim inactive windows. (0.0 - 1.0)
# inactive-dim = 0.2;
# Do not let dimness adjust based on window opacity.
# inactive-dim-fixed = true;
# Blur background of transparent windows. Bad performance with X Render backend. GLX backend is preferred.
# blur-background = true;
# Blur background of opaque windows with transparent frames as well.
# blur-background-frame = true;
# Do not let blur radius adjust based on window opacity.
blur-background-fixed = false;
blur-background-exclude = [
    "window_type = 'dock'",
    "window_type = 'desktop'"
];

#################################
#
# Fading
#
#################################

# Fade windows during opacity changes.
fading = true;
# The time between steps in a fade in milliseconds. (default 10).
fade-delta = 4;
# Opacity change between steps while fading in. (default 0.028).
fade-in-step = 0.03;
# Opacity change between steps while fading out. (default 0.03).
fade-out-step = 0.03;
# Fade windows in/out when opening/closing
# no-fading-openclose = true;

# Specify a list of conditions of windows that should not be faded.
fade-exclude = [ ];

#################################
#
# Other
#
#################################

# Try to detect WM windows and mark them as active.
mark-wmwin-focused = true;
# Mark all non-WM but override-redirect windows active (e.g. menus).
mark-ovredir-focused = true;
# Use EWMH _NET_WM_ACTIVE_WINDOW to determine which window is focused instead of using FocusIn/Out events.
# Usually more reliable but depends on a EWMH-compliant WM.
use-ewmh-active-win = true;
# Detect rounded corners and treat them as rectangular when --shadow-ignore-shaped is on.
detect-rounded-corners = true;

# Detect _NET_WM_OPACITY on client windows, useful for window managers not passing _NET_WM_OPACITY of client windows to frame windows.
# This prevents opacity being ignored for some apps.
# For example without this enabled my xfce4-notifyd is 100% opacity no matter what.
detect-client-opacity = true;

# Specify refresh rate of the screen.
# If not specified or 0, compton will try detecting this with X RandR extension.
refresh-rate = 0;

# Set VSync method. VSync methods currently available:
# none: No VSync
# drm: VSync with DRM_IOCTL_WAIT_VBLANK. May only work on some drivers.
# opengl: Try to VSync with SGI_video_sync OpenGL extension. Only work on some drivers.
# opengl-oml: Try to VSync with OML_sync_control OpenGL extension. Only work on some drivers.
# opengl-swc: Try to VSync with SGI_swap_control OpenGL extension. Only work on some drivers. Works only with GLX backend. Known to be most effective on many drivers. Does not actually control paint timing, only buffer swap is affected, so it doesn’t have the effect of --sw-opti unlike other methods. Experimental.
# opengl-mswc: Try to VSync with MESA_swap_control OpenGL extension. Basically the same as opengl-swc above, except the extension we use.
# (Note some VSync methods may not be enabled at compile time.)
vsync = "opengl-swc";

# Enable DBE painting mode, intended to use with VSync to (hopefully) eliminate tearing.
# Reported to have no effect, though.
dbe = false;
# Painting on X Composite overlay window. Recommended.
paint-on-overlay = true;

# Limit compton to repaint at most once every 1 / refresh_rate second to boost performance.
# This should not be used with --vsync drm/opengl/opengl-oml as they essentially does --sw-opti's job already,
# unless you wish to specify a lower refresh rate than the actual value.
sw-opti = false;

# Unredirect all windows if a full-screen opaque window is detected, to maximize performance for full-screen windows, like games.
# Known to cause flickering when redirecting/unredirecting windows.
# paint-on-overlay may make the flickering less obvious.
unredir-if-possible = true;

# Specify a list of conditions of windows that should always be considered focused.
focus-exclude = [ ];

# Use WM_TRANSIENT_FOR to group windows, and consider windows in the same group focused at the same time.
detect-transient = true;
# Use WM_CLIENT_LEADER to group windows, and consider windows in the same group focused at the same time.
# WM_TRANSIENT_FOR has higher priority if --detect-transient is enabled, too.
detect-client-leader = true;

#################################
#
# Window type settings
#
#################################

wintypes:
{
    tooltip =
    {
        # fade: Fade the particular type of windows.
        fade = true;
        # shadow: Give those windows shadow
        shadow = false;
        # opacity: Default opacity for the type of windows.
        opacity = 0.85;
        # focus: Whether to always consider windows of this type focused.
        focus = true;
    };
};

我的 i3 配置真的没有什么特别的,只有一些键绑定:

#  _ _____                  __ _
# (_)___ /  ___ ___  _ __  / _(_) __ _
# | | |_ \ / __/ _ \| '_ \| |_| |/ _` |
# | |___) | (__ (_) | | | |  _| | (_| |
# |_|____/ \___\___/|_| |_|_| |_|\__, |
#                                |___/

# set color variables
set $indicator           #a4a8ad
set $bg-color            #2f343f
set $active-bg-color     #545c6d
set $urgent-bg-color     #E53935
set $focused-ws-color    #b8babc
set $inactive-ws-color   #2f343f
set $text-color          #b8babc

# -- general settings ----------------------------------------------------------

set $mod Mod4
floating_modifier $mod
font pango:Hack 9
focus_follows_mouse no
#gaps outer 10
#gaps inner 8

# -- key bindings --------------------------------------------------------------

# frequently used
bindsym $mod+Return exec --no-startup-id xfce4-terminal
bindsym $mod+d exec --no-startup-id dmenu_run -b
bindsym $mod+q kill
bindsym $mod+p exec --no-startup-id sh ~/projects/dotFiles/lock.sh
# system commands
bindsym $mod+Shift+c reload
bindsym $mod+Shift+r restart
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'"

# splitting
bindsym $mod+v split h
bindsym $mod+b split v

# layouts
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
bindsym $mod+f fullscreen toggle
bindsym $mod+Shift+space floating toggle
bindsym $mod+space focus mode_toggle

# focus
bindsym $mod+a focus parent
bindsym $mod+h focus left
bindsym $mod+j focus down
bindsym $mod+k focus up
bindsym $mod+l focus right

# moving windows
bindsym $mod+Shift+h move left
bindsym $mod+Shift+j move down
bindsym $mod+Shift+k move up
bindsym $mod+Shift+l move right

# set workspace variables
set $workspace1 "1"
set $workspace2 "2"
set $workspace3 "3"
set $workspace4 "4"
set $workspace5 "5"
set $workspace6 "6"
set $workspace7 "7"
set $workspace8 "8"
set $workspace9 "9"
set $workspace10 ""

# switch to workspace
bindsym $mod+1 workspace $workspace1
bindsym $mod+2 workspace $workspace2
bindsym $mod+3 workspace $workspace3
bindsym $mod+4 workspace $workspace4
bindsym $mod+5 workspace $workspace5
bindsym $mod+6 workspace $workspace6
bindsym $mod+7 workspace $workspace7
bindsym $mod+8 workspace $workspace8
bindsym $mod+9 workspace $workspace9
bindsym $mod+0 workspace $workspace10

# move focused container to workspace
bindsym $mod+Shift+1 move container to  workspace $workspace1
bindsym $mod+Shift+2 move container to  workspace $workspace2
bindsym $mod+Shift+3 move container to  workspace $workspace3
bindsym $mod+Shift+4 move container to  workspace $workspace4
bindsym $mod+Shift+5 move container to  workspace $workspace5
bindsym $mod+Shift+6 move container to  workspace $workspace6
bindsym $mod+Shift+7 move container to  workspace $workspace7
bindsym $mod+Shift+8 move container to  workspace $workspace8
bindsym $mod+Shift+9 move container to  workspace $workspace9
bindsym $mod+Shift+0 move container to  workspace $workspace10

# resize window (you can also use the mouse for that)
bindsym $mod+r mode "resize"
mode "resize" {

        # These bindings trigger as soon as you enter the resize mode
        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

        # back to normal: Enter or Escape
        bindsym Return mode "default"
        bindsym Escape mode "default"
}

# -- window colors -------------------------------------------------------------
#                       border             background         text                   indicator
client.focused          $active-bg-color   $active-bg-color   $text-color            $indicator
client.unfocused        $bg-color          $bg-color          $text-color            $indicator
client.focused_inactive $bg-color          $bg-color          $text-color            $indicator
client.urgent           $urgent-bg-color   $urgent-bg-color   $text-color            $indicator

bar {
    Position top
    font pango:Hack 9
    status_command i3blocks -c $HOME/.config/i3/i3blocks.conf
    colors {
        background $bg-color
        separator #757575
        #                   border             background               text
        focused_workspace   $bg-color          $focused-ws-color        $bg-color
        inactive_workspace  $bg-color          $inactive-ws-color       $text-color
        urgent_workspace    $bg-color          $urgent-bg-color         $text-color
    }
}

# -- startup programs ----------------------------------------------------------
exec_always --no-startup-id feh --bg-scale $HOME/.local/share/backgrounds/batman_bat.png
exec --no-startup-id compton --config $HOME/.config/compton.conf
exec --no-startup-id nm-applet
exec --no-startup-id xinput set-prop 'DELL0767:00 06CB:7E92 Touchpad' 'libinput Tapping Enabled' 1
exec --no-startup-id xinput set-prop 'DELL0767:00 06CB:7E92 Touchpad' 'libinput Natural Scrolling Enabled' 1
new_window pixel 1
#default_border pixel 1
#default_floating_border normal

# Pulse Audio controls
# For pulseaudio
#bindsym XF86AudioRaiseVolume exec --no-startup-id pactl -- set-sink-volume 0 +5% #increase sound volume
#bindsym XF86AudioLowerVolume exec --no-startup-id pactl -- set-sink-volume 0 -5% #decrease sound volume
#bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle # mute sound

# For ALSA
bindsym XF86AudioRaiseVolume exec --no-startup-id "amixer -q sset Master,0 1+ unmute"
bindsym XF86AudioLowerVolume exec --no-startup-id "amixer -q sset Master,0 1- unmute"
bindsym XF86AudioMute exec --no-startup-id "amixer -q sset Headphone,0 toggle"

# Sreen brightness controls
bindsym XF86MonBrightnessUp exec xbacklight -inc 5 # increase screen brightness
bindsym XF86MonBrightnessDown exec xbacklight -dec 5 # decrease screen brightness

# Media player controls
bindsym XF86AudioPlay exec --no-startup-id playerctl play
bindsym XF86AudioPause exec --no-startup-id playerctl pause
bindsym XF86AudioNext exec --no-startup-id playerctl next
bindsym XF86AudioPrev exec --no-startup-id playerctl previous

出于某种原因,一定是由上述配置中的某些原因引起的,当一个窗口变成全屏时,屏幕会随机冻结,但计算机工作正常:声音仍然有效,键绑定有效,我可以用我的键绑定注销,等等。这种情况是随机发生的,即并非每次将窗口设为全屏时,但它主要发生在 chromium-browser 和 mpv 上,主要是在播放视频时(虽然不是 youtube)。

我怎样才能摆脱这个问题?

ubuntu freeze
  • 1 个回答
  • 2669 Views
Martin Hope
kadekai
Asked: 2018-06-28 18:31:50 +0800 CST

从 `ls -al` 命令的输出中删除硬链接的数量

  • 1

这是ls -al命令输出:

total 280K
drwxrwxr-x 2 enan enan 4.0K Jun 28 09:59 ranger/
drwxrwxr-x 2 enan enan 4.0K Jun  8 23:26 scripts/
-rw-rw-r-- 1 enan enan   49 Jun  4 18:19 caps_to_ctrl.sh
-rw-rw-r-- 1 enan enan  739 Jun  4 18:19 cmus.theme
-rw-rw-r-- 1 enan enan 8.6K Jun  4 18:19 compton.conf
-rw-rw-r-- 1 enan enan 5.9K Jun 22 09:39 config
-rw-rw-r-- 1 enan enan  859 Jun 14 12:13 i3blocks.conf
-rw-rw-r-- 1 enan enan 4.7K Jun 14 12:13 init.el
-rw-rw-r-- 1 enan enan 8.7K Jun 28 11:22 init.vim
-rw-rw-r-- 1 enan enan  815 Jun 14 12:13 install.sh
-rwxrwxr-x 1 enan enan  142 Jun  4 18:19 lock.sh*
-rw-rw-r-- 1 enan enan 1.1K Jun 21 13:30 README.md
-rw-rw-r-- 1 enan enan 197K Jun 14 12:13 screenshot.png
-rw-rw-r-- 1 enan enan 1.2K Jun 20 21:51 Session.vim
-rw-rw-r-- 1 enan enan  427 Jun  9 13:46 tmux.sh

-rw-rw-r--您可以看到文件权限和文件所有者之间有一个数字enan。该数字是文件的硬链接数。在输出中显示可能对某些情况有用,但现在,我不需要它,有时它会分散我的注意力。你可以看到,我有办法从输出中删除最后修改的日期,ls -al因为我现在不需要它。

那么,如何从ls -al命令输出中删除硬链接的数量?在命令的输出中显示硬链接的数量和最后修改日期的重要性是什么?我的意思是,如果你们中的任何人使用这些信息,请告诉我为什么以及如何这样做,因为我不想无意中影响我应该使用的行为。

bash ls
  • 3 个回答
  • 537 Views
Martin Hope
kadekai
Asked: 2018-06-24 00:26:19 +0800 CST

如何不切换到 tmux 中的窗格边缘 [重复]

  • 7
这个问题在这里已经有了答案:
tmux select-pane -LDUR command - 禁用自动循环行为 2答案
3年前关闭。

默认情况下,tmux 会越过窗格的边缘。例如,假设有两个窗格,pane 1并且pane 2. 假设你在pane 1并且你做到Ctrl+b →了,你在pane 2。如果你再次这样做Ctrl+b →,你会再次在pane 1。如何禁用该功能,所以当我从最后一个窗格导航时,我哪儿也不去?

tmux
  • 2 个回答
  • 409 Views
Martin Hope
kadekai
Asked: 2018-05-29 20:26:20 +0800 CST

Ranger文件管理器刷新缓存

  • 6

如何刷新游侠文件管理器?如果在当前目录中更改/编辑/创建/删除文件,它会自动刷新,但我希望能够强制它这样做。我该怎么做?

ranger
  • 1 个回答
  • 2744 Views
Martin Hope
kadekai
Asked: 2018-05-28 22:49:41 +0800 CST

需要有关 Linux 中的重命名命令的帮助

  • 2

我有几个具有这些名称的文件:

file1, A.ext  
file1, The.ext  

我需要将那里的名称更改为

A file1.ext  
The file1.ext

那就是我需要将文章从末尾移到开头删除逗号。我该怎么做?

我已经研究了 rename 命令,但我没有使用 perl 正则表达式的经验,我想出了这个不起作用的荒谬命令,我离开它是为了显示我的绝望:

rename 's/(?<=[A-Z a-z \s]*),\sA//' *
rename
  • 1 个回答
  • 146 Views
Martin Hope
kadekai
Asked: 2018-05-28 21:39:27 +0800 CST

从 zsh tab-completion 中删除颜色

  • 6

我不想在 zsh tab-completion 的建议中看到颜色。他们让我更难阅读。我怎样才能做到这一点?

这是我的.zshrc:

#           _
#   _______| |__
#  |_  / __|  _ \
#   / /\__ \ | | |
#  /___|___/_| |_|
#

# install oh-my-zsh
[ ! -d ~/.oh-my-zsh ] && git clone https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
# install zsh-autosuggestion
autosuggestions="/home/enan/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh"
[ ! -f "$autosuggestions" ] && git clone https://github.com/zsh-users/zsh-autosuggestions $HOME/.zsh/zsh-autosuggestions
[ -f "$autosuggestions" ] && source "/home/enan/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh"

# oh-my-zsh config
export ZSH=/home/enan/.oh-my-zsh
ZSH_THEME=""
DISABLE_LS_COLORS="true"
DISABLE_AUTO_TITLE="true"
export UPDATE_ZSH_DAYS=13
source $ZSH/oh-my-zsh.sh
plugins=( git )

bindkey '^P' up-line-or-beginning-search
bindkey '^N' down-line-or-beginning-search

# Personal customization
BASE16_SHELL=$HOME/.config/base16-shell/
[ -n "$PS1" ] && [ -s $BASE16_SHELL/profile_helper.sh ] && eval "$($BASE16_SHELL/profile_helper.sh)"

executables="/home/enan/Executables/bin"
[ -d "$executables" ] && [[ ":$PATH:" != *$executables* ]] && export PATH=$executables:${PATH}

# FZF settings
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
export FZF_DEFAULT_OPTS='--height 100% '

alias ls='ls -CF --color=none'
alias ll='ls -AlF'
alias la='ls -AF'
alias refresh='source ~/.zshrc'
alias screenfetch='screenfetch -t'
alias i3lock='sh ~/Git-repos/dotFiles/lock.sh'
alias emacs='emacs -nw'
alias v='nvim'
alias py2=python2
alias py3=python3
alias t='sh ~/Git-repos/dotFiles/tmux.sh'

# zsh prompt with git info
git_branch() {
  git branch --no-color 2>/dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ \1/'
}

git_status() {
  # + changes are staged and ready to commit
  # ! unstaged changes are present
  # ? untracked files are present
  # $ changes have been stashed
  # ↑ local commits need to be pushed to the remote
  local state="$(git status --porcelain 2>/dev/null)"
  local output='['
  [[ -n $(egrep '^[MADRC]' <<<"$state") ]] && output="$output+"
  [[ -n $(egrep '^.[MD]' <<<"$state") ]] && output="$output!"
  [[ -n $(egrep '^\?\?' <<<"$state") ]] && output="$output?"
  [[ -n $(git stash list) ]] && output="$output$"
  [[ -n $(git log --branches --not --remotes) ]] && output="$output↑"
  [[ -n $output ]] && output="$output]"
  echo $output
}

git_prompt() {
  # First, get the branch name...
  local branch=$(git_branch)
  # Empty output? Then we're not in a Git repository, so bypass the rest
  # of the function, producing no output
  if [[ -n $branch ]]; then
    local state=$(git_status)
    # Now output the actual code to insert the branch and status
    if [ $state = '[]' ]; then
      echo -e " $branch"
    else
    echo -e " $branch %{$fg_bold[red]%}$state"
    fi
  fi
}

PROMPT='%{$fg[blue]%}[%n@%m] %{$fg[magenta]%}%c%{$fg[yellow]%}$(git_prompt)
%(?:%{$fg[green]%}❯ :%{$fg[red]%}❯ )%{$reset_color%}'

和截图:

截屏

查看cd <tab>屏幕截图中终端的左窗格最后一个命令。

zsh colors
  • 1 个回答
  • 5938 Views
Martin Hope
kadekai
Asked: 2018-03-30 09:56:37 +0800 CST

在游侠中预览文件

  • 1

我已经能够在 Ranger 中预览图像。但由于某种原因,我没有文件预览。不适用于任何类型的文件。也不适用于压缩文件。我正在运行 linux mint 和 ranger v1.7.1。如何预览文件?

ranger
  • 1 个回答
  • 3054 Views
Martin Hope
kadekai
Asked: 2018-03-24 11:58:59 +0800 CST

刷新cmus中的缓存

  • 4

我最近开始使用cmus 。添加音乐目录后,如果我更改任何音乐文件的任何标签(如专辑名称等),cmus 中的信息不会改变。就算我再做:clear一遍:add ~/Music。如何在 cmus 中刷新此缓存?

music-player
  • 1 个回答
  • 5269 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    模块 i915 可能缺少固件 /lib/firmware/i915/*

    • 3 个回答
  • Marko Smith

    无法获取 jessie backports 存储库

    • 4 个回答
  • Marko Smith

    如何将 GPG 私钥和公钥导出到文件

    • 4 个回答
  • Marko Smith

    我们如何运行存储在变量中的命令?

    • 5 个回答
  • Marko Smith

    如何配置 systemd-resolved 和 systemd-networkd 以使用本地 DNS 服务器来解析本地域和远程 DNS 服务器来解析远程域?

    • 3 个回答
  • Marko Smith

    dist-upgrade 后 Kali Linux 中的 apt-get update 错误 [重复]

    • 2 个回答
  • Marko Smith

    如何从 systemctl 服务日志中查看最新的 x 行

    • 5 个回答
  • Marko Smith

    Nano - 跳转到文件末尾

    • 8 个回答
  • Marko Smith

    grub 错误:你需要先加载内核

    • 4 个回答
  • Marko Smith

    如何下载软件包而不是使用 apt-get 命令安装它?

    • 7 个回答
  • Martin Hope
    user12345 无法获取 jessie backports 存储库 2019-03-27 04:39:28 +0800 CST
  • Martin Hope
    Carl 为什么大多数 systemd 示例都包含 WantedBy=multi-user.target? 2019-03-15 11:49:25 +0800 CST
  • Martin Hope
    rocky 如何将 GPG 私钥和公钥导出到文件 2018-11-16 05:36:15 +0800 CST
  • Martin Hope
    Evan Carroll systemctl 状态显示:“状态:降级” 2018-06-03 18:48:17 +0800 CST
  • Martin Hope
    Tim 我们如何运行存储在变量中的命令? 2018-05-21 04:46:29 +0800 CST
  • Martin Hope
    Ankur S 为什么 /dev/null 是一个文件?为什么它的功能不作为一个简单的程序来实现? 2018-04-17 07:28:04 +0800 CST
  • Martin Hope
    user3191334 如何从 systemctl 服务日志中查看最新的 x 行 2018-02-07 00:14:16 +0800 CST
  • Martin Hope
    Marko Pacak Nano - 跳转到文件末尾 2018-02-01 01:53:03 +0800 CST
  • Martin Hope
    Kidburla 为什么真假这么大? 2018-01-26 12:14:47 +0800 CST
  • Martin Hope
    Christos Baziotis 在一个巨大的(70GB)、一行、文本文件中替换字符串 2017-12-30 06:58:33 +0800 CST

热门标签

linux bash debian shell-script text-processing ubuntu centos shell awk ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve