删除i3配置; 增加rofi启动器

master
yutent 2023-07-05 11:21:50 +00:00
parent bf50da6697
commit 575eb5b2b3
5 changed files with 123 additions and 230 deletions

View File

@ -1,123 +0,0 @@
# i3 配置
set $mod Mod4
set $alt Mod1
# 字体
font pango:monospace 8
# 窗口间隔
gaps inner 8
# 浮动窗口的 最大&最小尺寸
floating_maximum_size 1280 x 768
floating_minimum_size 640 x 480
# 终端默认以浮动形式打开
for_window [class="Alacritty"] floating enable
# 设置浮动窗口有标题栏, 平铺窗口没有 (有点bug, 标题栏去掉之后, 恢复不回来, 下面加了一组快捷键恢复标题栏)
for_window [floating] border normal
for_window [tiling] border none
# 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.
# 设置睡眠时自动锁屏
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.
# 启动网络管理器 tray
exec --no-startup-id nm-applet
# 启动polybar
exec --no-startup-id ~/.config/polybar/launch.sh
# 设置桌面背景
exec --no-startup-id feh --bg-fill /data/debian.png
# 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
# 拖拽窗口的按键, 默认为 $mod
floating_modifier $mod
# 注释之后, 按住主键, 即可用鼠标拖拽移动窗口。 取消注释, 则只有标题栏才能拖拽窗口
#tiling_drag modifier titlebar
# 绑定终端启动的快捷键
bindsym $alt+Ctrl+t exec i3-sensible-terminal
# 绑定关闭窗口的快捷键
bindsym $mod+q kill
# 绑定2种不同形式的rofi的快捷键
bindsym $mod+d exec --no-startup-id rofi -show drun
bindsym $alt+Tab exec --no-startup-id rofi -show windowcd
# flameshot 截图的快捷键
bindsym Ctrl+$alt+a exec --no-startup-id flameshot gui
bindsym Ctrl+$alt+Shift+a exec --no-startup-id flameshot gui -d 2000
# 绑定切换窗口布局的快捷键, 在堆叠和平铺中切换
bindsym $mod+F9 layout toggle stacking split
# 来回切平铺方向
bindsym $mod+Shift+equal layout toggle splith splitv
# 来回将当前窗口改为平铺或浮动
bindsym $mod+Shift+space floating toggle
# 显示窗口的标题栏, 用来解决上面提到的bug
bindsym $mod+Shift+Insert border normal
# 设置下个平铺窗口的拆分方向, 横向, backslash为反斜杠键
bindsym $mod+backslash split h
# 同上, 此为纵向, equal 即为"等号键"
bindsym $mod+equal split v
# 来回切换全屏
bindsym F11 fullscreen toggle
# 设置工作区名称
set $ws1 "1"
set $ws2 "2"
set $ws3 "3"
set $ws4 "4"
# 切换工作区的快捷键
bindsym Ctrl+1 workspace number $ws1
bindsym Ctrl+2 workspace number $ws2
bindsym Ctrl+3 workspace number $ws3
bindsym Ctrl+4 workspace number $ws4
bindsym Ctrl+Tab workspace next
bindsym Ctrl+Shift+Tab workspace prev
# 移动窗口到指定工作区
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
# 重新加载i3配置文件
bindsym $mod+Shift+c reload
# 重启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'"

View File

@ -2,4 +2,5 @@
type = custom/text
content =
content-foreground = ${color.red}
content-padding = 3
content-padding = 3
click-left = rofi -show drun -theme launcher

View File

@ -1,106 +0,0 @@
/*
* ROFI color theme
*
* Based on Something Found in the Internet
*
* User: Yutent
*
*/
configuration {
modi: "window,combi,ssh,drun,run";
font: "Menlo 12";
lines: 10;
columns: 2;
dpi: 192;
drun-icon-theme: "Reversal-green-dark";
drun {
display-name: "";
}
run {
display-name: "";
}
window {
display-name: "";
}
windowcd {
display-name: "";
}
ssh {
display-name: "⚝";
}
window-format: "{t}";
timeout {
delay: 10;
action: "kb-cancel";
}
}
* {
border: 0;
margin: 0;
padding: 0;
spacing: 0;
bg: #282a3680;
fg: #f8f8f2;
blue: #6272a4;
purple: #bd93f9;
background-color: @bg;
text-color: @fg;
}
window {
transparency: "real";
border-radius: 6px;
}
mainbox {
children: [inputbar, listview];
}
inputbar {
background-color: @blue;
children: [prompt, entry];
}
entry {
background-color: inherit;
padding: 16px 4px;
}
prompt {
background-color: inherit;
padding: 16px;
}
listview {
lines: 8;
}
element {
children: [element-icon, element-text];
text-color: @blue;
}
element-icon {
size: 2ch;
padding: 12px 10px;
}
element-text {
padding: 12px 0;
text-color: inherit;
}
element-text selected {
text-color: @purple;
}

View File

@ -0,0 +1,83 @@
* {
border: 0;
margin: 0;
padding: 0;
spacing: 0;
bg: #282a3680;
fg: #f8f8f2;
blue: #81a1c1;
grey: #ffffff10;
bluea: #81a1c150;
background-color: @bg;
text-color: @fg;
}
window {
transparency: "real";
border-radius: 6px;
background-color: @bg;
}
mainbox {
padding: 24px;
children: [inputbar, listview];
}
inputbar {
background-color: @grey;
border-radius: 6px;
margin: 12px 0;
children: [prompt, entry];
}
entry {
background-color: transparent;
padding: 16px 4px;
}
prompt {
padding: 16px;
background-color: transparent;
}
listview {
lines: 8;
scrollbar: true;
background-color: transparent;
}
scrollbar {
handle-width: 5px ;
handle-color: @blue;
background-color: @bg;
}
element {
padding: 0 12px;
margin: 0 12px 0 0;
border-radius: 6px;
text-color: @blue;
background-color: transparent;
children: [element-icon, element-text];
}
element-icon {
size: 2ch;
padding: 12px 10px;
background-color: transparent;
}
element-text {
padding: 12px 0;
text-color: inherit;
background-color: transparent;
}
element selected {
background-color: @bluea;
}
element-text selected {
text-color: #ffffff;
}

View File

@ -0,0 +1,38 @@
configuration {
modi: "window,combi,ssh,drun,run";
font: "Menlo 12";
lines: 10;
columns: 2;
dpi: 192;
drun-icon-theme: "Reversal-green-dark";
drun {
display-name: "";
}
run {
display-name: "";
}
window {
display-name: "";
}
windowcd {
display-name: "";
}
ssh {
display-name: "⚝";
}
drun-display-format: "{name}";
window-format: "{c} - {t}";
timeout {
delay: 10;
action: "kb-cancel";
}
}
@theme "./custom.rasi"