From f8ffdbda2e0dbb8e3cd065e9dfca7a904eaa62d3 Mon Sep 17 00:00:00 2001 From: Smirnov Olexandr Date: Sun, 27 Sep 2020 21:55:01 +0300 Subject: [PATCH] Add: i3, polybar, rofi, redshift config --- config/i3/config | 171 ++++++++++++ config/kitty/kitty.conf | 238 +++++++++++++++++ config/polybar/config | 245 +++++++++++++++++ config/polybar/launch.sh | 4 + .../polybar/scripts/battery-combined-tlp.sh | 5 + config/polybar/scripts/btc | 25 ++ .../polybar/scripts/openweathermap-simple.sh | 57 ++++ config/polybar/scripts/popup-calendar.sh | 41 +++ config/polybar/scripts/redshift.sh | 15 ++ config/polybar/scripts/spotify_status.py | 140 ++++++++++ config/polybar/scripts/updates-pacman.sh | 16 ++ config/redshift.conf | 16 ++ config/rofi/config | 1 + config/rofi/rofi-power-menu | 246 ++++++++++++++++++ config/rofi/solarized.rasi | 136 ++++++++++ 15 files changed, 1356 insertions(+) create mode 100644 config/i3/config create mode 100644 config/kitty/kitty.conf create mode 100644 config/polybar/config create mode 100755 config/polybar/launch.sh create mode 100755 config/polybar/scripts/battery-combined-tlp.sh create mode 100755 config/polybar/scripts/btc create mode 100755 config/polybar/scripts/openweathermap-simple.sh create mode 100755 config/polybar/scripts/popup-calendar.sh create mode 100755 config/polybar/scripts/redshift.sh create mode 100644 config/polybar/scripts/spotify_status.py create mode 100755 config/polybar/scripts/updates-pacman.sh create mode 100644 config/redshift.conf create mode 100644 config/rofi/config create mode 100755 config/rofi/rofi-power-menu create mode 100644 config/rofi/solarized.rasi diff --git a/config/i3/config b/config/i3/config new file mode 100644 index 0000000..e4428af --- /dev/null +++ b/config/i3/config @@ -0,0 +1,171 @@ +############# General ############# +# Bind $MOD(super) key +set $mod Mod4 +# Font +font monospace 10 +font pango:hack 10 +# Disable window title +default_border pixel + +############ Autostart ############ +exec --no-startup-id exec picom -b +exec --no-startup-id exec feh --bg-scale ~/Imager/wallpaper.png +exec --no-startup-id exec setxkbmap "us,ru,ua" ",winkeys" "grp:alt_shift_toggle" +exec --no-startup-id exec org.telegram.desktop +exec --no-startup-id exec discord + +############ Key bindings ######### +# Terminal +bindsym $mod+Return exec kitty +#bindsym $mod+Return exec konsole + +# Kill focus window +bindsym $mod+q kill +bindsym Mod1+F4 kill + +# Program/Exit louncher +bindsym $mod+space exec "rofi -show drun -show-icons -font 'hack 12' -show cobi -disable-history" +bindsym $mod+Escape exec "rofi -show power-menu -show-icons -font 'hack 12' -width 30 -lines 6 -disable-history -modi power-menu:~/.config/rofi/rofi-power-menu" +# Restart i3wm +bindsym $mod+Shift+r restart + +# Load program +bindsym $mod+F1 exec dolphin +bindsym $mod+F2 exec chromium +bindsym $mod+b exec firefox +bindsym $mod+F3 exec spotify +bindsym $mod+F4 exec subl +bindsym $mod+F5 exec notable + +# Floating window +floating_modifier $mod +bindsym $mod+Shift+space floating toggle +bindsym $mod+Shift+f focus mode_toggle + +# Fullscreen mode +bindsym $mod+f fullscreen toggle +bindsym $mod+F11 fullscreen toggle + +# Splits +bindsym $mod+h split h +bindsym $mod+v split v + +# Focus the parent container +bindsym $mod+a focus parent + +# Change container layout(stacked, tabbed, toggle split) +bindsym $mod+s layout stacking +bindsym $mod+w layout tabbed +bindsym $mod+e layout toggle split + +# Scratchpad +bindsym $mod+Shift+grave move scratchpad +bindsym $mod+grave scratchpad show + +######### Window preferens ######## +assign [class="(?i)konsole|kitty"] $ws1 +assign [class="(?i)chromium|firefox"] $ws2 +assign [class="(?i)subl|code|atom|typora|prepros"] $ws3 +assign [class="(?i)dolphin"] $ws4 +assign [class="(?i)telegram|discord"] $ws6 +assign [title="Notable|Simplenote"] $ws7 +assign [title="KeePassXC"] $ws8 +for_window [class="Spotify"] move to workspace $ws10 + +##### Change containet focus ###### +# Vim like keys container +bindsym $mod+j focus left +bindsym $mod+k focus down +bindsym $mod+l focus up +bindsym $mod+semicolon focus right + +# Alternatively cursor keys +bindsym $mod+Left focus left +bindsym $mod+Down focus down +bindsym $mod+Up focus up +bindsym $mod+Right focus right + +##### Move focused container ###### +# Vim like keys +bindsym $mod+Shift+j move left +bindsym $mod+Shift+k move down +bindsym $mod+Shift+l move up +bindsym $mod+Shift+colon move right + +# Alternatively 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 + +############ Workspaces ########### +set $ws1 "1" +set $ws2 "2" +set $ws3 "3" +set $ws4 "4" +set $ws5 "5" +set $ws6 "6" +set $ws7 "7" +set $ws8 "8" +set $ws9 "9" +set $ws10 "10" + +# Switch workspace +bindsym $mod+1 workspace $ws1 +bindsym $mod+2 workspace $ws2 +bindsym $mod+3 workspace $ws3 +bindsym $mod+4 workspace $ws4 +bindsym $mod+5 workspace $ws5 +bindsym $mod+6 workspace $ws6 +bindsym $mod+7 workspace $ws7 +bindsym $mod+8 workspace $ws8 +bindsym $mod+9 workspace $ws9 +bindsym $mod+0 workspace $ws10 + +# Move focused container to workspace +bindsym $mod+Shift+1 move container to workspace $ws1 +bindsym $mod+Shift+2 move container to workspace $ws2 +bindsym $mod+Shift+3 move container to workspace $ws3 +bindsym $mod+Shift+4 move container to workspace $ws4 +bindsym $mod+Shift+5 move container to workspace $ws5 +bindsym $mod+Shift+6 move container to workspace $ws6 +bindsym $mod+Shift+7 move container to workspace $ws7 +bindsym $mod+Shift+8 move container to workspace $ws8 +bindsym $mod+Shift+9 move container to workspace $ws9 +bindsym $mod+Shift+0 move container to workspace $ws10 + +########### Resize mode ########### +mode "resize" { + bindsym j resize shrink width 10 px or 10 ppt + bindsym k resize grow height 10 px or 10 ppt + bindsym l resize shrink height 10 px or 10 ppt + bindsym semicolon 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 or $mod+r + bindsym Return mode "default" + bindsym Escape mode "default" + bindsym $mod+r mode "default" +} +bindsym $mod+r mode "resize" + +############### Bar ############### +exec_always --no-startup-id $HOME/.config/polybar/launch.sh +#bar { +# status_command i3status +# position top +#} + +############## Colors ############# +# class border backgr. text indicator child_border +client.focused #268bd2 #268bd2 #ffffff #268bd2 #268bd2 +client.focused_inactive #000000 #000000 #ffffff #000000 #000000 +client.unfocused #000000 #000000 #888888 #000000 #000000 +client.urgent #000000 #000000 #ffffff #000000 #000000 +client.placeholder #000000 #000000 #ffffff #000000 #000000 +client.background #ffffff diff --git a/config/kitty/kitty.conf b/config/kitty/kitty.conf new file mode 100644 index 0000000..e69e60f --- /dev/null +++ b/config/kitty/kitty.conf @@ -0,0 +1,238 @@ +#: MOD +kitty_mod ctrl+shift +clear_all_shortcuts no + + + +#: Font +font_family Jetbrains Mono +bold_font auto +italic_font auto +bold_italic_font auto + +font_size 12.0 + +adjust_line_height 0 +adjust_column_width 0 + +disable_ligatures never +font_features none +box_drawing_scale 0.001, 1, 1.5, 2 + + + +#: Cursor +cursor #dfdfdf +cursor_text_color #7d7d7d + +#cursor_shape block +cursor_shape beam + +cursor_beam_thickness 1.5 +cursor_underline_thickness 2.0 + +cursor_blink_interval 0 +cursor_stop_blinking_after 15.0 + + + +#: Bell +enable_audio_bell no +visual_bell_duration 0.0 +window_alert_on_bell no +command_on_bell none +bell_on_tab no + + + +#: Scrollback (History) +scrollback_lines 500 +scrollback_pager less --chop-long-lines --RAW-CONTROL-CHARS +INPUT_LINE_NUMBER +scrollback_pager_history_size 0 +wheel_scroll_multiplier 5.0 +touch_scroll_multiplier 1.0 + + + +#: Mouse +mouse_hide_wait 2.5 + +url_color #4ecdc4 +url_style curly + +open_url_modifiers kitty_mod +open_url_with default +url_prefixes http https file ftp +copy_on_select yes +strip_trailing_spaces never +rectangle_select_modifiers ctrl+alt +terminal_select_modifiers shift +select_by_word_characters :@-./_~?&=%+# +click_interval -1.0 +focus_follows_mouse yes +pointer_shape_when_grabbed arrow + + + +#: Perfomance +repaint_delay 10 +input_delay 3 +sync_to_monitor yes +command_on_bell none + + + +#: Window +remember_window_size yes +initial_window_width 640 +initial_window_height 480 +enabled_layouts * + +window_resize_step_cells 2 +window_resize_step_lines 2 +window_border_width 1.0 +draw_minimal_borders no +window_margin_width 0.0 +single_window_margin_width -1000.0 +window_padding_width 0.0 + +placement_strategy center +active_border_color #073642 +inactive_border_color #292f36 +bell_border_color #ff5a00 +inactive_text_alpha 1.0 +hide_window_decorations no +resize_debounce_time 0.1 +resize_draw_strategy static +resize_in_steps no + + + +#: Tabs +tab_bar_edge bottom +tab_bar_margin_width 0.0 +tab_bar_style powerline +tab_bar_min_tabs 2 +tab_switch_strategy previous +tab_fade 0.25 0.5 0.75 1 +tab_separator " ┇" +tab_title_template "{title}" +active_tab_title_template none + +active_tab_foreground #dfdfdf +active_tab_background #073642 +active_tab_font_style bold-italic +inactive_tab_foreground #dfdfdf +inactive_tab_background #292f36 +inactive_tab_font_style normal + +tab_bar_background none + + + +#: Theming +foreground #dfdfdf +background_opacity 0.87 +background_image none +background_image_layout tiled +background_image_linear no +dynamic_background_opacity no +background_tint 0.0 +dim_opacity 0.75 +selection_foreground #edebd7 +selection_background #073642 + + + +#: Keyboard Shortcuts +#: #: Clipboard +map ctrl+shift+c copy_to_clipboard +map ctrl+shift+v paste_from_clipboard +map shift+insert paste_from_selection +map kitty_mod+o pass_selection_to_program + +#: #: Scroll +map kitty_mod+up scroll_line_up +map kitty_mod+k scroll_line_up +map kitty_mod+down scroll_line_down +map kitty_mod+j scroll_line_down +map kitty_mod+page_up scroll_page_up +map kitty_mod+page_down scroll_page_down +map kitty_mod+home scroll_home +map kitty_mod+end scroll_end +map kitty_mod+h show_scrollback + +#: #: Window +map kitty_mod+F9 new_os_window +map kitty_mod+enter new_window +map kitty_mod+x close_window +map kitty_mod+] next_window +map kitty_mod+[ previous_window +map kitty_mod+f move_window_forward +map kitty_mod+b move_window_backward +map kitty_mod+` move_window_to_top +map kitty_mod+r start_resizing_window + +#: #: Tab +map kitty_mod+l next_tab +map kitty_mod+h previous_tab +map kitty_mod+t new_tab +map kitty_mod+q close_tab +map kitty_mod+. set_tab_title +map kitty_mod+1 first_window +map kitty_mod+2 second_window +map kitty_mod+3 third_window +map kitty_mod+4 fourth_window +map kitty_mod+5 fifth_window +map kitty_mod+6 sixth_window +map kitty_mod+7 seventh_window +map kitty_mod+8 eighth_window +map kitty_mod+9 ninth_window +map kitty_mod+0 tenth_window + +#: #: Layouts +map kitty_mod+l next_layout + +#: #: Font Size +map kitty_mod+equal change_font_size all +2.0 +map kitty_mod+minus change_font_size all -2.0 +map kitty_mod+backspace change_font_size all 0 + +#:#: Other +map f11 toggle_fullscreen +map kitty_mod+f10 toggle_maximized +map kitty_mod+u kitten unicode_input +map kitty_mod+f2 edit_config_file +map kitty_mod+escape kitty_shell window + +map kitty_mod+delete clear_terminal reset active + +selection_background #073642 +selection_foreground #edebd7 +foreground #d2dae2 +background #1e272e +cursorColor #d2dae2 + +color0 #1e272e +color8 #485460 + +color1 #ff3f34 +color9 #ff5e57 + +color2 #05c46b +color10 #0be881 + +color3 #ffa801 +color11 #ffc048 + +color4 #3c40c6 +color12 #575fcf + +color5 #f53b57 +color13 #ef5777 + +color6 #0fbcf9 +color14 #4bcffa + +color7 #808e9b +color15 #d2dae2 \ No newline at end of file diff --git a/config/polybar/config b/config/polybar/config new file mode 100644 index 0000000..8763c6e --- /dev/null +++ b/config/polybar/config @@ -0,0 +1,245 @@ +[settings] +pseudo-transparency = true + +[colors] +background = #002B36 +background-alt = #073642 +foreground = #dfdfdf +foreground-alt = #fdf6e3 +primary = #268bd2 +secondary = #218DC8 +alert = #268bd2 +;alert = #dc322f + +############################################################################################################ +[bar/example] +#monitor = ${env:MONITOR:HDMI-1} +width = 100% +height = 26 +fixed-center = true +locale = en_US.UTF-8 + +background = ${colors.background} +foreground = ${colors.foreground} + +line-size = 1 +line-color = #f00 + +padding-left = 0 +padding-right = 0 +module-margin-left = 1 +module-margin-right = 1 + +; Fonts +font-0 = Iosevka Nerd Font:style=Medium:size=8;3 +font-1 = FontAwesome5Free:style=Solid:size=7.5;2.5 +font-2 = Weather Icons:size=7;2 +font-3 = FontAwesome5Brands:style=Solid:size=7.5;2.5 + +############################################################################################################ +; Modules position +modules-left = i3 sp2 openweathermap-simple updates-pacman +;modules-center = title +modules-center = spotify +modules-right = pulseaudio xkeyboard powermenu sp2 calendar +tray-position = right +tray-padding = 2 +tray-detached = false + +############################################################################################################ +# INCLUDE MODULES +############################################################################################################ +[module/filesystem] +type = internal/fs +interval = 25 +mount-0 = / +mount-1 = /home + +label-mounted = %{F#c38611} %mountpoint%: %percentage_used%% +label-unmounted = %mountpoint% not mounted +label-unmounted-foreground = ${colors.foreground-alt} + +############################################################################################################ +[settings] +screenchange-reload = true + +############################################################################################################ +; Used for top and bottom aligned bars +[global/wm] +margin-top = 5 +margin-bottom = 5 +cursor-click = pointer +cursor-scroll = ns-resize +wm-restack = i3 + +############################################################################################################ +; i3wm workspace indicator +[module/i3] +type = internal/i3 +format = +index-sort = true +wrapping-scroll = false +label-mode-padding = 1 +label-mode-foreground = #000 +label-mode-background = ${colors.primary} +label-focused = %icon% +label-focused-background = 002873C0 +label-focused-foreground = ${colors.foreground} +label-focused-padding = 1 +label-focused-underline = 018BFF +#label-focused-overline = ${colors.primary} + +label-unfocused = %icon% +label-unfocused-background = 00255498 +label-unfocused-foreground = ${colors.foreground} +label-unfocused-padding = 1 +#label-unfocused-underline = 255498 +#label-unfocused-overline = ${colors.background} + +label-urgent = %icon% +label-urgent-background = ${colors.alert} +label-urgent-foreground = ${colors.foreground} +label-urgent-padding = 1 +label-urgent-underline = ${colors.alert} +#label-urgent-overline = ${colors.background} + +label-visible = %icon% +label-visible-background = ${colors.background} +label-visible-foreground = ${colors.foreground} +label-visible-padding = 1 +label-visible-underline = ${colors.background} +#label-visible-overline = ${colors.background} + +ws-icon-0 = "1;1 " +ws-icon-1 = "2;2 " +ws-icon-2 = "3;3 " +ws-icon-3 = "4;4 " +ws-icon-4 = "5;5 " +ws-icon-5 = "6;6 " +ws-icon-6 = "7;7 " +ws-icon-7 = 8;8 +ws-icon-8 = "9;9 " +ws-icon-9 = "10;10 " +;label-separator = | + +############################################################################################################ +# PulseAudio- https://github.com/polybar/polybar/wiki/Module:-pulseaudio +[module/pulseaudio] +type = internal/pulseaudio +format-volume = %{F#61a8ff} +label-volume = %{F#61a8ff} %percentage%% +label-volume-foreground = ${root.foreground} +label-muted =  +label-muted-foreground = #e8793e + +ramp-volume-0 =  +ramp-volume-1 =  +ramp-volume-2 =  +ramp-volume-3 =  +ramp-volume-4 =  + +############################################################################################################ +; CPU Loads - https://github.com/polybar/polybar/wiki/Module:-cpu +[module/cpu] +type = internal/cpu +interval = 2 +format-prefix = " " +format-prefix-foreground = ${colors.foreground-alt} +label = %{F#1ecb0b} CPU %percentage%% + + +############################################################################################################ +# Memmory(RAM) - https://github.com/polybar/polybar/wiki/Module:-memory +[module/memory] +type = internal/memory +interval = 2 +format-prefix = " " +#format-prefix-foreground = ${colors.foreground-alt} +#format-overline = #61C07C +#format-underline = #61C07C +label = %{F#8d61ff}  MEM %percentage_used%% + +############################################################################################################ +; Weather +[module/openweathermap-simple] +type = custom/script +exec = ~/.config/polybar/scripts/openweathermap-simple.sh +interval = 60 +label-font = 3 + +############################################################################################################ +; Sporify inkator - https://github.com/Jvanrhijn/polybar-spotify +[module/spotify] +type = custom/script +interval = 1 +format-prefix = " " +format =